Changeset ed0dd65 in mainline for arch/ia32/src
- Timestamp:
- 2005-04-30T16:47:17Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 30ef8ce
- Parents:
- 10a2e22
- Location:
- arch/ia32/src
- Files:
-
- 1 added
- 5 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/src/acpi/acpi.c
r10a2e22 red0dd65 79 79 void map_sdt(struct acpi_sdt_header *sdt) 80 80 { 81 int i, cnt, length; 82 81 83 map_page_to_frame((__address) sdt, (__address) sdt, PAGE_NOT_CACHEABLE, 0); 84 85 length = sdt->length + ((__address) sdt) - ((__address) sdt)&0xfffff000; 86 cnt = length/PAGE_SIZE + (length%PAGE_SIZE>0); 87 88 for (i = 1; i < cnt; i++) 89 map_page_to_frame(((__address) sdt) + i*PAGE_SIZE, ((__address) sdt) + i*PAGE_SIZE, PAGE_NOT_CACHEABLE, 0); 82 90 } 83 91 -
arch/ia32/src/acpi/madt.c
r10a2e22 red0dd65 27 27 */ 28 28 29 #include <arch/types.h> 29 30 #include <arch/acpi/acpi.h> 30 31 #include <arch/acpi/madt.h> 32 #include <arch/smp/apic.h> 31 33 32 34 struct acpi_madt *acpi_madt = NULL; 35 36 #ifdef __SMP__ 37 38 char *entry[] = { 39 "L_APIC", 40 "IO_APIC", 41 "INTR_SRC_OVRD", 42 "NMI_SRC", 43 "L_APIC_NMI", 44 "L_APIC_ADDR_OVRD", 45 "IO_SAPIC", 46 "L_SAPIC", 47 "PLATFORM_INTR_SRC" 48 }; 49 50 void acpi_madt_parse(void) 51 { 52 struct madt_apic_header *end = (struct madt_apic_header *) (((__u8 *) acpi_madt) + acpi_madt->header.length); 53 struct madt_apic_header *h = &acpi_madt->apic_header[0]; 54 55 l_apic = (__u32 *) acpi_madt->l_apic_address; 56 57 while (h < end) { 58 switch (h->type) { 59 case MADT_L_APIC: 60 case MADT_IO_APIC: 61 case MADT_INTR_SRC_OVRD: 62 case MADT_NMI_SRC: 63 case MADT_L_APIC_NMI: 64 case MADT_L_APIC_ADDR_OVRD: 65 case MADT_IO_SAPIC: 66 case MADT_L_SAPIC: 67 case MADT_PLATFORM_INTR_SRC: 68 printf("MADT: skipping %s entry (type=%d)\n", entry[h->type], h->type); 69 break; 70 71 default: 72 if (h->type >= MADT_RESERVED_SKIP_BEGIN && h->type <= MADT_RESERVED_SKIP_END) { 73 printf("MADT: skipping reserved entry (type=%d)\n", h->type); 74 } 75 if (h->type >= MADT_RESERVED_OEM_BEGIN) { 76 printf("MADT: skipping OEM entry (type=%d)\n", h->type); 77 } 78 break; 79 } 80 h = (struct madt_apic_header *) (((__u8 *) h) + h->length); 81 } 82 83 } 84 85 #endif /* __SMP__ */ -
arch/ia32/src/ia32.c
r10a2e22 red0dd65 94 94 #ifdef __SMP__ 95 95 acpi_init(); 96 mp_init();97 96 #endif /* __SMP__ */ 98 97 } -
arch/ia32/src/mm/page.c
r10a2e22 red0dd65 128 128 pd[pde].frame_address = newpt >> 12; 129 129 } 130 130 131 pt = (struct page_specifier *) (pd[pde].frame_address << 12); 131 132 -
arch/ia32/src/smp/apic.c
r10a2e22 red0dd65 30 30 #include <arch/smp/apic.h> 31 31 #include <arch/smp/ap.h> 32 #include <arch/smp/mp .h>32 #include <arch/smp/mps.h> 33 33 #include <mm/page.h> 34 34 #include <time/delay.h> … … 44 44 * Advanced Programmable Interrupt Controller for MP systems. 45 45 * Tested on: 46 * Bochs 2.0.2 with 2-8 CPUs46 * Bochs 2.0.2 - Bochs 2.2-cvs with 2-8 CPUs 47 47 * ASUS P/I-P65UP5 + ASUS C-P55T2D REV. 1.41 with 2x 200Mhz Pentium CPUs 48 48 */ … … 83 83 int pin; 84 84 85 if ((pin = mp _irq_to_pin(i)) != -1)85 if ((pin = mps_irq_to_pin(i)) != -1) 86 86 io_apic_change_ioredtbl(pin,0xf,IVT_IRQBASE+i,LOPRI); 87 87 } … … 380 380 * mapping for the respective IRQ number. 381 381 */ 382 pin = mp _irq_to_pin(i);382 pin = mps_irq_to_pin(i); 383 383 if (pin != -1) { 384 384 reglo = io_apic_read(IOREDTBL + pin*2); … … 402 402 * mapping for the respective IRQ number. 403 403 */ 404 pin = mp _irq_to_pin(i);404 pin = mps_irq_to_pin(i); 405 405 if (pin != -1) { 406 406 reglo = io_apic_read(IOREDTBL + pin*2); -
arch/ia32/src/smp/mps.c
r10a2e22 red0dd65 1 1 /* 2 * Copyright (C) 2001-200 4Jakub Jermar2 * Copyright (C) 2001-2005 Jakub Jermar 3 3 * All rights reserved. 4 4 * … … 33 33 #include <print.h> 34 34 #include <panic.h> 35 #include <arch/smp/mp .h>35 #include <arch/smp/mps.h> 36 36 #include <arch/smp/ap.h> 37 37 #include <arch/smp/apic.h> … … 51 51 52 52 /* 53 * Multi -Processor Specification detection code.53 * MultiProcessor Specification detection code. 54 54 */ 55 55 … … 57 57 #define CT_SIGNATURE 0x504d4350 58 58 59 int mp _fs_check(__u8 *base);60 int mp _ct_check(void);59 int mps_fs_check(__u8 *base); 60 int mps_ct_check(void); 61 61 62 62 int configure_via_ct(void); … … 71 71 void ct_extended_entries(void); 72 72 73 static struct __mpfs *fs;74 static struct __mpct *ct;73 static struct mps_fs *fs; 74 static struct mps_ct *ct; 75 75 76 76 struct __processor_entry *processor_entries = NULL; … … 92 92 * Used to check the integrity of the MP Floating Structure. 93 93 */ 94 int mp _fs_check(__u8 *base)94 int mps_fs_check(__u8 *base) 95 95 { 96 96 int i; … … 106 106 * Used to check the integrity of the MP Configuration Table. 107 107 */ 108 int mp _ct_check(void)108 int mps_ct_check(void) 109 109 { 110 110 __u8 *base = (__u8 *) ct; … … 127 127 } 128 128 129 void mp _init(void)129 void mps_init(void) 130 130 { 131 131 __u8 *addr[2] = { NULL, (__u8 *) 0xf0000 }; … … 143 143 for (i = 0; i < 2; i++) { 144 144 for (j = 0; j < length[i]; j += 16) { 145 if (*((__u32 *) &addr[i][j]) == FS_SIGNATURE && mp _fs_check(&addr[i][j])) {146 fs = (struct __mpfs *) &addr[i][j];145 if (*((__u32 *) &addr[i][j]) == FS_SIGNATURE && mps_fs_check(&addr[i][j])) { 146 fs = (struct mps_fs *) &addr[i][j]; 147 147 goto fs_found; 148 148 } … … 153 153 154 154 fs_found: 155 printf("%L: MP Floating Pointer Structure\n", fs);155 printf("%L: MPS Floating Pointer Structure\n", fs); 156 156 157 157 frame_not_free((__address) fs); … … 159 159 if (fs->config_type == 0 && fs->configuration_table) { 160 160 if (fs->mpfib2 >> 7) { 161 printf("mp _init: PIC mode not supported\n");161 printf("mps_init: PIC mode not supported\n"); 162 162 return; 163 163 } … … 192 192 return 1; 193 193 } 194 if (!mp _ct_check()) {194 if (!mps_ct_check()) { 195 195 printf("configure_via_ct: bad ct checksum\n"); 196 196 return 1; … … 288 288 void ct_bus_entry(struct __bus_entry *bus) 289 289 { 290 #ifdef MP CT_VERBOSE290 #ifdef MPSCT_VERBOSE 291 291 char buf[7]; 292 292 memcopy((__address) bus->bus_type, (__address) buf,6); … … 316 316 } 317 317 318 //#define MP CT_VERBOSE318 //#define MPSCT_VERBOSE 319 319 void ct_io_intr_entry(struct __io_intr_entry *iointr) 320 320 { 321 #ifdef MP CT_VERBOSE321 #ifdef MPSCT_VERBOSE 322 322 switch (iointr->intr_type) { 323 323 case 0: printf("INT"); break; … … 350 350 void ct_l_intr_entry(struct __l_intr_entry *lintr) 351 351 { 352 #ifdef MP CT_VERBOSE352 #ifdef MPSCT_VERBOSE 353 353 switch (lintr->intr_type) { 354 354 case 0: printf("INT"); break; … … 496 496 } 497 497 498 int mp _irq_to_pin(int irq)498 int mps_irq_to_pin(int irq) 499 499 { 500 500 int i;
Note:
See TracChangeset
for help on using the changeset viewer.