Changeset 99718a2e in mainline for kernel/arch/ia32/src/smp/apic.c
- Timestamp:
- 2010-06-30T20:42:42Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 873c681
- Parents:
- 50f4b95
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/smp/apic.c
r50f4b95 r99718a2e 76 76 77 77 uint32_t apic_id_mask = 0; 78 uint8_t bsp_l_apic = 0; 79 78 80 static irq_t l_apic_timer_irq; 79 81 … … 154 156 } 155 157 158 /** Get Local APIC ID. 159 * 160 * @return Local APIC ID. 161 * 162 */ 163 static uint8_t l_apic_id(void) 164 { 165 l_apic_id_t idreg; 166 167 idreg.value = l_apic[L_APIC_ID]; 168 return idreg.apic_id; 169 } 170 156 171 /** Initialize APIC on BSP. */ 157 172 void apic_init(void) … … 208 223 l_apic_init(); 209 224 l_apic_debug(); 225 226 bsp_l_apic = l_apic_id(); 210 227 } 211 228 … … 460 477 { 461 478 #ifdef LAPIC_VERBOSE 462 printf("LVT on cpu%" PRIs ", LAPIC ID: %" PRIu8 "\n", CPU->id, l_apic_id()); 479 printf("LVT on cpu%" PRIs ", LAPIC ID: %" PRIu8 "\n", 480 CPU->id, l_apic_id()); 463 481 464 482 lvt_tm_t tm; 465 483 tm.value = l_apic[LVT_Tm]; 466 printf("LVT Tm: vector=%hhd, %s, %s, %s\n", tm.vector, delivs_str[tm.delivs], mask_str[tm.masked], tm_mode_str[tm.mode]); 484 printf("LVT Tm: vector=%" PRIu8 ", %s, %s, %s\n", 485 tm.vector, delivs_str[tm.delivs], mask_str[tm.masked], 486 tm_mode_str[tm.mode]); 467 487 468 488 lvt_lint_t lint; 469 489 lint.value = l_apic[LVT_LINT0]; 470 printf("LVT LINT0: vector=%hhd, %s, %s, %s, irr=%d, %s, %s\n", tm.vector, delmod_str[lint.delmod], delivs_str[lint.delivs], intpol_str[lint.intpol], lint.irr, trigmod_str[lint.trigger_mode], mask_str[lint.masked]); 471 lint.value = l_apic[LVT_LINT1]; 472 printf("LVT LINT1: vector=%hhd, %s, %s, %s, irr=%d, %s, %s\n", tm.vector, delmod_str[lint.delmod], delivs_str[lint.delivs], intpol_str[lint.intpol], lint.irr, trigmod_str[lint.trigger_mode], mask_str[lint.masked]); 490 printf("LVT LINT0: vector=%" PRIu8 ", %s, %s, %s, irr=%u, %s, %s\n", 491 tm.vector, delmod_str[lint.delmod], delivs_str[lint.delivs], 492 intpol_str[lint.intpol], lint.irr, trigmod_str[lint.trigger_mode], 493 mask_str[lint.masked]); 494 495 lint.value = l_apic[LVT_LINT1]; 496 printf("LVT LINT1: vector=%" PRIu8 ", %s, %s, %s, irr=%u, %s, %s\n", 497 tm.vector, delmod_str[lint.delmod], delivs_str[lint.delivs], 498 intpol_str[lint.intpol], lint.irr, trigmod_str[lint.trigger_mode], 499 mask_str[lint.masked]); 473 500 474 501 lvt_error_t error; 475 502 error.value = l_apic[LVT_Err]; 476 printf("LVT Err: vector=%hhd, %s, %s\n", error.vector, delivs_str[error.delivs], mask_str[error.masked]); 503 printf("LVT Err: vector=%" PRIu8 ", %s, %s\n", error.vector, 504 delivs_str[error.delivs], mask_str[error.masked]); 477 505 #endif 478 }479 480 /** Get Local APIC ID.481 *482 * @return Local APIC ID.483 *484 */485 uint8_t l_apic_id(void)486 {487 l_apic_id_t idreg;488 489 idreg.value = l_apic[L_APIC_ID];490 return idreg.apic_id;491 506 } 492 507
Note:
See TracChangeset
for help on using the changeset viewer.