972
edits
[unchecked revision] | [unchecked revision] |
m (Fix typo.) |
m (Bot: Replace deprecated source tag with syntaxhighlight) |
||
Line 334:
IOAPICBASE+0x10. All accesses must be done on 4 byte boundaries. The address register uses the bottom 8 bits for register select. Here is some example code that illustrates this:
<
uint32_t cpuReadIoApic(void *ioapicaddr, uint32_t reg)
{
Line 348:
ioapic[4] = value;
}
</syntaxhighlight>
Note the use of the [[volatile (keyword)|volatile]] keyword. This prevents a compiler like [[Visual C]] from reordering or optimizing away the memory accesses, which would be a Bad Thing™. The volatile keyword is put before the '*' sign. It means that the ''value pointed to'' is volatile, not the pointer itself.
|