Changeset 7f1c620 in mainline for arch/ia32/src/smp/mps.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/mps.c
r991779c5 r7f1c620 56 56 #define CT_SIGNATURE 0x504d4350 57 57 58 int mps_fs_check( __u8*base);58 int mps_fs_check(uint8_t *base); 59 59 int mps_ct_check(void); 60 60 61 61 int configure_via_ct(void); 62 int configure_via_default( __u8n);62 int configure_via_default(uint8_t n); 63 63 64 64 int ct_processor_entry(struct __processor_entry *pr); … … 93 93 static bool is_cpu_enabled(index_t i); 94 94 static bool is_bsp(index_t i); 95 static __u8get_cpu_apic_id(index_t i);95 static uint8_t get_cpu_apic_id(index_t i); 96 96 static int mps_irq_to_pin(int irq); 97 97 … … 121 121 } 122 122 123 __u8get_cpu_apic_id(index_t i)123 uint8_t get_cpu_apic_id(index_t i) 124 124 { 125 125 ASSERT(i < processor_entry_cnt); … … 131 131 * Used to check the integrity of the MP Floating Structure. 132 132 */ 133 int mps_fs_check( __u8*base)133 int mps_fs_check(uint8_t *base) 134 134 { 135 135 int i; 136 __u8sum;136 uint8_t sum; 137 137 138 138 for (i = 0, sum = 0; i < 16; i++) … … 147 147 int mps_ct_check(void) 148 148 { 149 __u8 *base = (__u8*) ct;150 __u8*ext = base + ct->base_table_length;151 __u8sum;149 uint8_t *base = (uint8_t *) ct; 150 uint8_t *ext = base + ct->base_table_length; 151 uint8_t sum; 152 152 int i; 153 153 … … 168 168 void mps_init(void) 169 169 { 170 __u8 *addr[2] = { NULL, (__u8*) PA2KA(0xf0000) };170 uint8_t *addr[2] = { NULL, (uint8_t *) PA2KA(0xf0000) }; 171 171 int i, j, length[2] = { 1024, 64*1024 }; 172 172 … … 179 179 */ 180 180 181 addr[0] = ( __u8*) PA2KA(ebda ? ebda : 639 * 1024);181 addr[0] = (uint8_t *) PA2KA(ebda ? ebda : 639 * 1024); 182 182 for (i = 0; i < 2; i++) { 183 183 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])) { 185 185 fs = (struct mps_fs *) &addr[i][j]; 186 186 goto fs_found; … … 200 200 } 201 201 202 ct = (struct mps_ct *)PA2KA(( __address)fs->configuration_table);202 ct = (struct mps_ct *)PA2KA((uintptr_t)fs->configuration_table); 203 203 config.cpu_count = configure_via_ct(); 204 204 } … … 211 211 int configure_via_ct(void) 212 212 { 213 __u8*cur;213 uint8_t *cur; 214 214 int i, cnt; 215 215 … … 227 227 } 228 228 229 l_apic = ( __u32 *)(__address)ct->l_apic;229 l_apic = (uint32_t *)(uintptr_t)ct->l_apic; 230 230 231 231 cnt = 0; … … 290 290 } 291 291 292 int configure_via_default( __u8n)292 int configure_via_default(uint8_t n) 293 293 { 294 294 /* … … 337 337 } 338 338 339 io_apic = ( __u32 *)(__address)ioa->io_apic;339 io_apic = (uint32_t *)(uintptr_t)ioa->io_apic; 340 340 } 341 341 … … 405 405 void ct_extended_entries(void) 406 406 { 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; 409 409 410 410 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.