Specifications
232 AMD Geode⢠GeodeROM Functional Specification
System Management Mode Software
32087C
15.13 Macros
In addition to the system call macros discussed in Section 15.6 on page 214, there are other macros available to the VSM
programmer. These are designed to achieve certain required functionality without the burden of understanding the imple-
mentation details. For example, if a VSM requires information from the SMM header, the method of reading the SMM
header location is CPU dependent.
Table 15-8. Macros
Macro Usage
ENTER_CRITICAL_SECTION Disable nested SMIs
EXIT_CRITICAL_SECTION Enable nested SMIs
SET_VIRTUAL_REGISTER Write a virtual register
GET_VIRTUAL_REGISTER Read a virtual register
SET_REGISTER Store a value to an interrupted general purpose register
GET_REGISTER Get a trapped general purpose register
SET_HEADER_DATA Set a field in the SMM header
GET_HEADER_DATA Get a field from the SMM header
READ_PCI_BYTE Read a BYTE from PCI configuration space
READ_PCI_WORD Read a WORD from PCI configuration space
READ_PCI_DWORD Read a DWORD from PCI configuration space
READ_PCI_DWORD_NO_TRAP Disable trapping on the PCI address, perform a PCI configuration
space read, then re-enable PCI trapping on the address.
READ_PCI_WORD_NO_TRAP
READ_PCI_BYTE_NO_TRAP
WRITE_PCI_BYTE Write a BYTE to PCI configuration space
WRITE_PCI_WORD Write a WORD to PCI configuration space
WRITE_PCI_DWORD Write a DWORD to PCI configuration space
WRITE_PCI_DWORD_NO_TRAP Disable trapping on the PCI address, perform a PCI configuration
space write, then re-enable PCI trapping on the address.
WRITE_PCI_WORD_NO_TRAP
WRITE_PCI_BYTE_NO_TRAP