Changeset 7f1c620 in mainline for arch/ia32/src/smp/smp.c


Ignore:
Timestamp:
2006-07-04T17:17:56Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0ffa3ef5
Parents:
991779c5
Message:

Replace old u?? types with respective C99 variants (e.g. uint32_t, int64_t, uintptr_t etc.).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/smp/smp.c

    r991779c5 r7f1c620  
    6262void smp_init(void)
    6363{
    64         __address l_apic_address, io_apic_address;
     64        uintptr_t l_apic_address, io_apic_address;
    6565
    6666        if (acpi_madt) {
     
    7373        }
    7474
    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);
    7676        if (!l_apic_address)
    7777                panic("cannot allocate address for l_apic\n");
    7878
    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);
    8080        if (!io_apic_address)
    8181                panic("cannot allocate address for io_apic\n");
    8282
    8383        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,
    8585                                  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,
    8787                                  PAGE_NOT_CACHEABLE);
    8888                                 
    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;
    9191        }
    9292}
     
    115115         * Set the warm-reset vector to the real-mode address of 4K-aligned ap_boot()
    116116         */
    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 */
    119119       
    120120        /*
     
    155155
    156156                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);
    158158                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;
    161161
    162162                if (l_apic_send_init_ipi(ops->cpu_apic_id(i))) {
Note: See TracChangeset for help on using the changeset viewer.