XenevaOS
Loading...
Searching...
No Matches
aurora.h
Go to the documentation of this file.
1
30#ifndef __AURORA_H__
31#define __AURORA_H__
32
33#pragma once
34
35#include <stdint.h>
36
37
38#define AU_EXPORT __declspec(dllexport)
39#define AU_IMPORT __declspec(dllimport)
40
41#ifdef __AU_KERNEL__
42#define AU_FUNC AU_EXPORT
43#else
44#define AU_FUNC AU_IMPORT
45#endif
46
47#ifdef __cplusplus
48#define AU_EXTERN extern "C"
49#else
50#define AU_EXTERN extern
51#endif
52
53
54#ifdef ARCH_X64
55#define KERNEL_STACK_LOCATION 0xFFFFFB0000000000
56#elif ARCH_ARM64
57#define KERNEL_STACK_LOCATION 0xFFFFB00000000000 //0x0000000B00000000
58#endif
59
60#define KERNEL_STACK_SIZE 40960//16384 //16KiB
61
62
63typedef struct _lbprotocol_ {
69 /* we should take care of
70 * little boot binary occupied
71 * memory area also, becasuse
72 * upto the main kernel becomes
73 * standalone, we can't neglect
74 * little boot code. because memory
75 * map data structure, and paging
76 * data structures are statically
77 * allocated within this region
78 */
81
82 /* usable memory map describes
83 * usable memory areas*/
90
91
92
93#define BOOT_UEFI_x64 1
94#define BOOT_UEFI_ARM64 2
95#define BOOT_LITTLEBOOT_ARM64 3
100typedef struct _KERNEL_BOOT_INFO_ {
101 /* Boot type either UEFI_BOOT or BIOS_BOOT */
103
105
107
108 /* map -- UEFI memory map */
109 void *map;
110
111 /* descriptor_size -- UEFI memory map descriptor size */
113
114 /* mem_map_size -- UEFI memory map size */
116
117 /* graphics_framebuffer -- framebuffer address passed by XNLDR */
119
120 /* fb_size -- framebuffer total size */
121 size_t fb_size;
122
123 /* X_Resolution -- Total width of the entire display */
125
126 /* Y_Resolution -- Total height of the entire display */
128
129 /* pixels_per_line -- scanline of the current display */
131
132 /* redmask, greenmask, bluemask, resvmask -- color mask */
137
138 /* acpi_table_pointer -- acpi base memory map */
140
141 /* kernel_size -- total kernel image size */
143
144 /* psf_font_data -- screen font address loaded
145 by XNLDR to use for debugging purpose */
147
148 /* printf_gui -- character printing function pointer to use
149 for debugging purpose provided by XNLDR */
150 void(*printf_gui) (const char* text, ...);
151
152 /* unused pointer entries */
159 void* apcode;
164
165/*
166 * AuGetBootInfoStruc -- return kernel boot information
167 */
169
170#endif
struct _KERNEL_BOOT_INFO_ * PKERNEL_BOOT_INFO
#define AU_EXTERN
Definition aurora.h:50
struct _lbprotocol_ AuLittleBootProtocol
struct _KERNEL_BOOT_INFO_ KERNEL_BOOT_INFO
AU_EXTERN AU_EXPORT KERNEL_BOOT_INFO * AuGetBootInfoStruc()
AuGetBootInfoStruc – return kernel boot information.
Definition init.c:153
#define AU_EXPORT
Definition aurora.h:38
unsigned int uint32_t
Definition acefiex.h:163
unsigned char uint8_t
Definition acefiex.h:161
COMPILER_DEPENDENT_UINT64 uint64_t
Definition acefiex.h:165
unsigned short int uint16_t
Definition acefiex.h:162
Definition aurora.h:100
uint16_t pixels_per_line
Definition aurora.h:130
uint8_t * driver_entry6
ATA.
Definition aurora.h:158
int boot_type
Definition aurora.h:102
void * allocated_stack
Definition aurora.h:104
uint32_t redmask
Definition aurora.h:133
void * acpi_table_pointer
Definition aurora.h:139
uint32_t greenmask
Definition aurora.h:134
size_t fb_size
Definition aurora.h:121
uint8_t * driver_entry5
FLOPPY.
Definition aurora.h:157
uint64_t reserved_mem_count
Definition aurora.h:106
uint64_t descriptor_size
Definition aurora.h:112
void * apcode
USB.
Definition aurora.h:159
uint32_t * graphics_framebuffer
Definition aurora.h:118
uint32_t bluemask
Definition aurora.h:135
uint8_t * driver_entry2
Definition aurora.h:154
uint8_t * driver_entry4
AHCI.
Definition aurora.h:156
uint8_t * driver_entry3
NVME.
Definition aurora.h:155
uint64_t mem_map_size
Definition aurora.h:115
uint32_t cid
Definition aurora.h:162
uint16_t X_Resolution
Definition aurora.h:124
uint8_t * driver_entry1
Definition aurora.h:153
void * map
Definition aurora.h:109
uint8_t * psf_font_data
Definition aurora.h:146
void(* printf_gui)(const char *text,...)
Definition aurora.h:150
uint16_t Y_Resolution
Definition aurora.h:127
size_t kernel_size
Definition aurora.h:142
uint32_t resvmask
Definition aurora.h:136
uint32_t hid
Definition aurora.h:160
uint32_t uid
Definition aurora.h:161
Definition aurora.h:63
uint64_t physicalEnd
Definition aurora.h:87
uint64_t device_tree_end
Definition aurora.h:67
uint64_t initrd_end
Definition aurora.h:65
uint64_t littleBootStart
Definition aurora.h:79
uint64_t numberOfPages
Definition aurora.h:88
uint64_t device_tree_sz
Definition aurora.h:68
uint64_t initrd_start
Definition aurora.h:64
uint64_t littleBootEnd
Definition aurora.h:80
int usable_region_count
Definition aurora.h:85
uint64_t physicalStart
Definition aurora.h:86
void * usable_memory_map
Definition aurora.h:84
uint64_t device_tree_base
Definition aurora.h:66