The manual
ginnOS
The reference: libc, the libraries and the kernel
Toggle main menu visibility
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
*/
8
typedef
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
*/
19
typedef
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
24
}
memory_map_t
;
stdint.h
uint32_t
unsigned int uint32_t
Definition
fb.h:17
uint64_t
__UINT64_TYPE__ uint64_t
Definition
stdint.h:17
__attribute__
ELF32 file header.
Definition
elf.h:51
__attribute__::base
uint64_t base
Definition
memory_map.h:10
__attribute__::type
uint32_t type
Definition
virtio_gpu.c:56
__attribute__::length
uint32_t length
Definition
hda.c:156
memory_map_t
structure representing the system's memory map, containing multiple memory regions.
Definition
memory_map.h:20
memory_map_t::count
uint32_t count
Definition
memory_map.h:21
memory_map_t::regions
memory_region_t regions[32]
Definition
memory_map.h:22
src
common
boot
memory_map.h
Generated by
1.18.0