Changeset 7f1c620 in mainline for arch/ia32/src/smp/mps.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/mps.c

    r991779c5 r7f1c620  
    5656#define CT_SIGNATURE    0x504d4350
    5757
    58 int mps_fs_check(__u8 *base);
     58int mps_fs_check(uint8_t *base);
    5959int mps_ct_check(void);
    6060
    6161int configure_via_ct(void);
    62 int configure_via_default(__u8 n);
     62int configure_via_default(uint8_t n);
    6363
    6464int ct_processor_entry(struct __processor_entry *pr);
     
    9393static bool is_cpu_enabled(index_t i);
    9494static bool is_bsp(index_t i);
    95 static __u8 get_cpu_apic_id(index_t i);
     95static uint8_t get_cpu_apic_id(index_t i);
    9696static int mps_irq_to_pin(int irq);
    9797
     
    121121}
    122122
    123 __u8 get_cpu_apic_id(index_t i)
     123uint8_t get_cpu_apic_id(index_t i)
    124124{
    125125        ASSERT(i < processor_entry_cnt);
     
    131131 * Used to check the integrity of the MP Floating Structure.
    132132 */
    133 int mps_fs_check(__u8 *base)
     133int mps_fs_check(uint8_t *base)
    134134{
    135135        int i;
    136         __u8 sum;
     136        uint8_t sum;
    137137       
    138138        for (i = 0, sum = 0; i < 16; i++)
     
    147147int mps_ct_check(void)
    148148{
    149         __u8 *base = (__u8 *) ct;
    150         __u8 *ext = base + ct->base_table_length;
    151         __u8 sum;
     149        uint8_t *base = (uint8_t *) ct;
     150        uint8_t *ext = base + ct->base_table_length;
     151        uint8_t sum;
    152152        int i; 
    153153       
     
    168168void mps_init(void)
    169169{
    170         __u8 *addr[2] = { NULL, (__u8 *) PA2KA(0xf0000) };
     170        uint8_t *addr[2] = { NULL, (uint8_t *) PA2KA(0xf0000) };
    171171        int i, j, length[2] = { 1024, 64*1024 };
    172172       
     
    179179         */
    180180
    181         addr[0] = (__u8 *) PA2KA(ebda ? ebda : 639 * 1024);
     181        addr[0] = (uint8_t *) PA2KA(ebda ? ebda : 639 * 1024);
    182182        for (i = 0; i < 2; i++) {
    183183                for (j = 0; j < length[i]; j += 16) {
    184                         if (*((__u32 *) &addr[i][j]) == FS_SIGNATURE && mps_fs_check(&addr[i][j])) {
     184                        if (*((uint32_t *) &addr[i][j]) == FS_SIGNATURE && mps_fs_check(&addr[i][j])) {
    185185                                fs = (struct mps_fs *) &addr[i][j];
    186186                                goto fs_found;
     
    200200                }
    201201
    202                 ct = (struct mps_ct *)PA2KA((__address)fs->configuration_table);
     202                ct = (struct mps_ct *)PA2KA((uintptr_t)fs->configuration_table);
    203203                config.cpu_count = configure_via_ct();
    204204        }
     
    211211int configure_via_ct(void)
    212212{
    213         __u8 *cur;
     213        uint8_t *cur;
    214214        int i, cnt;
    215215               
     
    227227        }
    228228       
    229         l_apic = (__u32 *)(__address)ct->l_apic;
     229        l_apic = (uint32_t *)(uintptr_t)ct->l_apic;
    230230
    231231        cnt = 0;
     
    290290}
    291291
    292 int configure_via_default(__u8 n)
     292int configure_via_default(uint8_t n)
    293293{
    294294        /*
     
    337337        }
    338338       
    339         io_apic = (__u32 *)(__address)ioa->io_apic;
     339        io_apic = (uint32_t *)(uintptr_t)ioa->io_apic;
    340340}
    341341
     
    405405void ct_extended_entries(void)
    406406{
    407         __u8 *ext = (__u8 *) ct + ct->base_table_length;
    408         __u8 *cur;
     407        uint8_t *ext = (uint8_t *) ct + ct->base_table_length;
     408        uint8_t *cur;
    409409
    410410        for (cur = ext; cur < ext + ct->ext_table_length; cur += cur[CT_EXT_ENTRY_LEN]) {
Note: See TracChangeset for help on using the changeset viewer.