def AcpiTables.load_with

bend-osdev-acpi@0.1.1.0 · acpi.bend:237

import bend-osdev-acpi@0.1.1.0/acpi.bend as Acpi
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
import bend-osdev-acpi@0.1.1.0/error.bend as E
import bend-osdev-acpi@0.1.1.0/header.bend as H
import bend-osdev-acpi@0.1.1.0/rsdp.bend as P
import bend-osdev-acpi@0.1.1.0/rsdt.bend as S

237# every table of the machine whose RSDP is at rsdp_addr: the RSDP, the RSDT
238# or XSDT (Fail if either cannot be read), then each table it lists, the
239# DSDT (from the FADT) and the FACS, each read and parsed on its own
240def AcpiTables.load_with(~M: Data, ~read: M -> W.W64 -> Nat -> Result<&2, &2, E.AcpiError, B.Octets>, ~X: Data, ~ext: U32 -> H.AcpiSdt -> Result<&2, &2, E.AcpiError, X>, +opts: AcpiLoadOptions, +m: M, +rsdp_addr: W.W64) -> Result<&2, &2, E.AcpiError, AcpiTableSet<X>>:
241  do Result<&2, &2, E.AcpiError, AcpiTableSet<X>>:
242    +r : P.AcpiRsdp <- AcpiTables.read_rsdp(~M, ~read, m, rsdp_addr)
243    +x : Bool = ld.use_x(ld.opts(opts), r)
244    root : S.AcpiSdtList <- ld.root(~M, ~read, m, x, ld.root_addr(x, r))
245    return ld.finish(~M, ~read, ~X, ~ext, m, ld.reg(opts), r, root)

Uses (21)

Used by (2)