~/bend-docscommunity

src/boot/dtb.bend checks

raw source on the hub · import 0x44d563db508054425e12f3226cb92a4f/src/boot/dtb.bend as Dtb

5 imports
import Base
import ../lib/u64.bend as U
import ../lib/bytes.bend as B
import ../fdt/fdt.bend as F
import ../vmm/layout.bend as Lay

Types

type Initrd source · line 55 · raw

Data

type Display source · line 59 · raw

Data

A framebuffer of width x height 32-bit pixels (a8r8g8b8).

type DtbCfg source · line 62 · raw

Data

Definitions

def Dtb.unit source · line 66 · raw

@a:0x44d563db508054425e12f3226cb92a4f/src/lib/u64.U64 -> String

Lowercase hex without a 0x prefix or leading zeros: the unit address of a node.

def Dtb.memory source · line 70 · raw

@ram_size:0x44d563db508054425e12f3226cb92a4f/src/lib/u64.U64 -> 0x44d563db508054425e12f3226cb92a4f/src/fdt/fdt.Node

reg = <u64 ram_base> <u64 ram_size>, RAM at 0x4000_0000.

def Dtb.initrd source · line 75 · raw

@m:Maybe<&2, Initrd> -> List<&2, 0x44d563db508054425e12f3226cb92a4f/src/fdt/fdt.Prop>

def Dtb.chosen source · line 82 · raw

@bootargs:String -> @m:Maybe<&2, Initrd> -> 0x44d563db508054425e12f3226cb92a4f/src/fdt/fdt.Node

def Dtb.cpu source · line 86 · raw

@+n:U32 -> 0x44d563db508054425e12f3226cb92a4f/src/fdt/fdt.Node

def Dtb.virtio source · line 91 · raw

@+n:U32 -> 0x44d563db508054425e12f3226cb92a4f/src/fdt/fdt.Node

virtio-mmio slot n: 512 bytes at Layout.virtio_slot(n), SPI 16 + n, edge.

def Dtb.cpus source · line 117 · raw

@+ncpus:Nat -> 0x44d563db508054425e12f3226cb92a4f/src/fdt/fdt.Node

def Dtb.psci source · line 121 · raw

0x44d563db508054425e12f3226cb92a4f/src/fdt/fdt.Node

def Dtb.timer source · line 125 · raw

0x44d563db508054425e12f3226cb92a4f/src/fdt/fdt.Node

Secure, non-secure, virtual and hypervisor timer PPIs, level-high.

def Dtb.intc source · line 129 · raw

0x44d563db508054425e12f3226cb92a4f/src/fdt/fdt.Node

def Dtb.clock source · line 138 · raw

0x44d563db508054425e12f3226cb92a4f/src/fdt/fdt.Node

def Dtb.uart source · line 142 · raw

0x44d563db508054425e12f3226cb92a4f/src/fdt/fdt.Node

def Dtb.root_props source · line 148 · raw

List<&2, 0x44d563db508054425e12f3226cb92a4f/src/fdt/fdt.Prop>

def Dtb.rtc source · line 151 · raw

0x44d563db508054425e12f3226cb92a4f/src/fdt/fdt.Node

def Dtb.fb source · line 157 · raw

@d:Display -> 0x44d563db508054425e12f3226cb92a4f/src/fdt/fdt.Node

def Dtb.fbs source · line 164 · raw

@d:Maybe<&2, Display> -> List<&2, 0x44d563db508054425e12f3226cb92a4f/src/fdt/fdt.Node>

def Dtb.flash source · line 173 · raw

0x44d563db508054425e12f3226cb92a4f/src/fdt/fdt.Node

The two UEFI flash banks (--firmware), one cfi-flash node as on QEMU's virt machine: bank 0 the firmware, bank 1 the variable store.

def Dtb.flashes source · line 179 · raw

@on:Bool -> List<&2, 0x44d563db508054425e12f3226cb92a4f/src/fdt/fdt.Node>

def Dtb.tree source · line 186 · raw

@cfg:DtbCfg -> 0x44d563db508054425e12f3226cb92a4f/src/fdt/fdt.Node

def Dtb.build source · line 192 · raw

@cfg:DtbCfg -> List<&2, U32>

Templates

template Dtb.range source · line 98 · raw

@-mk:(@_:U32 -> 0x44d563db508054425e12f3226cb92a4f/src/fdt/fdt.Node) -> @fuel:Nat -> @+lo:U32 -> @n:Nat -> List<&2, 0x44d563db508054425e12f3226cb92a4f/src/fdt/fdt.Node>

The nodes mk(lo) .. mk(lo + n - 1), in order. A range of two or more splits in halves built in parallel. Each call spends one unit of fuel; n suffices.