Files
ksOS/Common/bootinfo.h
T

64 lines
1.2 KiB
C

// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (c) 2026 0xKSor
#pragma once
typedef unsigned int BIUInt32;
typedef unsigned long long BIUInt64;
typedef struct {
BIUInt32* base;
BIUInt64 baseSize;
BIUInt64 width;
BIUInt64 height;
BIUInt64 pitch;
} BIFramebuffer;
typedef struct {
void* map;
BIUInt64 mapSize;
BIUInt64 descriptorSize;
BIUInt32 mapKey;
BIUInt32 descriptorVersion;
} BIMemoryMap;
typedef struct {
BIUInt64 kernelSize;
void* kernelAddress;
} BIKernelInfo;
#define BOOT_MODULE_MAX_SEGMENTS 8
#define PF_X 1
#define PF_W 2
#define PF_R 4
typedef struct {
BIUInt64 physicalBase;
BIUInt64 virtualBase;
BIUInt64 size;
BIUInt32 flags;
BIUInt32 reserved;
} BootModuleSegment;
typedef struct {
void* entry;
char name[32];
BIUInt64 capabilities;
BIUInt32 segmentCount;
BIUInt32 reserved;
BootModuleSegment segments[BOOT_MODULE_MAX_SEGMENTS];
} BootModule;
typedef struct {
BIUInt64 magic;
BIKernelInfo kernelInfo;
void* dtb;
BIMemoryMap memoryMap;
BIFramebuffer framebuffer;
BootModule modules[16];
BIUInt32 moduleCount;
} Bootinfo;
#define BOOTINFO_MAGIC 0x736F6E7961