Documentation ¶
Overview ¶
Multiboot header as defined in https://www.gnu.org/software/grub/manual/multiboot/multiboot.html#Header-layout
Multiboot info as defined in https://www.gnu.org/software/grub/manual/multiboot/multiboot.html#Boot-information-format
Package multiboot implements basic primitives to load multiboot kernels as defined in https://www.gnu.org/software/grub/manual/multiboot/multiboot.html.
Index ¶
Constants ¶
const DebugPrefix = "MULTIBOOT_DEBUG_INFO:"
Variables ¶
var ErrFlagsNotSupported = errors.New("multiboot header flags not supported yet")
var ErrHeaderNotFound = errors.New("multiboot header not found")
Functions ¶
Types ¶
type Description ¶
type Description struct { Status string `json:"status"` Flags uint32 `json:"flags"` MemLower uint32 `json:"mem_lower"` MemUpper uint32 `json:"mem_upper"` MmapAddr uint32 `json:"mmap_addr"` MmapLength uint32 `json:"mmap_length"` CmdLine string `json:"cmdline"` Bootloader string `json:"bootloader"` Mmap []MemoryMap `json:"mmap"` Modules []ModuleDesc `json:"modules"` }
Description stores representation of multiboot information passed to a final kernel used for for debugging and testing.
type Header ¶
type Header struct {
// contains filtered or unexported fields
}
Header represents a Multiboot v1 header loaded from the file.
type Info ¶
type Info struct { Flags Flag MemLower uint32 MemUpper uint32 // BootDevice is not supported, always zero. BootDevice uint32 CmdLine uint32 ModsCount uint32 ModsAddr uint32 // Syms is not supported, always zero array. Syms [4]uint32 MmapLength uint32 MmapAddr uint32 DriversLength uint32 DrivesrAddr uint32 ConfigTable uint32 BootLoaderName uint32 APMTable uint32 VBEControlInfo uint32 VBEModeInfo uint32 VBEMode uint16 VBEInterfaceSeg uint16 VBEInterfaceOff uint16 VBEInterfaceLen uint16 FramebufferAddr uint16 FramebufferPitch uint16 FramebufferWidth uint32 FramebufferHeight uint32 FramebufferBPP byte FramebufferType byte ColorInfo [6]byte }
Info represents the Multiboot v1 info passed to the loaded kernel.
type MemoryMap ¶
type MemoryMap struct { // Size is the size of the associated structure in bytes. Size uint32 // BaseAddr is the starting address. BaseAddr uint64 // Length is the size of the memory region in bytes. Length uint64 // Type is the variety of address range represented. Type uint32 }
MemoryMap represents a reserved range of memory passed via the Multiboot Info header.
func (MemoryMap) MarshalJSON ¶
MarshalJSON implements json.Marshaler
func (*MemoryMap) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler
type Module ¶
type Module struct { // Start is the inclusive start of the Module memory location Start uint32 // End is the exclusive end of the Module memory location. End uint32 // CmdLine is a pointer to a null-terminated ASCII string. CmdLine uint32 // Reserved is always zero. Reserved uint32 }
A Module represents a module to be loaded along with the kernel.
type ModuleDesc ¶
type ModuleDesc struct { Start uint32 `json:"start"` End uint32 `json:"end"` CmdLine string `json:"cmdline"` SHA256 string `json:"sha256"` }
ModuleDesc is a debug representation of loaded module.
type Multiboot ¶
type Multiboot struct { // EntryPoint is a pointer to trampoline. EntryPoint uintptr // contains filtered or unexported fields }
Multiboot defines parameters for working with multiboot kernels.
func (Multiboot) Description ¶
Description returns string representation of multiboot information.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
trampoline
Trampoline sets machine to a specific state defined by multiboot v1 spec and boots the final kernel.
|
Trampoline sets machine to a specific state defined by multiboot v1 spec and boots the final kernel. |