slit.bend checks
raw source on the hub · import bend-osdev-acpi@0.1.1.0/slit.bend as Slit
bend-osdev-acpi, slit.bend: the System Locality Distance Information Table, "SLIT" (ACPI 6.5, section 5.2.17): after the header, the number of system localities N (8 bytes, offset 36), then the N x N matrix of relative distances, one byte each, row by row, from offset 44. Entry (i, i) is 10 (a locality's distance to itself); 0xFF means unreachable.
6 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 import ./error.bend as E import ./header.bend as H import ./fields.bend as F
Types
type AcpiSlit source · line 13 · raw
Data
AcpiSlit@header:0x62173b4e9e82dde7465c7018262f0baa/header.AcpiHeader -> @count:Nat -> @matrix:0xe0217e1ab38629fddf738452c1f2a82e/bytes.Octets -> AcpiSlit
Definitions
def AcpiSlit.count source · line 16 · raw
@s:AcpiSlit -> Nat
def slit.mk source · line 21 · raw
@ok:Bool -> @+h:0x62173b4e9e82dde7465c7018262f0baa/header.AcpiHeader -> @+n:Nat -> @+body:0xe0217e1ab38629fddf738452c1f2a82e/bytes.Octets -> Result<&2, &2, 0x62173b4e9e82dde7465c7018262f0baa/error.AcpiError, AcpiSlit>
def slit.body source · line 28 · raw
@ok:Bool -> @+h:0x62173b4e9e82dde7465c7018262f0baa/header.AcpiHeader -> @+body:0xe0217e1ab38629fddf738452c1f2a82e/bytes.Octets -> Result<&2, &2, 0x62173b4e9e82dde7465c7018262f0baa/error.AcpiError, AcpiSlit>
def AcpiSlit.of_sdt source · line 39 · raw
@t:0x62173b4e9e82dde7465c7018262f0baa/header.AcpiSdt -> Result<&2, &2, 0x62173b4e9e82dde7465c7018262f0baa/error.AcpiError, AcpiSlit>
a checked table as an SLIT: the N x N matrix must fit in the body (AcpiBadSize otherwise; N is limited to 65535)
def slit.parse source · line 44 · raw
@r:Result<&2, &2, 0x62173b4e9e82dde7465c7018262f0baa/error.AcpiError, 0x62173b4e9e82dde7465c7018262f0baa/header.AcpiSdt> -> Result<&2, &2, 0x62173b4e9e82dde7465c7018262f0baa/error.AcpiError, AcpiSlit>
def AcpiSlit.parse source · line 51 · raw
@+o:0xe0217e1ab38629fddf738452c1f2a82e/bytes.Octets -> Result<&2, &2, 0x62173b4e9e82dde7465c7018262f0baa/error.AcpiError, AcpiSlit>
def slit.at source · line 54 · raw
@ok:Bool -> @+n:Nat -> @+m:0xe0217e1ab38629fddf738452c1f2a82e/bytes.Octets -> @+i:Nat -> @j:Nat -> Maybe<&2, U32>
def AcpiSlit.distance source · line 62 · raw
@s:AcpiSlit -> @+i:Nat -> @+j:Nat -> Maybe<&2, U32>
the distance from locality i to locality j, if both are below N
def AcpiSlit.build source · line 68 · raw
@s:AcpiSlit -> 0xe0217e1ab38629fddf738452c1f2a82e/bytes.Octets
the table, from N and the matrix (fitted to N x N bytes)