error.bend checks
raw source on the hub · import bend-osdev-acpi@0.1.1.0/error.bend as Error
bend-osdev-acpi, error.bend: why a table, an AML definition block or an AML evaluation was refused. One constructor per failure, so a caller can tell them apart.
3 imports
import Base import bend-osdev-word64@0.1.1.0/word64.bend as W import bend-osdev-bytes@0.1.1.0/bytes.bend as B
Types
type AcpiError source · line 8 · raw
Data
AcpiTooShort@need:Nat -> @got:Nat -> AcpiError
fewer bytes than the structure needs: need, got
AcpiBadSignature@got:0xe0217e1ab38629fddf738452c1f2a82e/bytes.Octets -> AcpiError
the signature is not the one the parser reads
AcpiBadLength@length:U32 -> AcpiError
a table's length field below its header, or past the bytes given
AcpiBadChecksum@sum:U32 -> AcpiError
the bytes of a table do not sum to 0 mod 256 (the sum, mod 256)
AcpiRsdpBadChecksum@sum:U32 -> AcpiError
the RSDP's first 20 bytes do not sum to 0 mod 256
AcpiRsdpBadExtChecksum@sum:U32 -> AcpiError
the RSDP (revision 2 or later) does not sum to 0 mod 256 over its length
AcpiBadRevision@revision:U32 -> AcpiError
a revision this parser does not read
AcpiBadEntry@offset:Nat -> @kind:U32 -> AcpiError
a sub-structure (MADT, SRAT entry) at this offset in the table's body is shorter than 2 bytes, shorter than its type needs, or runs past the table
AcpiBadSize@size:Nat -> AcpiError
a table's body does not hold what its fields say (an SLIT matrix that does not fit, an RSDT/XSDT body that is not a whole number of entries)
AcpiNotMapped@address:0xea9c6e6209a3ac3fb21596f70f09f650/word64.W64 -> AcpiError
the memory reader has no bytes at this physical address
AcpiTableMissing@signature:0xe0217e1ab38629fddf738452c1f2a82e/bytes.Octets -> AcpiError
no table with this signature
AcpiAmlTruncatedAcpiError
the definition block or a package ends inside a term
AcpiAmlBadOpcode@opcode:U32 -> AcpiError
an opcode this interpreter does not know (extended opcodes: 0x5B00 + op)
AcpiAmlBadPkgLengthAcpiError
a PkgLength with reserved bits set, or longer than its enclosing package
AcpiAmlBadNameAcpiError
a NameString that is not well-formed
AcpiAmlUndefined@path:String -> AcpiError
a name that does not resolve
AcpiAmlDuplicate@path:String -> AcpiError
a name defined twice in one scope
AcpiAmlBadOperand@opcode:U32 -> AcpiError
an operand of the wrong kind (a statement where a value is needed, a value that cannot be converted, a reference where none can be taken)
AcpiAmlBadType@what:String -> AcpiError
an operation on an object of a type it does not take
AcpiAmlRangeAcpiError
Index past the end of a buffer, string or package; a field outside its region or buffer
AcpiAmlDivZeroAcpiError
Divide or Mod by zero
AcpiAmlBadControlAcpiError
Break or Continue outside While, Return outside a method
AcpiAmlFatal@kind:U32 -> @code:U32 -> @arg:0xea9c6e6209a3ac3fb21596f70f09f650/word64.W64 -> AcpiError
a Fatal operator: type, code, argument
AcpiAmlUnsupported@what:String -> AcpiError
a construct this interpreter does not support (named in README.md)
AcpiAmlStepLimitAcpiError
the step bound ran out before the evaluation finished
AcpiAmlHost@code:U32 -> AcpiError
the operation-region host refused an access (its own code)