Home |
RTTarget-32 Programming Manual System Management BIOS (SMBIOS) Advanced Programmable Interrupt Controller (APIC) Function RTMPTableCreate Function RTMPTablePCIInterrupt |
Function RTMPTableCreateRTMPTableCreate creates a custom "MP Floating Pointer Structure" from which all required data about installed CPUs, I/O APICs, buses, and the APIC mode interrupt routing is read. A custom MP Floating Pointer Structure may be required if the BIOS does not provide such a structure or the BIOS' structure contains errors. Details about building a custom MP Floating Pointer Structure as well as a complete example are given in section Custom MP Floating Pointer Structure in the RTTarget-32 Programming Manual. void RTMPTableCreate(void * TableBuffer, UINT TableSize, DWORD LocalApicAddress, DWORD Flags); ParametersTableBufferPointer to a buffer in which the table will be built. The buffer should be statically or heap allocated and must not be deallocated before the program terminates. The required size of the buffer is 60 + c*20 + A*8 + b*8 + i*8, where c, A, b, and i are the number of CPUs, I/O APICs, buses, and interrupt routings the table will contain. A typical table for a multi-core system with 1 I/O APIC, 5 busses and 20 interrupts would need 240 bytes. A size of 1024 bytes will be sufficient even for very complex systems. TableSizeSize of the buffer pointed to by parameter TableBuffer. LocalApicAddressThe address in the physical address space of the local APIC on all CPUs. If set to zero (recommended), the address is read from a CPU MSR register. If the CPU does not support the IA32_APIC_BASE_MSR register, address 0xFEE00000 is assumed. FlagsZero or a combination of the following flag values:
A custom MP Floating Pointer Structure must be created and populated before the program attempts to query the number of installed CPUs with RTMPCPUs or enter APIC mode. The created table is initially empty. After creation, call functions RTMPTableCPUEx, RTMPTableIOAPIC, RTMPTableBus, RTMPTableInterrupt, and RTMPTablePCIInterrupt to add all required table entries.
|