XenevaOS
Loading...
Searching...
No Matches
Macros | Functions | Variables
loader.cpp File Reference
#include <loader.h>
#include <process.h>
#include <Fs\vfs.h>
#include <string.h>
#include <Mm\vmmngr.h>
#include <Mm\pmmngr.h>
#include <Mm\kmalloc.h>
#include <Hal\x86_64_cpu.h>
#include <Mm\vmarea.h>
#include <Hal\hal.h>
#include <Hal\x86_64_gdt.h>
#include <Hal\x86_64_lowlevel.h>
#include <Hal\serial.h>
#include <Sync\spinlock.h>
#include <Sync\mutex.h>
#include <aucon.h>
Include dependency graph for loader.cpp:

Macros

#define PUSH(stack, type, item)
 
#define PUSHSTRING(stack, s)
 

Functions

void x64_set_rbp (uint64_t rbp)
 
void AuProcessEntUser (uint64_t rcx)
 
int AuLoadExecToProcess (AuProcess *proc, char *filename, int argc, char **argv)
 
void AuInitialiseLoader ()
 
AuMutexAuLoaderGetMutex ()
 
bool AuIsLoaderBusy ()
 

Variables

Spinlockloader_lock
 
AuMutexloader_mutex
 
bool is_loader_busy
 
bool _vfs_debug_on
 

Macro Definition Documentation

◆ PUSH

#define PUSH (   stack,
  type,
  item 
)
Value:
do { \
stack -= sizeof(type); \
while (stack & (sizeof(type)-1))stack--; \
*((type*)stack) = item; \
}while (0);

◆ PUSHSTRING

#define PUSHSTRING (   stack,
 
)
Value:
do { \
size_t l = strlen(s) - 1; \
do {\
PUSH2(stack, char, s[l]); \
l--; \
} while (l >= 0); \
}while (0)
ACPI_SIZE strlen(const char *String)
Definition utclib.c:379

Function Documentation

◆ AuInitialiseLoader()

void AuInitialiseLoader ( )

◆ AuIsLoaderBusy()

bool AuIsLoaderBusy ( )

◆ AuLoaderGetMutex()

AuMutex * AuLoaderGetMutex ( )

◆ AuLoadExecToProcess()

int AuLoadExecToProcess ( AuProcess proc,
char *  filename,
int  argc,
char **  argv 
)

◆ AuProcessEntUser()

void AuProcessEntUser ( uint64_t  rcx)

◆ x64_set_rbp()

void x64_set_rbp ( uint64_t  rbp)

Variable Documentation

◆ _vfs_debug_on

bool _vfs_debug_on
extern

BSD 2-Clause License

Copyright (c) 2023-2024, 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:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

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.

◆ is_loader_busy

bool is_loader_busy

◆ loader_lock

Spinlock* loader_lock

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:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

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.

◆ loader_mutex

AuMutex* loader_mutex