1
0
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:
Achilleas Anagnostopoulos 2017-12-25 18:44:53 +00:00
parent 3a3b980eaa
commit 3cdc10be24

View 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
}