Allocate HULK stack region from HELLO, translate memory region types
This commit is contained in:
1 parent
f236a64b21
commit
f29bd9d00c
5 files changed
+148
-81
No files matched your search
+15
-3
@@ -30,6 +30,18 @@ struct BootInfo
|
||||
*/
|
||||
struct MemoryRegion
|
||||
{
|
||||
enum Type
|
||||
{
|
||||
Reserved,
|
||||
Conventional,
|
||||
Unusable,
|
||||
ACPIReclaim,
|
||||
ACPINVS,
|
||||
MemoryMappedIO,
|
||||
MemoryMappedIOPortSpace,
|
||||
PalCode,
|
||||
}
|
||||
|
||||
/** Base address of the memory region. */
|
||||
ulong base;
|
||||
/** Size in bytes of the memory region. */
|
||||
@@ -42,7 +54,7 @@ struct BootInfo
|
||||
Framebuffer fb;
|
||||
|
||||
/* Memory map. */
|
||||
MemoryRegion[800] memory_map;
|
||||
MemoryRegion[1000] memory_map;
|
||||
|
||||
/* Number of memory map entries. */
|
||||
size_t memory_map_count;
|
||||
@@ -53,8 +65,8 @@ struct BootInfo
|
||||
/* Physical address used for HULK bss section. */
|
||||
ulong bss_phys;
|
||||
|
||||
/* Size of HULK bss region. */
|
||||
ulong bss_size;
|
||||
/* Physical address of stack while jumping to HULK. */
|
||||
ulong stack_phys;
|
||||
}
|
||||
|
||||
/** HULK base virtual address. */
|
||||
|
||||
@@ -20,4 +20,7 @@ struct Header
|
||||
|
||||
/** Entry point. */
|
||||
void * entry;
|
||||
|
||||
/** Stack size. */
|
||||
ulong stack_size;
|
||||
}
|
||||
@@ -18,6 +18,7 @@ extern extern(C) __gshared ubyte _hulk_total_size;
|
||||
private __gshared Header hulk_header = {
|
||||
&_hulk_total_size,
|
||||
&hulk_start,
|
||||
16u * 1024u,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user