Read APIC register
Posted: Wed Mar 05, 2008 1:39 pm
APIC registers are 64-bits. I'm trying to read them on a 32-bit machine.
I first tried to let gcc deal with "unsigned long long" types, but the generated code does 2 32-bits reads. Say I want to read register at addres A, the code reads 32 bits at A and 32 bits at A+4, which is invalid for reading an APIC register (misaligned read).
So I tried to read with the "movq" instruction, but bochs gives an error "read spans 32-bits boundary" (sic).
So, must I assume that only the lower 32-bits of each APIC register can be read on a 32-bits machine ?
I first tried to let gcc deal with "unsigned long long" types, but the generated code does 2 32-bits reads. Say I want to read register at addres A, the code reads 32 bits at A and 32 bits at A+4, which is invalid for reading an APIC register (misaligned read).
So I tried to read with the "movq" instruction, but bochs gives an error "read spans 32-bits boundary" (sic).
So, must I assume that only the lower 32-bits of each APIC register can be read on a 32-bits machine ?