Fix only allocating one page for log
This commit is contained in:
@@ -144,7 +144,7 @@ loader_load_kernel(
|
|||||||
CHECK_EFI_STATUS_OR_RETURN(status, L"loader_alloc_pages: kernel data");
|
CHECK_EFI_STATUS_OR_RETURN(status, L"loader_alloc_pages: kernel data");
|
||||||
|
|
||||||
data->log = next;
|
data->log = next;
|
||||||
data->log_length = KERNEL_LOG_PAGES;
|
data->log_length = KERNEL_LOG_PAGES * PAGE_SIZE;
|
||||||
status = loader_alloc_pages(
|
status = loader_alloc_pages(
|
||||||
bootsvc,
|
bootsvc,
|
||||||
KERNEL_LOG_MEMTYPE,
|
KERNEL_LOG_MEMTYPE,
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
#include <efi.h>
|
#include <efi.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
|
#define PAGE_SIZE 0x1000
|
||||||
|
|
||||||
#ifndef KERNEL_PHYS_ADDRESS
|
#ifndef KERNEL_PHYS_ADDRESS
|
||||||
#define KERNEL_PHYS_ADDRESS 0x100000
|
#define KERNEL_PHYS_ADDRESS 0x100000
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -149,6 +149,8 @@ efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *system_table)
|
|||||||
status = memory_get_map(bootsvc, &map);
|
status = memory_get_map(bootsvc, &map);
|
||||||
CHECK_EFI_STATUS_OR_FAIL(status);
|
CHECK_EFI_STATUS_OR_FAIL(status);
|
||||||
|
|
||||||
|
// bootsvc->Stall(5000000);
|
||||||
|
|
||||||
status = bootsvc->ExitBootServices(image_handle, map.key);
|
status = bootsvc->ExitBootServices(image_handle, map.key);
|
||||||
CHECK_EFI_STATUS_OR_ASSERT(status, 0);
|
CHECK_EFI_STATUS_OR_ASSERT(status, 0);
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,6 @@
|
|||||||
|
|
||||||
#define INCREMENT_DESC(p, b) (EFI_MEMORY_DESCRIPTOR*)(((uint8_t*)(p))+(b))
|
#define INCREMENT_DESC(p, b) (EFI_MEMORY_DESCRIPTOR*)(((uint8_t*)(p))+(b))
|
||||||
|
|
||||||
const size_t PAGE_SIZE = 4096;
|
|
||||||
|
|
||||||
const CHAR16 *memory_type_names[] = {
|
const CHAR16 *memory_type_names[] = {
|
||||||
L"EfiReservedMemoryType",
|
L"EfiReservedMemoryType",
|
||||||
L"EfiLoaderCode",
|
L"EfiLoaderCode",
|
||||||
|
|||||||
Reference in New Issue
Block a user