|
XenevaOS
|
#include <loader.h>#include <Drivers/uart.h>#include <string.h>#include <Mm/pmmngr.h>#include <Mm/vmmngr.h>#include <Mm/kmalloc.h>#include <aucon.h>#include <Fs/vfs.h>#include <pe.h>#include <Hal/AA64/sched.h>#include <Hal/AA64/aa64lowlevel.h>#include <ftmngr.h>
Macros | |
| #define | LOADER_SCRATCH_VIRT 0xFFFFC00000700000 |
| #define | PUSH(stack, type, item) |
| #define | PUSHALIGN(stack, align) |
| #define | PUSHSTRING(stack, s) |
Functions | |
| void | testFunc () |
| void | AuProcessEntUser (uint64_t rcx) |
| AuProcessEntUser – main kernel thread call in order to enter user for processes. | |
| bool | setStk () |
| int | AuLoadExecToProcess (AuProcess *proc, char *filename, int argc, char **argv) |
| AuLoadExecToProcess – loads an executable to the process. | |
| void | AuInitialiseLoader () |
| AuInitialiseLoader – initialize the loader and allocate atleast 1 MiB for scratch use. | |
Variables | |
| uint64_t * | _ldr_scratchBuffer |
| uint64_t | physFrames [64] |
BSD 2-Clause License
Copyright (c) 2022-2023, Manas Kamal Choudhury All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
| #define LOADER_SCRATCH_VIRT 0xFFFFC00000700000 |
| #define PUSH | ( | stack, | |
| type, | |||
| item | |||
| ) |
| #define PUSHALIGN | ( | stack, | |
| align | |||
| ) |
| #define PUSHSTRING | ( | stack, | |
| s | |||
| ) |
| void AuInitialiseLoader | ( | ) |
AuInitialiseLoader – initialize the loader and allocate atleast 1 MiB for scratch use.
| int AuLoadExecToProcess | ( | AuProcess * | proc, |
| char * | filename, | ||
| int | argc, | ||
| char ** | argv | ||
| ) |
AuLoadExecToProcess – loads an executable to the process.
| proc | – pointer to process data structure |
| filename | – executable file name |
| argc | – number of arguments |
| argv | – array of argument in strings |
| void AuProcessEntUser | ( | uint64_t | rcx | ) |
AuProcessEntUser – main kernel thread call in order to enter user for processes.
| rcx | – user entry structure |
|
extern |
| void testFunc | ( | ) |
| uint64_t* _ldr_scratchBuffer |
| uint64_t physFrames[64] |