Add initial HULK source and linker script

This commit is contained in:
josh committed 2022-03-18 21:55:38 -04:00
1 parent 3e25ab6ae4
commit 8df1646c61
3 files changed
+62 -22

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
import hulk.bootinfo;
import hos.memory;
import ldc.attributes;
@(ldc.attributes.section(".hulk_start"))
extern(C) void hulk_start(BootInfo * bootinfo)
{
for (size_t y = 100u; y < 120u; y++)
{
memset32(&bootinfo.fb.buffer[y * bootinfo.fb.stride + 20u], 0xFF8800u, 20u);
}
for (;;)
{
}
}
+33
View File
@@ -0,0 +1,33 @@
ENTRY(hulk_start)
SECTIONS
{
. = 0x0000800000000000;
_hulk_mem_start = .;
.text BLOCK(4K) : ALIGN(4K)
{
*(.hulk_start)
*(.text)
}
.rodata BLOCK(4K) : ALIGN(4K)
{
*(.rodata)
}
.data BLOCK(4K) : ALIGN(4K)
{
*(.data)
}
.bss BLOCK(4K) : ALIGN(4K)
{
*(COMMON)
*(.bss)
}
. = ALIGN(4K);
_hulk_mem_end = .;
}