XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions | Variables
xnldr.cpp File Reference
#include <Uefi.h>
#include <Guid/DebugImageInfoTable.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiLib.h>
#include "xnldr.h"
#include "video.h"
#include "file.h"
#include "xnout.h"
#include "pe.h"
#include "physm.h"
#include "paging.h"
#include "lowlevel.h"
#include "uart0.h"
#include "vector.h"
Include dependency graph for xnldr.cpp:

Classes

struct  MENU_ITEM
 
struct  _rsdp_
 ACPI version 1.0 structures. More...
 

Macros

#define ACPI_20_TABLE_GUID   {0x8868e871, 0xe4f1, 0x11d3, 0xbc, 0x22, 0x00, 0x80, 0xc7, 0x3c, 0x88, 0x81}
 
#define MENU_SIZE   (sizeof(MenuItem)/sizeof(MenuItem[0]))
 

Typedefs

typedef void(* kentry) (void *ptr)
 
typedef struct _rsdp_ acpiRsdp
 ACPI version 1.0 structures.
 

Functions

bool XEGUIDMatch (EFI_GUID guid1, EFI_GUID guid2)
 
EFI_STATUS XEInitialiseLib (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
 
int XEGetScreenResolutionMode (EFI_SYSTEM_TABLE *SystemTable)
 
UINTN XESetGraphicsMode (EFI_SYSTEM_TABLE *SystemTable, int index)
 
void Char16ToASCII (char *dest, CHAR16 *src)
 
void ASCIIToChar16 (const char *src, wchar_t *dst)
 
void prepare_el2_exit_phase1 ()
 
void prepare_el2_exit_phase2 ()
 
void XEExitEL2 ()
 
EFI_STATUS efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
 

Variables

EFI_HANDLE gImageHandle
 
EFI_SYSTEM_TABLEgSystemTable
 
EFI_BOOT_SERVICESgBS
 
EFI_RUNTIME_SERVICESgRS
 
EFI_LOADED_IMAGE_PROTOCOLxnldr2
 
EFI_GRAPHICS_OUTPUT_PROTOCOLgop
 
MENU_ITEM MenuItem []
 
EFI_GUID FdtTableGuid
 
void * kernelBuff
 
uint64_t keBuff
 

Macro Definition Documentation

◆ ACPI_20_TABLE_GUID

#define ACPI_20_TABLE_GUID   {0x8868e871, 0xe4f1, 0x11d3, 0xbc, 0x22, 0x00, 0x80, 0xc7, 0x3c, 0x88, 0x81}

◆ MENU_SIZE

#define MENU_SIZE   (sizeof(MenuItem)/sizeof(MenuItem[0]))

Typedef Documentation

◆ acpiRsdp

typedef struct _rsdp_ acpiRsdp

ACPI version 1.0 structures.

◆ kentry

typedef void(* kentry) (void *ptr)

Function Documentation

◆ ASCIIToChar16()

void ASCIIToChar16 ( const char *  src,
wchar_t dst 
)

◆ Char16ToASCII()

void Char16ToASCII ( char *  dest,
CHAR16 src 
)

◆ efi_main()

EFI_STATUS efi_main ( EFI_HANDLE  ImageHandle,
EFI_SYSTEM_TABLE SystemTable 
)

Get the address of ACPI Table

◆ prepare_el2_exit_phase1()

void prepare_el2_exit_phase1 ( )

◆ prepare_el2_exit_phase2()

void prepare_el2_exit_phase2 ( )

◆ XEExitEL2()

void XEExitEL2 ( )

◆ XEGetScreenResolutionMode()

int XEGetScreenResolutionMode ( EFI_SYSTEM_TABLE SystemTable)

◆ XEGUIDMatch()

bool XEGUIDMatch ( EFI_GUID  guid1,
EFI_GUID  guid2 
)

◆ XEInitialiseLib()

EFI_STATUS XEInitialiseLib ( EFI_HANDLE  ImageHandle,
EFI_SYSTEM_TABLE SystemTable 
)

◆ XESetGraphicsMode()

UINTN XESetGraphicsMode ( EFI_SYSTEM_TABLE SystemTable,
int  index 
)

Variable Documentation

◆ FdtTableGuid

EFI_GUID FdtTableGuid
Initial value:
= {
0xb1b621d5, 0xf19c, 0x41a5,
{0x83,0x06,0x73,0x0c,0xc1, 0x9b, 0x91, 0x6a}
}

◆ gBS

Cache pointer to the EFI Boot Services Table

◆ gImageHandle

EFI_HANDLE gImageHandle

BSD 2-Clause License

Copyright (c) 2023-2025, 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.

◆ gop

◆ gRS

◆ gSystemTable

EFI_SYSTEM_TABLE* gSystemTable

◆ keBuff

uint64_t keBuff

◆ kernelBuff

void* kernelBuff

◆ MenuItem

MENU_ITEM MenuItem[]
Initial value:
= {
{(CHAR16*)L"640x480"},
{(CHAR16*)L"1024x768"},
{(CHAR16*)L"1280x1024"},
{(CHAR16*)L"1920x1080"}
}
unsigned short CHAR16
Definition ProcessorBind.h:105

◆ xnldr2