Initial import of ViperOS

This commit is contained in:
Viper
2026-07-19 12:38:20 +08:00
commit 6813947181
104 changed files with 26710 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
import t, c
MEMORY_TYPE_AVAILABLE: t.CUInt64T = 7
MEMORY_TYPE_RESERVED: t.CUInt64T = 0
MEMORY_TYPE_LOADER_CODE: t.CUInt64T = 1
MEMORY_TYPE_LOADER_DATA: t.CUInt64T = 2
MEMORY_TYPE_BOOT_SERVICES_CODE: t.CUInt64T = 3
MEMORY_TYPE_BOOT_SERVICES_DATA: t.CUInt64T = 4
MEMORY_TYPE_RUNTIME_SERVICES_CODE: t.CUInt64T = 5
MEMORY_TYPE_RUNTIME_SERVICES_DATA: t.CUInt64T = 6
MEMORY_TYPE_ACPI_RECLAIMABLE: t.CUInt64T = 9
MEMORY_TYPE_ACPI_NVS: t.CUInt64T = 10
MEMORY_TYPE_BAD_MEMORY: t.CUInt64T = 8
@c.Attribute(t.attr.packed)
class memory_map_entry:
type: t.CUnsignedInt
_pad: t.CUnsignedInt
physical_start: t.CUnsignedLong
virtual_start: t.CUnsignedLong
num_pages: t.CUnsignedLong
attribute: t.CUnsignedLong
class bootinfo:
MemmapAddr: t.CUnsignedLong
MemmapSize: t.CUnsignedLong
MemmapDescSize: t.CUnsignedLong
kernel_PhysAddr: t.CUnsignedLong
framebuffer_addr: t.CUnsignedLong
framebuffer_size: t.CUnsignedLong
framebuffer_width: t.CUnsignedLong
framebuffer_height: t.CUnsignedLong
framebuffer_pitch: t.CUnsignedLong
framebuffer_format: t.CUnsignedLong
system_table: t.CUnsignedLong