Changes in kernel/arch/ia32/src/smp/apic.c [99718a2e:214ec25c] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/smp/apic.c
r99718a2e r214ec25c 76 76 77 77 uint32_t apic_id_mask = 0; 78 uint8_t bsp_l_apic = 0;79 80 78 static irq_t l_apic_timer_irq; 81 79 … … 156 154 } 157 155 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 171 156 /** Initialize APIC on BSP. */ 172 157 void apic_init(void) … … 223 208 l_apic_init(); 224 209 l_apic_debug(); 225 226 bsp_l_apic = l_apic_id();227 210 } 228 211 … … 477 460 { 478 461 #ifdef LAPIC_VERBOSE 479 printf("LVT on cpu%" PRIs ", LAPIC ID: %" PRIu8 "\n", 480 CPU->id, l_apic_id()); 462 printf("LVT on cpu%" PRIs ", LAPIC ID: %" PRIu8 "\n", CPU->id, l_apic_id()); 481 463 482 464 lvt_tm_t tm; 483 465 tm.value = l_apic[LVT_Tm]; 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]); 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]); 487 467 488 468 lvt_lint_t lint; 489 469 lint.value = l_apic[LVT_LINT0]; 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]); 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]); 500 473 501 474 lvt_error_t error; 502 475 error.value = l_apic[LVT_Err]; 503 printf("LVT Err: vector=%" PRIu8 ", %s, %s\n", error.vector, 504 delivs_str[error.delivs], mask_str[error.masked]); 476 printf("LVT Err: vector=%hhd, %s, %s\n", error.vector, delivs_str[error.delivs], mask_str[error.masked]); 505 477 #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; 506 491 } 507 492
Note:
See TracChangeset
for help on using the changeset viewer.