Changeset 10a2e22 in mainline
- Timestamp:
- 2005-04-30T00:37:35Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ed0dd65
- Parents:
- babcb148
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/Makefile.inc
rbabcb148 r10a2e22 25 25 arch/proc/scheduler.c \ 26 26 arch/acpi/acpi.c \ 27 arch/acpi/madt.c \ 27 28 arch/bios/bios.c \ 28 29 arch/smp/ap.S \ -
arch/ia32/include/acpi/acpi.h
rbabcb148 r10a2e22 58 58 } __attribute__ ((packed));; 59 59 60 struct acpi_signature_map { 61 __u8 *signature; 62 struct acpi_sdt_header **sdt_ptr; 63 char *description; 64 }; 65 60 66 /* Root System Description Table */ 61 67 struct acpi_rsdt { … … 71 77 72 78 extern struct acpi_rsdp *acpi_rsdp; 79 extern struct acpi_rsdt *acpi_rsdt; 80 extern struct acpi_xsdt *acpi_xsdt; 73 81 74 82 extern void acpi_init(void); 75 76 83 static int rsdp_check(__u8 *rsdp); 84 static void map_sdt(struct acpi_sdt_header *sdt); 85 extern int acpi_sdt_check(__u8 *sdt); 86 static void configure_via_rsdt(void); 87 static void configure_via_xsdt(void); 77 88 78 89 #endif /* __ACPI_H__ */ -
arch/ia32/src/acpi/acpi.c
rbabcb148 r10a2e22 28 28 29 29 #include <arch/acpi/acpi.h> 30 #include <arch/acpi/madt.h> 30 31 #include <arch/bios/bios.h> 32 33 #include <mm/page.h> 31 34 32 35 #define RSDP_SIGNATURE "RSD PTR " … … 34 37 35 38 struct acpi_rsdp *acpi_rsdp = NULL; 39 struct acpi_rsdt *acpi_rsdt = NULL; 40 struct acpi_xsdt *acpi_xsdt = NULL; 41 42 struct acpi_signature_map signature_map[] = { 43 { "APIC", (struct acpi_sdt_header **) &acpi_madt, "Multiple APIC Description Table" } 44 }; 36 45 37 46 int rsdp_check(__u8 *rsdp) { … … 54 63 return !sum; 55 64 65 } 66 67 int acpi_sdt_check(__u8 *sdt) 68 { 69 struct acpi_sdt_header *h = (struct acpi_sdt_header *) sdt; 70 __u8 sum = 0; 71 int i; 72 73 for (i=0; i<h->length; i++) 74 sum += sdt[i]; 75 76 return !sum; 77 } 78 79 void map_sdt(struct acpi_sdt_header *sdt) 80 { 81 map_page_to_frame((__address) sdt, (__address) sdt, PAGE_NOT_CACHEABLE, 0); 56 82 } 57 83 … … 81 107 82 108 rsdp_found: 83 printf("%L: ACPI Root System Description Pointer\n", acpi_rsdp); 109 printf("%L: ACPI Root System Description Pointer\n", acpi_rsdp); 110 111 acpi_rsdt = (struct acpi_rsdt *) acpi_rsdp->rsdt_address; 112 if (acpi_rsdp->revision) acpi_xsdt = (struct acpi_xsdt *) ((__address) acpi_rsdp->xsdt_address); 113 114 if (acpi_rsdt) map_sdt((struct acpi_sdt_header *) acpi_rsdt); 115 if (acpi_xsdt) map_sdt((struct acpi_sdt_header *) acpi_xsdt); 116 117 if (acpi_rsdt && !acpi_sdt_check((__u8 *) acpi_rsdt)) { 118 printf("RSDT: %s\n", "bad checksum"); 119 return; 120 } 121 if (acpi_xsdt && !acpi_sdt_check((__u8 *) acpi_xsdt)) { 122 printf("XSDT: %s\n", "bad checksum"); 123 return; 124 } 125 126 if (acpi_xsdt) configure_via_xsdt(); 127 else if (acpi_rsdt) configure_via_rsdt(); 128 84 129 } 130 131 void configure_via_rsdt(void) 132 { 133 int i, j, cnt = (acpi_rsdt->header.length - sizeof(struct acpi_sdt_header))/sizeof(__u32); 134 135 for (i=0; i<cnt; i++) { 136 for (j=0; j<sizeof(signature_map)/sizeof(struct acpi_signature_map); j++) { 137 struct acpi_sdt_header *h = (struct acpi_sdt_header *) acpi_rsdt->entry[i]; 138 139 map_sdt(h); 140 if (*((__u32 *) &h->signature[0])==*((__u32 *) &signature_map[j].signature[0])) { 141 if (!acpi_sdt_check((__u8 *) h)) 142 goto next; 143 *signature_map[j].sdt_ptr = h; 144 printf("%L: ACPI %s\n", *signature_map[j].sdt_ptr, signature_map[j].description); 145 } 146 } 147 next: 148 ; 149 } 150 } 151 152 void configure_via_xsdt(void) 153 { 154 int i, j, cnt = (acpi_xsdt->header.length - sizeof(struct acpi_sdt_header))/sizeof(__u64); 155 156 for (i=0; i<cnt; i++) { 157 for (j=0; j<sizeof(signature_map)/sizeof(struct acpi_signature_map); j++) { 158 struct acpi_sdt_header *h = (struct acpi_sdt_header *) ((__address) acpi_rsdt->entry[i]); 159 160 map_sdt(h); 161 if (*((__u32 *) &h->signature[0])==*((__u32 *) &signature_map[j].signature[0])) { 162 if (!acpi_sdt_check((__u8 *) h)) 163 goto next; 164 *signature_map[j].sdt_ptr = h; 165 printf("%L: ACPI %s\n", *signature_map[j].sdt_ptr, signature_map[j].description); 166 } 167 } 168 next: 169 ; 170 } 171 172 } -
arch/ia32/src/interrupt.c
rbabcb148 r10a2e22 87 87 printf("%%eax=%L, %%ebx=%L, %%ecx=%L, %%edx=%L,\n%%edi=%L, %%esi=%L, %%ebp=%L, %%esp=%L\n", stack[-2], stack[-5], stack[-3], stack[-4], stack[-9], stack[-8], stack[-1], stack); 88 88 printf("stack: %X, %X, %X, %X\n", stack[4], stack[5], stack[6], stack[7]); 89 panic("page fault\n"); 89 printf("page fault\n"); 90 cpu_halt(); 90 91 } 91 92 -
arch/ia32/src/smp/mp.c
rbabcb148 r10a2e22 387 387 switch (cur[CT_EXT_ENTRY_TYPE]) { 388 388 default: 389 printf("% X: skipping MP Configuration Table extended entry type %d\n", cur, cur[CT_EXT_ENTRY_TYPE]);389 printf("%L: skipping MP Configuration Table extended entry type %d\n", cur, cur[CT_EXT_ENTRY_TYPE]); 390 390 break; 391 391 } -
doc/requirements
rbabcb148 r10a2e22 11 11 12 12 SMP COMPATIBILITY 13 o Bochs 2.0.2 - Bochs 2. 113 o Bochs 2.0.2 - Bochs 2.2-cvs 14 14 o 2x-8x 686 CPU 15 15 o ASUS P/I-P65UP5 + ASUS C-P55T2D REV. 1.41 … … 17 17 18 18 EMULATORS AND VIRTUALIZERS 19 o Bochs 2.0.2 - Bochs 2. 120 o VMware Workstation 4 19 o Bochs 2.0.2 - Bochs 2.2-cvs 20 o VMware Workstation 4, VMware Workstation 5 21 21 22 22
Note:
See TracChangeset
for help on using the changeset viewer.