Specifications
220 AMD Geode™ GeodeROM Functional Specification
System Management Mode Software
32087C
15.10 System Calls and Macros
System calls preclude the need for a VSM to access a system structure directly. However, access to system data outside a
VSM's data segment is occasionally necessary. The most common examples are fields within the SMI header and inter-
rupted process registers. Macros are provided to access (read and write) these fields, and allow the System Manager to
enforce access restrictions. For example, a VSM responding to an asynchronous event is prevented from modifying an SMI
header or trapped registers, since to do so is a programming error. Furthermore, since there may be several contexts active
due to nesting of SMIs, the System Manager ensures the correct structure instance is accessed.
All processor states associated with an interrupted context are stored either in the VSM's header or on its stack. This
design simplifies the management of multiple VSM contexts.
There are no system call functions directly accessible to the programmer. System calls are always invoked by a corre-
sponding macro. This provides the flexibility to change the implementation of a macro without changing the programming
interface. Minimally, a VSM must invoke SYS_GET_NEXT_MSG to retrieve messages. Most VSMs also invoke
SYS_REGISTER_EVENT one or more times, typically at initialization time. The other system calls are used in specialized
cases.
Table 15-2. System Calls
System Call Meaning
SYS_REGISTER_EVENT Associates an event to a VSM
SYS_UNREGISTER_EVENT Disassociates an event from a VSM
SYS_GET_NEXT_MSG Retrieves the next message from the VSM’s message queue
SYS_INSERT_MSG Inserts a message into the message queue
SYS_BROADCAST_MSG Sends a message to one or more VSMs
SYS_PASS_EVENT
1
1. Geode GX1 processor only. Not applicable to Geode GX processor or later processors.
Sends unhandled event to next registered VSM
SYS_SW_INTERRUPT Performs a software interrupt call to the system BIOS
SYS_YIELD_CONTROL Gives other VSMs a chance to run
SYS_GET_SYSTEM_INFO Gets information about the system on which the VSM is currently executing