Version: v0.0.0-...-1a7aca4 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2018 License: MIT Imports: 0 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type AddressSpace

type AddressSpace uint8

AddressSpace defines the location where a set of registers resides.

const (
	AddressSpaceSysMemory AddressSpace = iota
	AddressSpaceFuncFixedHW = 0x7f

The list of supported address space types.

type ExtRSDPDescriptor

type ExtRSDPDescriptor struct {

	// The size of the 64-bit root system descriptor table.
	Length uint32

	// Physical address of 64-bit root system descriptor table.
	XSDTAddr uint64

	// A value that when added to the sum of all other bytes contained in
	// this descriptor should result in the value 0.
	ExtendedChecksum uint8
	// contains filtered or unexported fields

ExtRSDPDescriptor extends RSDPDescriptor with additional fields. It is used when RSDPDescriptor.revision > 1.

type FADT

type FADT struct {

	FirmwareCtrl uint32
	Dsdt         uint32

	PreferredPowerManagementProfile PowerProfileType
	SCIInterrupt                    uint16
	SMICommandPort                  uint32
	AcpiEnable                      uint8
	AcpiDisable                     uint8
	S4BIOSReq                       uint8
	PSTATEControl                   uint8
	PM1aEventBlock                  uint32
	PM1bEventBlock                  uint32
	PM1aControlBlock                uint32
	PM1bControlBlock                uint32
	PM2ControlBlock                 uint32
	PMTimerBlock                    uint32
	GPE0Block                       uint32
	GPE1Block                       uint32
	PM1EventLength                  uint8
	PM1ControlLength                uint8
	PM2ControlLength                uint8
	PMTimerLength                   uint8
	GPE0Length                      uint8
	GPE1Length                      uint8
	GPE1Base                        uint8
	CStateControl                   uint8
	WorstC2Latency                  uint16
	WorstC3Latency                  uint16
	FlushSize                       uint16
	FlushStride                     uint16
	DutyOffset                      uint8
	DutyWidth                       uint8
	DayAlarm                        uint8
	MonthAlarm                      uint8
	Century                         uint8

	// Reserved in ACPI 1.0; used since ACPI 2.0+
	BootArchitectureFlags uint16

	Flags uint32

	ResetReg GenericAddress

	ResetValue uint8

	// 64-bit pointers to the above structures used by ACPI 2.0+
	Ext FADT64
	// contains filtered or unexported fields

FADT (Fixed ACPI Description Table) is an ACPI table containing information about fixed register blocks used for power management.

type FADT64

type FADT64 struct {
	FirmwareControl uint64

	Dsdt uint64

	PM1aEventBlock   GenericAddress
	PM1bEventBlock   GenericAddress
	PM1aControlBlock GenericAddress
	PM1bControlBlock GenericAddress
	PM2ControlBlock  GenericAddress
	PMTimerBlock     GenericAddress
	GPE0Block        GenericAddress
	GPE1Block        GenericAddress

FADT64 contains the 64-bit FADT extensions which are used by ACPI2+

type GenericAddress

type GenericAddress struct {
	Space      AddressSpace
	BitWidth   uint8
	BitOffset  uint8
	AccessSize uint8
	Address    uint64

GenericAddress specifies a register range located in a particular address space.

type MADT

type MADT struct {

	LocalControllerAddress uint32
	Flags                  uint32

MADT (Multiple APIC Description Table) is an ACPI table containing information about the interrupt controllers and the number of installed CPUs. Following the table header are a series of variable sized records (MADTEntry) which contain additional information.

type MADTEntry

type MADTEntry struct {
	Type   MADTEntryType
	Length uint8

MADTEntry describes a MADT table entry that follows the MADT definition. As MADT entries are variable sized records, this struct works as a union. The consumer of this struct must check the type value before accessing the union values.


type MADTEntryIOAPIC struct {
	APICID uint8

	// Address contains the address of the controller.
	Address uint32

	// SysInterruptBase defines the first interrupt number that this
	// controller handles.
	SysInterruptBase uint32
	// contains filtered or unexported fields

MADTEntryIOAPIC describes an I/O Advanced Programmable Interrupt Controller.

type MADTEntryInterruptSrcOverride

type MADTEntryInterruptSrcOverride struct {
	BusSrc          uint8
	IRQSrc          uint8
	GlobalInterrupt uint32
	Flags           uint16

MADTEntryInterruptSrcOverride contains the data for an Interrupt Source Override. This mechanism is used to map IRQ sources to global system interrupts.

type MADTEntryLocalAPIC

type MADTEntryLocalAPIC struct {
	ProcessorID uint8
	APICID      uint8
	Flags       uint32

MADTEntryLocalAPIC describes a single physical processor and its local interrupt controller.

type MADTEntryNMI

type MADTEntryNMI struct {
	// Processor specifies the local APIC that we need to configure for
	// this NMI. If set to 0xff we need to configure all processor APICs.
	Processor uint8

	Flags uint16

	// This value will be either 0 or 1 and specifies which entry in the
	// local vector table of the processor's local APIC we need to setup.
	LINT uint8

MADTEntryNMI describes a non-maskable interrupt that we need to set up for a single processor or all processors.

type MADTEntryType

type MADTEntryType uint8

MADTEntryType describes the type of a MADT record.

const (
	MADTEntryTypeLocalAPIC MADTEntryType = iota

The list of supported MADT entry types.

type PowerProfileType

type PowerProfileType uint8

PowerProfileType describes a power profile referenced by the FADT table.

const (
	PowerProfileUnspecified PowerProfileType = iota

The list of supported power profile types

type RSDPDescriptor

type RSDPDescriptor struct {
	// The signature must contain "RSD PTR " (last byte is a space).
	Signature [8]byte

	// A value that when added to the sum of all other bytes contained in
	// this descriptor should result in the value 0.
	Checksum uint8

	OEMID [6]byte

	// ACPI revision number. It is 0 for ACPI1.0 and 2 for versions 2.0 to 6.2.
	Revision uint8

	// Physical address of 32-bit root system descriptor table.
	RSDTAddr uint32

RSDPDescriptor defines the root system descriptor pointer for ACPI 1.0. This is used as the entry-point for parsing ACPI data.

type Resolver

type Resolver interface {
	LookupTable(string) *SDTHeader

Resolver is an interface implemented by objects that can lookup an ACPI table by its name.

LookupTable attempts to locate a table by name returning back a pointer to its standard header or nil if the table could not be found. The resolver must make sure that the entire table contents are mapped so they can be accessed by the caller.

type SDTHeader

type SDTHeader struct {
	// The signature defines the table type.
	Signature [4]byte

	// The length of the table
	Length uint32

	// If this header belongs to a DSDT/SSDT table, the revision is also
	// used to indicate whether the AML VM should treat integers as 32-bits
	// (revision < 2) or 64-bits (revision >= 2).
	Revision uint8

	// A value that when added to the sum of all other bytes in the table
	// should result in the value 0.
	Checksum uint8

	// OEM specific information
	OEMID       [6]byte
	OEMTableID  [8]byte
	OEMRevision uint32

	// Information about the ASL compiler that generated this table
	CreatorID       uint32
	CreatorRevision uint32

SDTHeader defines the common header for all ACPI-related tables.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL