Changeset 7f043c0 in mainline for kernel/arch/ia32/src/smp/mps.c
- Timestamp:
- 2007-05-31T21:39:13Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7bb0c32
- Parents:
- d8431986
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/smp/mps.c
rd8431986 r7f043c0 55 55 #define CT_SIGNATURE 0x504d4350 56 56 57 int mps_fs_check(uint8_t *base);58 int mps_ct_check(void);59 60 int configure_via_ct(void);61 int configure_via_default(uint8_t n);62 63 int ct_processor_entry(struct __processor_entry *pr);64 void ct_bus_entry(struct __bus_entry *bus);65 void ct_io_apic_entry(struct __io_apic_entry *ioa);66 void ct_io_intr_entry(struct __io_intr_entry *iointr);67 void ct_l_intr_entry(struct __l_intr_entry *lintr);68 69 void ct_extended_entries(void);57 static int mps_fs_check(uint8_t *base); 58 static int mps_ct_check(void); 59 60 static int configure_via_ct(void); 61 static int configure_via_default(uint8_t n); 62 63 static int ct_processor_entry(struct __processor_entry *pr); 64 static void ct_bus_entry(struct __bus_entry *bus); 65 static void ct_io_apic_entry(struct __io_apic_entry *ioa); 66 static void ct_io_intr_entry(struct __io_intr_entry *iointr); 67 static void ct_l_intr_entry(struct __l_intr_entry *lintr); 68 69 static void ct_extended_entries(void); 70 70 71 71 static struct mps_fs *fs; … … 109 109 { 110 110 ASSERT(i < processor_entry_cnt); 111 return processor_entries[i].cpu_flags & 0x1;111 return (bool) ((processor_entries[i].cpu_flags & 0x01) == 0x01); 112 112 } 113 113 … … 115 115 { 116 116 ASSERT(i < processor_entry_cnt); 117 return processor_entries[i].cpu_flags & 0x2;117 return (bool) ((processor_entries[i].cpu_flags & 0x02) == 0x02); 118 118 } 119 119 … … 134 134 135 135 for (i = 0, sum = 0; i < 16; i++) 136 sum += base[i];136 sum = (uint8_t) (sum + base[i]); 137 137 138 138 return !sum; … … 151 151 /* count the checksum for the base table */ 152 152 for (i=0,sum=0; i < ct->base_table_length; i++) 153 sum += base[i];153 sum = (uint8_t) (sum + base[i]); 154 154 155 155 if (sum) … … 158 158 /* count the checksum for the extended table */ 159 159 for (i=0,sum=0; i < ct->ext_table_length; i++) 160 sum += ext[i];160 sum = (uint8_t) (sum + ext[i]); 161 161 162 162 return sum == ct->ext_table_checksum; … … 287 287 } 288 288 289 int configure_via_default(uint8_t n )289 int configure_via_default(uint8_t n __attribute__((unused))) 290 290 { 291 291 /* … … 297 297 298 298 299 int ct_processor_entry(struct __processor_entry *pr )299 int ct_processor_entry(struct __processor_entry *pr __attribute__((unused))) 300 300 { 301 301 /* … … 309 309 } 310 310 311 void ct_bus_entry(struct __bus_entry *bus )311 void ct_bus_entry(struct __bus_entry *bus __attribute__((unused))) 312 312 { 313 313 #ifdef MPSCT_VERBOSE … … 338 338 339 339 //#define MPSCT_VERBOSE 340 void ct_io_intr_entry(struct __io_intr_entry *iointr )340 void ct_io_intr_entry(struct __io_intr_entry *iointr __attribute__((unused))) 341 341 { 342 342 #ifdef MPSCT_VERBOSE … … 369 369 } 370 370 371 void ct_l_intr_entry(struct __l_intr_entry *lintr )371 void ct_l_intr_entry(struct __l_intr_entry *lintr __attribute__((unused))) 372 372 { 373 373 #ifdef MPSCT_VERBOSE
Note:
See TracChangeset
for help on using the changeset viewer.