def AcpiTable.name

bend-osdev-acpi@0.1.1.0 · registry.bend:184

import bend-osdev-acpi@0.1.1.0/registry.bend as Registry
import Base
import bend-osdev-bytes@0.1.1.0/bytes.bend as B
import bend-osdev-acpi@0.1.1.0/header.bend as H
import bend-osdev-acpi@0.1.1.0/dsdt.bend as D

184# the name of the parser that read the table
185def AcpiTable.name(~X: Data, t: AcpiTable<X>) -> String:
186  match t:
187    case AcpiTRsdt{a}:
188      "RSDT"
189    case AcpiTXsdt{a}:
190      "XSDT"
191    case AcpiTMadt{a}:
192      "APIC"
193    case AcpiTFadt{a}:
194      "FACP"
195    case AcpiTHpet{a}:
196      "HPET"
197    case AcpiTMcfg{a}:
198      "MCFG"
199    case AcpiTSrat{a}:
200      "SRAT"
201    case AcpiTSlit{a}:
202      "SLIT"
203    case AcpiTBgrt{a}:
204      "BGRT"
205    case AcpiTAml{a}:
206      B.Octets.to_string(H.AcpiHeader.signature(D.AcpiAml.header(a)))
207    case AcpiTRaw{a}:
208      B.Octets.to_string(H.AcpiHeader.signature(H.AcpiSdt.header(a)))
209    case AcpiTExt{tag, x}:
210      "ext " ++ U32.show(tag)

Uses (8)

Used by (2)