Module aml

Source

MacrosΒ§

binary_op πŸ”’
compare_op πŸ”’
convert_op πŸ”’
object_op πŸ”’

StructsΒ§

Acquire
Acquire object with a Mutex object and timeout value.
Add
General operation object with the operator a/b and a target.
AddressSpace
AddressSpace structure with type, resouce range and flags to construct Memory/IO/BusNumber objects
And
General operation object with the operator a/b and a target.
Arg
Argx object.
BufferData
Buffer object with the data in it.
BufferTerm
Buffer object with the TermArg in it.
Concat
General operation object with the operator a/b and a target.
ConcatRes
General operation object with the operator a/b and a target.
CreateDWordField
General operation object with the operator a/b and a target.
CreateField
Create Field Object.
CreateQWordField
General operation object with the operator a/b and a target.
DeRefOf
General operation on a object.
Device
Device object with its device name and children objects in it.
EISAName
EISAName object. β€˜value’ means the encoded u32 EisaIdString.
Else
Else object
Equal
Compare object with its right part and left part, which are both ACPI Object.
Field
Field object with the region name, field entries, access type and update rules.
GreaterEqual
Compare object with its right part and left part, which are both ACPI Object.
GreaterThan
Compare object with its right part and left part, which are both ACPI Object.
IO
IO resouce object with the IO range, alignment and length
If
If object with the if condition(predicate) and the body presented by the if_children objects.
Index
General operation object with the operator a/b and a target.
Interrupt
Interrupt resouce object with the interrupt characters.
LessEqual
Compare object with its right part and left part, which are both ACPI Object.
LessThan
Compare object with its right part and left part, which are both ACPI Object.
Local
Localx object.
Memory32Fixed
Memory32Fixed object with read_write accessing type, and the base address/length.
Method
Method object with its name, children objects, arguments and serialized character.
MethodCall
MethodCall object with the method name and parameter objects.
Mid
Mid object with the source, index, length, and result objects.
Mod
General operation object with the operator a/b and a target.
Multiply
General operation object with the operator a/b and a target.
Mutex
Mutex object with a mutex name and a synchronization level.
Name
Name object. bytes represents the raw AML data for it.
Nand
General operation object with the operator a/b and a target.
Nor
General operation object with the operator a/b and a target.
NotEqual
Compare object with its right part and left part, which are both ACPI Object.
Notify
Notify object with an object which is to be notified with the value.
ObjectType
General operation on a object.
One
Ones
OpRegion
OperationRegion object with region name, region space type, its offset and length.
Or
General operation object with the operator a/b and a target.
Package
Package object. β€˜children’ represents the ACPI objects contained in this package.
Path
Represents Namestring to construct ACPI objects like Name/Device/Method/Scope and so on…
PowerResource
Power Resource object. β€˜children’ represents Power Resource method.
Release
Release object with a Mutex object to release.
ResourceTemplate
ResouceTemplate object. β€˜children’ represents the ACPI objects in it.
Return
General operation on a object.
Scope
Scope object with its name and children objects in it.
ShiftLeft
General operation object with the operator a/b and a target.
ShiftRight
General operation object with the operator a/b and a target.
SizeOf
General operation on a object.
Store
Store object with the ACPI object name which can be stored to and the ACPI object value which is to store.
Subtract
General operation object with the operator a/b and a target.
ToBuffer
General operation object with the operator a/b and a target.
ToInteger
General operation object with the operator a/b and a target.
ToString
General operation object with the operator a/b and a target.
Uuid
VarPackageTerm
Variable Package Term
While
While object with the while condition objects(predicate) and the while body objects(while_children).
Xor
General operation object with the operator a/b and a target.
Zero

EnumsΒ§

AddressSpaceCachable
AddressSpaceCachable represent cache types for AddressSpace object
AddressSpaceType πŸ”’
FieldAccessType
FieldAccessType defines the field accessing types.
FieldEntry
FieldEntry defines the field entry.
FieldLockRule
FieldLockRule defines the rules whether to use the Global Lock.
FieldUpdateRule
FieldUpdateRule defines the rules to update the field.
OpRegionSpace
The space type for OperationRegion object

ConstantsΒ§

ACQUIREOP πŸ”’
ADDOP πŸ”’
ANDOP πŸ”’
ARG0OP πŸ”’
BUFFEROP πŸ”’
BYTEPREFIX πŸ”’
CONCATOP πŸ”’
CONCATRESOP πŸ”’
CREATEDWFIELDOP πŸ”’
CREATEFIELDOP πŸ”’
CREATEQWFIELDOP πŸ”’
DEREFOFOP πŸ”’
DEVICEOP πŸ”’
DUALNAMEPREFIX πŸ”’
DWORDADDRSPACEDESC πŸ”’
DWORDPREFIX πŸ”’
ELSEOP πŸ”’
ENDTAG πŸ”’
EXTIRQDESC πŸ”’
EXTOPPREFIX πŸ”’
FIELDOP πŸ”’
IFOP πŸ”’
INDEXOP πŸ”’
IOPORTDESC πŸ”’
LEQUALOP πŸ”’
LGREATEROP πŸ”’
LLESSOP πŸ”’
LNOTOP πŸ”’
LOCAL0OP πŸ”’
MEMORY32FIXEDDESC πŸ”’
METHODOP πŸ”’
MIDOP πŸ”’
MODOP πŸ”’
MULTINAMEPREFIX πŸ”’
MULTIPLYOP πŸ”’
MUTEXOP πŸ”’
NAMECHARBASE πŸ”’
NAMEOP πŸ”’
NANDOP πŸ”’
NOROP πŸ”’
NOTIFYOP πŸ”’
OBJECTTYPEOP πŸ”’
ONE
One object in ASL.
ONEOP πŸ”’
ONES
Ones object represents all bits 1.
ONESOP πŸ”’
OPREGIONOP πŸ”’
OROP πŸ”’
PACKAGEOP πŸ”’
POWERRESOURCEOP πŸ”’
QWORDADDRSPACEDESC πŸ”’
QWORDPREFIX πŸ”’
RELEASEOP πŸ”’
RETURNOP πŸ”’
SCOPEOP πŸ”’
SHIFTLEFTOP πŸ”’
SHIFTRIGHTOP πŸ”’
SIZEOFOP πŸ”’
STOREOP πŸ”’
STRINGOP πŸ”’
SUBTRACTOP πŸ”’
TOBUFFEROP πŸ”’
TOINTEGEROP πŸ”’
TOSTRINGOP πŸ”’
VARPACKAGEOP πŸ”’
WHILEOP πŸ”’
WORDADDRSPACEDESC πŸ”’
WORDPREFIX πŸ”’
XOROP πŸ”’
ZERO
Zero object in ASL.
ZEROOP πŸ”’

TraitsΒ§

Aml
The trait Aml can be implemented by the ACPI objects to translate itself into the AML raw data. So that these AML raw data can be added into the ACPI DSDT for guest.

FunctionsΒ§

append_aml_string πŸ”’
append_named_field_length πŸ”’
append_pkg_length πŸ”’
hex2byte πŸ”’
insert_length πŸ”’
insert_pkg_length πŸ”’

Type AliasesΒ§

AmlStr
implement Aml trait for β€˜str’ so that β€˜str’ can be directly append to the aml vector
AmlString
implement Aml trait for β€˜String’. So purpose with str.
Byte
DWord
QWord
Usize
Word