Changeset 7f1c620 in mainline for arch/ia32/src/smp/smp.c
- Timestamp:
- 2006-07-04T17:17:56Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0ffa3ef5
- Parents:
- 991779c5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/src/smp/smp.c
r991779c5 r7f1c620 62 62 void smp_init(void) 63 63 { 64 __addressl_apic_address, io_apic_address;64 uintptr_t l_apic_address, io_apic_address; 65 65 66 66 if (acpi_madt) { … … 73 73 } 74 74 75 l_apic_address = ( __address) frame_alloc(ONE_FRAME, FRAME_ATOMIC | FRAME_KA);75 l_apic_address = (uintptr_t) frame_alloc(ONE_FRAME, FRAME_ATOMIC | FRAME_KA); 76 76 if (!l_apic_address) 77 77 panic("cannot allocate address for l_apic\n"); 78 78 79 io_apic_address = ( __address) frame_alloc(ONE_FRAME, FRAME_ATOMIC | FRAME_KA);79 io_apic_address = (uintptr_t) frame_alloc(ONE_FRAME, FRAME_ATOMIC | FRAME_KA); 80 80 if (!io_apic_address) 81 81 panic("cannot allocate address for io_apic\n"); 82 82 83 83 if (config.cpu_count > 1) { 84 page_mapping_insert(AS_KERNEL, l_apic_address, ( __address) l_apic,84 page_mapping_insert(AS_KERNEL, l_apic_address, (uintptr_t) l_apic, 85 85 PAGE_NOT_CACHEABLE); 86 page_mapping_insert(AS_KERNEL, io_apic_address, ( __address) io_apic,86 page_mapping_insert(AS_KERNEL, io_apic_address, (uintptr_t) io_apic, 87 87 PAGE_NOT_CACHEABLE); 88 88 89 l_apic = ( __u32*) l_apic_address;90 io_apic = ( __u32*) io_apic_address;89 l_apic = (uint32_t *) l_apic_address; 90 io_apic = (uint32_t *) io_apic_address; 91 91 } 92 92 } … … 115 115 * Set the warm-reset vector to the real-mode address of 4K-aligned ap_boot() 116 116 */ 117 *(( __u16 *) (PA2KA(0x467+0))) = ((__address) ap_boot) >> 4; /* segment */118 *(( __u16*) (PA2KA(0x467+2))) = 0; /* offset */117 *((uint16_t *) (PA2KA(0x467+0))) = ((uintptr_t) ap_boot) >> 4; /* segment */ 118 *((uint16_t *) (PA2KA(0x467+2))) = 0; /* offset */ 119 119 120 120 /* … … 155 155 156 156 memcpy(gdt_new, gdt, GDT_ITEMS * sizeof(struct descriptor)); 157 memsetb(( __address)(&gdt_new[TSS_DES]), sizeof(struct descriptor), 0);157 memsetb((uintptr_t)(&gdt_new[TSS_DES]), sizeof(struct descriptor), 0); 158 158 protected_ap_gdtr.limit = GDT_ITEMS * sizeof(struct descriptor); 159 protected_ap_gdtr.base = KA2PA(( __address) gdt_new);160 gdtr.base = ( __address) gdt_new;159 protected_ap_gdtr.base = KA2PA((uintptr_t) gdt_new); 160 gdtr.base = (uintptr_t) gdt_new; 161 161 162 162 if (l_apic_send_init_ipi(ops->cpu_apic_id(i))) {
Note:
See TracChangeset
for help on using the changeset viewer.