x86: apic - unify verify_local_APIC
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
64e474d168
commit
c93baa1ae5
1 changed files with 6 additions and 0 deletions
|
@ -878,6 +878,12 @@ int __init verify_local_APIC(void)
|
||||||
*/
|
*/
|
||||||
reg0 = apic_read(APIC_ID);
|
reg0 = apic_read(APIC_ID);
|
||||||
apic_printk(APIC_DEBUG, "Getting ID: %x\n", reg0);
|
apic_printk(APIC_DEBUG, "Getting ID: %x\n", reg0);
|
||||||
|
apic_write(APIC_ID, reg0 ^ APIC_ID_MASK);
|
||||||
|
reg1 = apic_read(APIC_ID);
|
||||||
|
apic_printk(APIC_DEBUG, "Getting ID: %x\n", reg1);
|
||||||
|
apic_write(APIC_ID, reg0);
|
||||||
|
if (reg1 != (reg0 ^ APIC_ID_MASK))
|
||||||
|
return 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The next two are just to see if we have sane values.
|
* The next two are just to see if we have sane values.
|
||||||
|
|
Loading…
Add table
Reference in a new issue