APIC: Difference between revisions

Jump to navigation Jump to search
18 bytes added ,  29 days ago
m
Bot: Replace deprecated source tag with syntaxhighlight
[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:
 
<sourcesyntaxhighlight lang="c">
uint32_t cpuReadIoApic(void *ioapicaddr, uint32_t reg)
{
Line 348:
ioapic[4] = value;
}
</syntaxhighlight>
</source>
 
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&trade;. The volatile keyword is put before the '*' sign. It means that the ''value pointed to'' is volatile, not the pointer itself.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu