mirror of
https://github.com/taigrr/gopher-os
synced 2025-01-18 04:43:13 -08:00
acpi: define structs for holding the AML VM bytecode
This commit is contained in:
parent
3a3b980eaa
commit
3cdc10be24
25
src/gopheros/device/acpi/aml/vm/vm.go
Normal file
25
src/gopheros/device/acpi/aml/vm/vm.go
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
package vm
|
||||||
|
|
||||||
|
import "gopheros/device/acpi/aml/entity"
|
||||||
|
|
||||||
|
// Context contains the result of transforming the methods defined by a
|
||||||
|
// hierarchy of AML entities into the bytecode format that can be executed by
|
||||||
|
// the VM implementation in this package.
|
||||||
|
type Context struct {
|
||||||
|
// The root namespace for the parsed AML entities.
|
||||||
|
rootNS entity.Container
|
||||||
|
|
||||||
|
constants []*entity.Const
|
||||||
|
buffers []*entity.Buffer
|
||||||
|
packages []*entity.Package
|
||||||
|
methodCalls []*methodCall
|
||||||
|
|
||||||
|
bytecode []uint8
|
||||||
|
}
|
||||||
|
|
||||||
|
// methodCall contains information about the bytecode address where a particular
|
||||||
|
// AML method begins as well as a link to the actual method entity.
|
||||||
|
type methodCall struct {
|
||||||
|
entrypoint uint32
|
||||||
|
method *entity.Method
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user