mirror of
https://github.com/limine-bootloader/limine
synced 2025-01-05 20:34:33 +03:00
Misc fixes
This commit is contained in:
parent
e56df5b3ab
commit
058da70164
@ -321,6 +321,10 @@ void init_memmap(void) {
|
||||
panic("AllocatePages %x", status);
|
||||
}
|
||||
|
||||
memmap_alloc_range(bump_allocator_base,
|
||||
bump_allocator_limit - bump_allocator_base,
|
||||
MEMMAP_RESERVED, true, true);
|
||||
|
||||
print("pmm: Conventional mem allocator base: %X\n", bump_allocator_base);
|
||||
print("pmm: Conventional mem allocator limit: %X\n", bump_allocator_limit);
|
||||
}
|
||||
@ -384,6 +388,7 @@ void *ext_mem_alloc_aligned_type(size_t count, size_t alignment, uint32_t type)
|
||||
bool memmap_alloc_range(uint64_t base, uint64_t length, uint32_t type, bool free_only, bool do_panic) {
|
||||
uint64_t top = base + length;
|
||||
|
||||
#if defined (bios)
|
||||
if (base < 0x100000) {
|
||||
if (do_panic) {
|
||||
// We don't do allocations below 1 MiB
|
||||
@ -393,6 +398,7 @@ bool memmap_alloc_range(uint64_t base, uint64_t length, uint32_t type, bool free
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
for (size_t i = 0; i < memmap_entries; i++) {
|
||||
if (free_only && memmap[i].type != 1)
|
||||
|
@ -279,8 +279,6 @@ __attribute__((noreturn)) void stivale_spinup(
|
||||
pic_flush();
|
||||
|
||||
#if defined (uefi)
|
||||
gdt.ptr += (uintptr_t)ImageBase;
|
||||
|
||||
asm volatile (
|
||||
"lgdt %0\n\t"
|
||||
:
|
||||
|
@ -341,7 +341,6 @@ void stivale2_load(char *config, char *cmdline, bool pxe) {
|
||||
(void)pxe;
|
||||
#endif
|
||||
|
||||
#if defined (bios)
|
||||
//////////////////////////////////////////////
|
||||
// Create memmap struct tag
|
||||
//////////////////////////////////////////////
|
||||
@ -361,7 +360,6 @@ void stivale2_load(char *config, char *cmdline, bool pxe) {
|
||||
|
||||
append_tag(&stivale2_struct, (struct stivale2_tag *)tag);
|
||||
}
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// List tags
|
||||
|
@ -5,6 +5,7 @@ smp_trampoline:
|
||||
cli
|
||||
cld
|
||||
|
||||
jmp $
|
||||
mov ebx, cs
|
||||
shl ebx, 4
|
||||
|
||||
|
@ -6,35 +6,22 @@ MENU_FONT=boot:///boot/font.bin
|
||||
THEME_COLOURS=60000000;aa0000;00aaff;aa5500;0000aa;aa00aa;9076de;aaaaaa
|
||||
THEME_MARGIN=64
|
||||
|
||||
BACKGROUND_PATH=boot:///boot/bg.bmp
|
||||
|
||||
:+Legacy
|
||||
|
||||
::Stivale Test
|
||||
|
||||
PROTOCOL=stivale
|
||||
PROTOCOL=stivale2
|
||||
KERNEL_PATH=boot:///boot/test.elf
|
||||
KERNEL_CMDLINE=Hi! This is an example!
|
||||
|
||||
MODULE_PATH=boot:///boot/test.elf
|
||||
MODULE_STRING=yooooo
|
||||
|
||||
MODULE_PATH=boot:///boot/bg.bmp
|
||||
MODULE_STRING=yooooo
|
||||
|
||||
::Stivale Test (KASLR)
|
||||
|
||||
PROTOCOL=stivale
|
||||
KASLR=yes
|
||||
KERNEL_PATH=boot:///boot/test.elf
|
||||
KERNEL_CMDLINE=Hi! This is an example!
|
||||
|
||||
MODULE_PATH=boot:///boot/test.elf
|
||||
MODULE_STRING=yooooo
|
||||
|
||||
MODULE_PATH=boot:///boot/bg.bmp
|
||||
MODULE_STRING=yooooo
|
||||
|
||||
:Stivale2 Test
|
||||
|
||||
PROTOCOL=stivale2
|
||||
|
Loading…
Reference in New Issue
Block a user