Specifications

AMD Geode™ GeodeROM Functional Specification 223
System Management Mode Software
32087C
15.10.2 SYS_UNREGISTER_EVENT
The SYS_UNREGISTER_EVENT macro cancels a prior event registration. The parameters passed are the same values
passed when the event was registered. See Table 15-3 on page 221.
Parameter0: Event Code
Parameter1: Dependent on the event
Parameter2: Dependent on the event
15.10.3 SYS_GET_NEXT_MSG
The SYS_GET_NEXT_MSG macro retrieves the next message from a VSM's message queue. The macro returns an
unsigned short message code. The macro takes one argument, a buffer to receive the message parameters. The parame-
ter buffer address must be relative to the DS segment. Therefore, the buffer must not be a local variable, unless the VSM's
memory model is such that DS = SS.
If the message queue is empty, the macro returns control to the System Manager. The VSM regains control when there is a
new message in its message queue.
No Parameters
Example of usage:
unsigned short Message;
unsigned long Params[6]; Message = SYS_GET_NEXT_MSG(&Params);
15.10.4 SYS_BROADCAST_MSG
The SYS_BROADCAST_MSG macro inserts a message into one or more VSM message queue(s). Parameter2 specifies
the type of VSM into whose message queue the message is inserted. If there are multiple VSMs of that type, the highest
priority VSM receives the message. If that VSM chooses not to handle the message, it may invoke SYS_PASS_EVENT (in
the Geode GX1 processor only) to notify the next highest priority VSM. A special type VSM, VSM_ANY, specifies that the
message is to be sent to all VSMs. This system call is typically used to notify VSMs of a change in the system state, such
as power management level or an imminent warm/cold boot. The other main usage is to instruct VSMs to save state in
preparation for a Suspend-to-Disk.
Parameter0: Message code
Parameter1: Offset of parameter buffer
Parameter2: VSM type
Example of usage:
// Tell all VSMs to save the state of their associated hardware.
SYS_BROADCAST_MSG(MSG_SAVE_STATE, &ParamsBuffer, VSM_ANY);
15.10.5 SYS_PASS_EVENT (Geode GX1 processor only)
In the Geode GX1 processor, if an event retrieved from the message queue is not handled by a VSM, SYS_PASS_EVENT
instructs the System Manager to pass the event along to the next VSM that registered for this event. This scenario typically
occurs when multiple VSMs register for the same event. When that event occurs, the VSM polls a status register and deter-
mines if the event is for that VSM. If not, the VSM should pass the event in order to give other VSMs an opportunity to han-
dle the event. If a VSM fails to do so, the event is effectively ignored, which may result in unintended behavior.
Parameter0: Event Code
Parameter1: Original parameter1 from message
Parameter2: Original parameter2 from message
Parameter3: Original parameter3 from message
Example of usage:
SYS_PASS_EVENT(MSG_IO_TRAP, Param1, Param2, Param3);