mirror of
https://github.com/limine-bootloader/limine
synced 2024-12-29 09:09:41 +03:00
misc: Fix warnings introduced in 65e5db3
This commit is contained in:
parent
d4fed0c086
commit
b8a30a8f85
@ -558,6 +558,10 @@ void *ext_mem_alloc_type_aligned(size_t count, uint32_t type, size_t alignment)
|
|||||||
|
|
||||||
// Allocate memory top down.
|
// Allocate memory top down.
|
||||||
void *ext_mem_alloc_type_aligned_mode(size_t count, uint32_t type, size_t alignment, bool allow_high_allocs) {
|
void *ext_mem_alloc_type_aligned_mode(size_t count, uint32_t type, size_t alignment, bool allow_high_allocs) {
|
||||||
|
#if !defined (__x86_64__) && !defined (__i386__)
|
||||||
|
(void)allow_high_allocs;
|
||||||
|
#endif
|
||||||
|
|
||||||
count = ALIGN_UP(count, alignment);
|
count = ALIGN_UP(count, alignment);
|
||||||
|
|
||||||
if (allocations_disallowed)
|
if (allocations_disallowed)
|
||||||
@ -572,9 +576,7 @@ void *ext_mem_alloc_type_aligned_mode(size_t count, uint32_t type, size_t alignm
|
|||||||
|
|
||||||
#if defined(__x86_64__) || defined(__i386__)
|
#if defined(__x86_64__) || defined(__i386__)
|
||||||
// Let's make sure the entry is not > 4GiB
|
// Let's make sure the entry is not > 4GiB
|
||||||
if (entry_top >= 0x100000000
|
if (entry_top >= 0x100000000 && !allow_high_allocs) {
|
||||||
&& !allow_high_allocs
|
|
||||||
) {
|
|
||||||
entry_top = 0x100000000;
|
entry_top = 0x100000000;
|
||||||
if (entry_base >= entry_top)
|
if (entry_base >= entry_top)
|
||||||
continue;
|
continue;
|
||||||
|
@ -13,7 +13,8 @@ local_gdt:
|
|||||||
|
|
||||||
local_gdt_ptr:
|
local_gdt_ptr:
|
||||||
dw local_gdt.top - local_gdt - 1
|
dw local_gdt.top - local_gdt - 1
|
||||||
dq local_gdt
|
dd local_gdt
|
||||||
|
dd 0
|
||||||
|
|
||||||
old_gdt_ptr:
|
old_gdt_ptr:
|
||||||
dw 0
|
dw 0
|
||||||
|
Loading…
Reference in New Issue
Block a user