The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
memory_map.h
Go to the documentation of this file.
1#pragma once
2
3#include "common/stdint.h"
4
5/**
6 * structure representing a single memory region in the system's memory map.
7 */
8typedef struct
9{
10 uint64_t base; // starting physical address of the memory region.
11 uint64_t length; // length of the memory region in bytes.
12 uint32_t type; // type of the memory region (1 = usable, 2 = reserved, etc.).
13
14} __attribute__((packed)) memory_region_t; // 20 bytes as stage2 writes it, on any target
15
16/**
17 * structure representing the system's memory map, containing multiple memory regions.
18 */
19typedef struct
20{
21 uint32_t count; // number of valid memory regions in the regions array.
22 memory_region_t regions[32]; // array of memory regions, with a maximum of 32 entries.
23
unsigned int uint32_t
Definition fb.h:17
__UINT64_TYPE__ uint64_t
Definition stdint.h:17
ELF32 file header.
Definition elf.h:51
uint64_t base
Definition memory_map.h:10
uint32_t type
Definition virtio_gpu.c:56
uint32_t length
Definition hda.c:156
structure representing the system's memory map, containing multiple memory regions.
Definition memory_map.h:20
uint32_t count
Definition memory_map.h:21
memory_region_t regions[32]
Definition memory_map.h:22