v2 initial commit
This commit is contained in:
parent
2c97dba9f7
commit
d2ef885e8d
118 changed files with 2420 additions and 9320 deletions
27
init/requests.c
Normal file
27
init/requests.c
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#include "kernel/requests.h"
|
||||
#include "limine/limine.h"
|
||||
#include <kernel/common.h>
|
||||
|
||||
#define REQUEST __attribute__((used, section(".limine_requests"))) static volatile
|
||||
|
||||
REQUEST struct limine_executable_address_request kern_addr_req = { .id = LIMINE_EXECUTABLE_ADDRESS_REQUEST_ID, .revision = 0 };
|
||||
REQUEST struct limine_memmap_request memmap_req = { .id = LIMINE_MEMMAP_REQUEST_ID, .revision = 0 };
|
||||
REQUEST struct limine_hhdm_request hhdm_req = { .id = LIMINE_HHDM_REQUEST_ID, .revision = 0 };
|
||||
|
||||
REQUEST u64 limine_base_revision[] = LIMINE_BASE_REVISION(6);
|
||||
|
||||
struct limine_executable_address_response *kern_addr_res = NULL;
|
||||
struct limine_memmap_response *kern_map_res = NULL;
|
||||
struct limine_hhdm_response *kern_hhdm_res = NULL;
|
||||
|
||||
uintptr_t hhdm_start = 0;
|
||||
|
||||
void requests_init()
|
||||
{
|
||||
kern_addr_res = kern_addr_req.response;
|
||||
kern_map_res = memmap_req.response;
|
||||
kern_hhdm_res = hhdm_req.response;
|
||||
|
||||
hhdm_start = kern_hhdm_res->offset;
|
||||
}
|
||||
Loading…
Reference in a new issue