Move bootinfo into HULK header

This commit is contained in:
josh committed 2022-03-27 16:14:54 -04:00
1 parent cf5956dcd3
commit d86745d91d
4 files changed
+47 -36

No files matched your search

+5
View File
@@ -3,6 +3,8 @@
*/
module hulk.header;
import hulk.bootinfo;
/**
* Header describing the HULK image.
*/
@@ -32,4 +34,7 @@ struct HulkHeader
/** Framebuffer virtual address. */
ulong virt_fb_buffer;
/** HULK boot information. */
BootInfo bootinfo;
}
+2 -5
View File
@@ -4,7 +4,6 @@
module hulk.hulk;
import hulk.header;
import hulk.bootinfo;
import hulk.fb;
import hulk.console;
import hos.memory;
@@ -27,12 +26,10 @@ private __gshared HulkHeader hulk_header = {
/**
* HULK entry point.
*
* @param bootinfo Pointer to HULK boot information structure.
*/
void hulk_start(BootInfo * bootinfo)
void hulk_start()
{
fb.initialize(cast(uint *)HULK_VIRTUAL_FRAMEBUFFER_ADDRESS, bootinfo.fb.width, bootinfo.fb.height, bootinfo.fb.stride);
fb.initialize(cast(uint *)HULK_VIRTUAL_FRAMEBUFFER_ADDRESS, hulk_header.bootinfo.fb.width, hulk_header.bootinfo.fb.height, hulk_header.bootinfo.fb.stride);
console.initialize();
console.clear();
klog.initialize();
+7 -2
View File
@@ -3,17 +3,22 @@ SECTIONS
. = 0xFFFF800000000000;
_hulk_mem_start = .;
.rodata BLOCK(4K) : ALIGN(4K)
.hulk_header BLOCK(4K) : ALIGN(4K)
{
*(.hulk_header)
*(.rodata)
}
_hulk_header_size = . - _hulk_mem_start;
.text BLOCK(4K) : ALIGN(4K)
{
*(.text)
}
.rodata BLOCK(4K) : ALIGN(4K)
{
*(.rodata)
}
.data BLOCK(4K) : ALIGN(4K)
{
*(.data)