XenevaOS
Loading...
Searching...
No Matches
xnldr.h
Go to the documentation of this file.
1
30#ifndef __XNLDR2_H__
31#define __XNLDR2_H__
32
33#include <stdint.h>
34#include <Uefi.h>
36#include <stddef.h>
37#include <aurora.h>
38#ifndef SIZE_MAX
39#if defined(ARCH_ARM64) || defined(ARCH_X64) || defined(_M_AMD64) || defined(_M_ARM64) || \
40 defined(__x86_64__) || defined(__aarch64__)
41#define SIZE_MAX 0xFFFFFFFFFFFFFFFFULL
42#else
43#define SIZE_MAX 0xFFFFFFFFULL
44#endif
45#endif
46//#include <stddef.h>
47
48#ifdef __TARGET_BOARD_RPI3__
49#define MMIO_BASE 0x3F000000
50#endif
51
52//#pragma pack(push,1)
53
54/*
55 *FRAMEBUFFER_INFORMATION :
56 * framebuffer structure
57 */
58typedef struct _FB_INFO_ {
61 size_t size;
70
71/* I intentionally have the loader and kernel share one hand-off structure, better not fragment it --axiss */
74
75//#pragma pack(pop)
76
77typedef void (*XEImageEntry)(XEBootInfo*);
78
79struct EfiMemoryMap {
85};
86
91
92/*
93 * XEAllocatePool -- allocate pool memory
94 * @param sz -- size in bytes to allocate
95 */
96extern void* XEAllocatePool(const uint64_t sz);
97
98/*
99 * XEFreePool -- frees up previously allocated
100 * pool memory
101 * @param Buffer -- Pointer to previously allocated
102 * pool memory
103 */
104extern void XEFreePool(void* Buffer);
105
106extern void ASCIIToChar16(const char* src, wchar_t* dst);
107extern void Char16ToASCII(char* dest, CHAR16* src);
108#endif
UINT64 UINTN
Definition ProcessorBind.h:118
unsigned short CHAR16
Definition ProcessorBind.h:105
unsigned int UINT32
Definition ProcessorBind.h:102
void ASCIIToChar16(const char *src, wchar_t *dst)
Definition xnldr.cpp:354
void Char16ToASCII(char *dest, CHAR16 *src)
Definition xnldr.cpp:347
struct _XE_BOOT_INFO_ * XEPBootInfo
EFI_RUNTIME_SERVICES * gRS
Definition xnldr.cpp:49
struct _FB_INFO_ * PFRAMEBUFFER_INFORMATION
struct _XE_BOOT_INFO_ XEBootInfo
void * XEAllocatePool(const uint64_t sz)
Definition mem.cpp:39
struct _FB_INFO_ FRAMEBUFFER_INFORMATION
EFI_HANDLE gImageHandle
Definition xnldr.cpp:41
void XEFreePool(void *Buffer)
Definition mem.cpp:50
EFI_SYSTEM_TABLE * gSystemTable
Definition xnldr.cpp:42
void(* XEImageEntry)(XEBootInfo *)
Definition xnldr.h:106
EFI_BOOT_SERVICES * gBS
Definition xnldr.cpp:51
VOID * EFI_HANDLE
Definition UefiBaseType.h:37
unsigned int uint32_t
Definition acefiex.h:163
COMPILER_DEPENDENT_UINT64 uint64_t
Definition acefiex.h:165
unsigned short int uint16_t
Definition acefiex.h:162
Definition UefiSpec.h:1850
Definition UefiSpec.h:104
Definition UefiSpec.h:1798
Definition UefiSpec.h:1963
Definition xnldr.h:109
UINTN MapKey
Definition xnldr.h:82
UINT32 DescriptorVersion
Definition xnldr.h:112
UINTN MemMapSize
Definition xnldr.h:81
UINTN DescriptorSize
Definition xnldr.h:83
EFI_MEMORY_DESCRIPTOR * memmap
Definition xnldr.h:110
Definition xnldr.h:52
uint32_t greenmask
Definition xnldr.h:60
uint32_t * graphics_framebuffer
Definition xnldr.h:54
uint16_t X_Resolution
Definition xnldr.h:57
uint16_t Y_Resolution
Definition xnldr.h:58
uint32_t redmask
Definition xnldr.h:59
uint32_t * phyaddr
Definition xnldr.h:53
uint32_t bluemask
Definition xnldr.h:61
size_t size
Definition xnldr.h:55
uint16_t pixelsPerLine
Definition xnldr.h:56
uint32_t resvmask
Definition xnldr.h:62
Definition aurora.h:116
Definition xnldr.h:70