Check out the new USENIX Web site. next up previous
Next: Design of FreeBSD ACPI Up: ACPI Architecture Previous: Thermal Management


ACPI Component Architecture (ACPI-CA)

An ACPI-aware operating system must include code that accesses the ACPI BIOS, registers, and tables. It must also include an AML byte-code interpreter. This upper layer of core ACPI software is shown in Figure 1. Intel has implemented an OS-independent implementation of this layer of software called ACPI Component Architecture or ACPI-CA [2]. ACPI-CA is used by many open source operating systems including FreeBSD and Linux.

ACPI-CA provides a high-level ACPI API to the operating system. The OS uses this API to implement power management, device configuration, and thermal management. All fixed features and some access to AML names are wrapped by the exported function. But some ACPI-specific devices have to access ACPI namespace. The ACPI-CA API is shown in Table 1.

Table 1: ACPI-CA API
Function Class Functions
ACPI subsystem management AcpiInitializeSubsystem, AcpiEnableSubsystem, AcpiTerminate, AcpiSubsystemStatus, AcpiDisable, AcpiGetSystemInfo, AcpiFormatException, AcpiPurgeCachedObjects
memory management AcpiAllocate, AcpiFree
ACPI table management AcpiFindRootPointer, AcpiLoadTables, AcpiLoadTable, AcpiUnloadTable, AcpiGetTableHeader, AcpiGetTable AcpiGetFirmwareTable,
namespace interface AcpiWalkNamespace, AcpiGetDevices, AcpiGetName, AcpiGetHandle, AcpiAttachData, AcpiDetachData, AcpiGetData
object manipulation AcpiEvaluateObject, AcpiGetObjectInfo, AcpiGetNextObject, AcpiGetType, AcpiGetParent
event handler interface AcpiInstallFixedEventHandler, AcpiRemoveFixedEventHandler, AcpiInstallNotifyHandler, AcpiRemoveNotifyHandler, AcpiInstallAddressSpaceHandler, AcpiRemoveAddressSpaceHandler, AcpiInstallGpeHandler, AcpiAcquireGlobalLock, AcpiReleaseGlobalLock, AcpiRemoveGpeHandler, AcpiEnableEvent, AcpiDisableEvent, AcpiClearEvent, AcpiGetEventStatus,
resource interfaces AcpiGetCurrentResources, AcpiGetPossibleResources, AcpiSetCurrentResources, AcpiGetIrqRoutingTable,
hardware interface AcpiSetFirmwareWakingVector, AcpiGetFirmwareWakingVector, AcpiEnterSleepStatePrep, AcpiEnterSleepState, AcpiLeaveSleepState


Operating systems that use ACPI-CA must provide it with some basic low-level functions. Intel has implemented the low-level part for Linux. A list of these functions is shown in Table 2.

Table 2: OS functions provided to ACPI-CA
Function Class Functions
library initialization AcpiOsInitialize, AcpiOsTerminate
semaphore control AcpiOsCreateSemaphore, AcpiOsDeleteSemaphore, AcpiOsWaitSemaphore, AcpiOsSignalSemaphore
memory allocation AcpiOsAllocate, AcpiOsCallocate, AcpiOsFree, AcpiOsMapMemory, AcpiOsUnmapMemory, AcpiOsGetPhysicalAddress
interrupt control AcpiOsInstallInterruptHandler, AcpiOsRemoveInterruptHandler
process control AcpiOsGetThreadId, AcpiOsQueueForExecution, AcpiOsSleep, AcpiOsStall
device access AcpiOsReadPort, AcpiOsWritePort, AcpiOsReadMemory, AcpiOsWriteMemory, AcpiOsReadPciConfiguration, AcpiOsWritePciConfiguration, AcpiOsReadable, AcpiOsWritable
signal/timer control AcpiOsGetTimer, AcpiOsSignal
diagnostic functions AcpiOsPrintf, AcpiOsVprintf, AcpiOsGetLine, AcpiOsDbgAssert


One of the main user-visible differences between FreeBSD ACPI and Linux ACPI is the user interface. FreeBSD uses sysctl to export ACPI-related kernel variables, while Linux uses the procfs /proc filesystem to export them.


next up previous
Next: Design of FreeBSD ACPI Up: ACPI Architecture Previous: Thermal Management
Takanori Watanabe 2002-04-13