acpi

package
v7.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package acpi can find and parse the RSDP pointer and struct.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRSDP

func NewRSDP(addr uintptr, len uint) []byte

NewRSDP returns a new and partially initialized RSDP, setting only the defaultRSDP values, address, length, and signature.

Types

type RSDP

type RSDP struct {
	// contains filtered or unexported fields
}

RSDP is the v2 version of the ACPI RSDP struct.

func GetRSDP

func GetRSDP() (*RSDP, error)

GetRSDP finds the RSDP pointer and struct in memory.

It is able to use several methods, because there is no consistency about how it is done.

func GetRSDPEBDA

func GetRSDPEBDA() (*RSDP, error)

GetRSDPEBDA finds the RSDP in the EBDA.

func GetRSDPEFI

func GetRSDPEFI() (*RSDP, error)

GetRSDPEFI finds the RSDP in the EFI System Table.

func GetRSDPMem

func GetRSDPMem() (*RSDP, error)

GetRSDPMem is the option of last choice, it just grovels through the e0000-ffff0 area, 16 bytes at a time, trying to find an RSDP. These are well-known addresses for 20+ years.

func (*RSDP) AllData

func (r *RSDP) AllData() []byte

AllData returns the RSDP as a []byte

func (*RSDP) Len

func (r *RSDP) Len() uint32

Len returns the RSDP length

func (*RSDP) OEMID

func (r *RSDP) OEMID() string

OEMID returns the RSDP OEMID

func (*RSDP) RSDPAddr

func (r *RSDP) RSDPAddr() uint64

RSDPAddr returns the physical base address of the RSDP.

func (*RSDP) SDTAddr

func (r *RSDP) SDTAddr() uint64

SDTAddr returns a base address or the [RX]SDT.

It will preferentially return the XSDT, but if that is 0 it will return the RSDT address.

func (*RSDP) Sig

func (r *RSDP) Sig() string

Sig returns the RSDP signature

func (*RSDP) TableData

func (r *RSDP) TableData() []byte

TableData returns the RSDP table data as a []byte

Jump to

Keyboard shortcuts

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