27.10.2015 Views

Advanced Configuration and Power Interface Specification

ACPI_6.0

ACPI_6.0

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ACPI Software Programming Model<br />

IPMI operation regions require that all field elements be declared at comm<strong>and</strong> value granularity.<br />

This means that each virtual register cannot be broken down to its individual bits within the field<br />

definition.<br />

Access to sub-portions of virtual registers can be done only outside of the field definition. This<br />

limitation is imposed both to simplify the IPMI interface <strong>and</strong> to maintain consistency with the<br />

physical model defined by the IPMI specification.<br />

Since the system interface used for IPMI communication is determined by the _IFT object under the<br />

IPMI device, there is no need for using of the AccessAs term within the field definition. In fact its<br />

usage will be ignored by the operation h<strong>and</strong>ler.<br />

For example, the register at comm<strong>and</strong> value 0xC1 for the power meter network function might<br />

represent the comm<strong>and</strong> to set a BMC enforced power limit, while the register at comm<strong>and</strong> value<br />

0xC2 for the same network function might represent the current configured power limit. At the same<br />

time, the register at comm<strong>and</strong> value 0xC8 might represent the latest power meter measurement.<br />

The following ASL code shows the use of the OperationRegion, Field, <strong>and</strong> Offset terms to represent<br />

these virtual registers:<br />

OperationRegion(POWR, IPMI, 0x3000, 0x100) // <strong>Power</strong> network function<br />

Field(POWR, BufferAcc, NoLock, Preserve)<br />

{<br />

Offset(0xC1),<br />

// Skip to comm<strong>and</strong> value 0xC1<br />

SPWL, 8,<br />

// Set power limit [comm<strong>and</strong> value 0xC1]<br />

GPWL, 8,<br />

// Get power limit [comm<strong>and</strong> value 0xC2]<br />

Offset(0xC8),<br />

// Skip to comm<strong>and</strong> value 0xC8<br />

GPMM, 8<br />

// Get power meter measurement [comm<strong>and</strong> value 0xC8]<br />

}<br />

Notice that comm<strong>and</strong> values are equivalent to the field element’s byte offset (for example,<br />

SPWL=0xC1, GPWL=0xC2, GPMM=0xC8).<br />

5.5.2.4.3.2 Declaring <strong>and</strong> Using IPMI Request <strong>and</strong> Response Buffer<br />

Since each virtual register in the IPMI operation region represents an individual IPMI comm<strong>and</strong>, <strong>and</strong><br />

the operation relies on use of bi-directional buffer, a common buffer structure is required to<br />

represent the request <strong>and</strong> response messages. The use of a data buffer for IPMI transactions allows<br />

AML to receive status <strong>and</strong> data length values.<br />

The IPMI data buffer is defined as a fixed-length 66-byte buffer that, if represented using a ‘C’-<br />

styled declaration, would be modeled as follows:<br />

typedef struct<br />

{<br />

BYTE Status;<br />

BYTE Length;<br />

BYTE[64]Data;<br />

}<br />

// Byte 0 of the data buffer<br />

// Byte 1 of the data buffer<br />

// Bytes 2 through 65 of the data buffer<br />

Where:<br />

• Status (byte 0) indicates the status code of a given IPMI comm<strong>and</strong>. See Section 5.5.2.4.3.3,<br />

“IPMI Status Code,” for more information.<br />

• Length (byte 1) specifies the number of bytes of valid data that exists in the data buffer. Valid<br />

Length values are 0 through 64. Before the operation is carried out, this value represents the<br />

Version 6.0 225

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!