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 0x0000000B00000000
58#endif
59
60#define KERNEL_STACK_SIZE 40960//16384 //16KiB
61
62typedef struct _lbprotocol_ {
68 /* we should take care of
69 * little boot binary occupied
70 * memory area also, becasuse
71 * upto the main kernel becomes
72 * standalone, we can't neglect
73 * little boot code. because memory
74 * map data structure, and paging
75 * data structures are statically
76 * allocated within this region
77 */
80
81 /* usable memory map describes
82 * usable memory areas*/
89
90
91
92#define BOOT_UEFI_x64 1
93#define BOOT_UEFI_ARM64 2
94#define BOOT_LITTLEBOOT_ARM64 3
99typedef struct _KERNEL_BOOT_INFO_ {
100 /* Boot type either UEFI_BOOT or BIOS_BOOT */
102
104
106
107 /* map -- UEFI memory map */
108 void *map;
109
110 /* descriptor_size -- UEFI memory map descriptor size */
112
113 /* mem_map_size -- UEFI memory map size */
115
116 /* graphics_framebuffer -- framebuffer address passed by XNLDR */
118
119 /* fb_size -- framebuffer total size */
120 size_t fb_size;
121
122 /* X_Resolution -- Total width of the entire display */
124
125 /* Y_Resolution -- Total height of the entire display */
127
128 /* pixels_per_line -- scanline of the current display */
130
131 /* redmask, greenmask, bluemask, resvmask -- color mask */
136
137 /* acpi_table_pointer -- acpi base memory map */
139
140 /* kernel_size -- total kernel image size */
142
143 /* psf_font_data -- screen font address loaded
144 by XNLDR to use for debugging purpose */
146
147 /* printf_gui -- character printing function pointer to use
148 for debugging purpose provided by XNLDR */
149 void(*printf_gui) (const char* text, ...);
150
151 /* unused pointer entries */
158 void* apcode;
163
164/*
165 * AuGetBootInfoStruc -- return kernel boot information
166 */
168
169#endif
struct _KERNEL_BOOT_INFO_ * PKERNEL_BOOT_INFO
struct _lbprotocol_ AuLittleBootProtocol
struct _KERNEL_BOOT_INFO_ KERNEL_BOOT_INFO
KERNEL_BOOT_INFO * AuGetBootInfoStruc()
AuGetBootInfoStruc – return kernel boot information.
Definition init.c:151
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:99
uint16_t pixels_per_line
Definition aurora.h:129
uint8_t * driver_entry6
ATA.
Definition aurora.h:157
int boot_type
Definition aurora.h:101
void * allocated_stack
Definition aurora.h:103
uint32_t redmask
Definition aurora.h:132
void * acpi_table_pointer
Definition aurora.h:138
uint32_t greenmask
Definition aurora.h:133
size_t fb_size
Definition aurora.h:120
uint8_t * driver_entry5
FLOPPY.
Definition aurora.h:156
uint64_t reserved_mem_count
Definition aurora.h:105
uint64_t descriptor_size
Definition aurora.h:111
void * apcode
USB.
Definition aurora.h:158
uint32_t * graphics_framebuffer
Definition aurora.h:117
uint32_t bluemask
Definition aurora.h:134
uint8_t * driver_entry2
Definition aurora.h:153
uint8_t * driver_entry4
AHCI.
Definition aurora.h:155
uint8_t * driver_entry3
NVME.
Definition aurora.h:154
uint64_t mem_map_size
Definition aurora.h:114
uint32_t cid
Definition aurora.h:161
uint16_t X_Resolution
Definition aurora.h:123
uint8_t * driver_entry1
Definition aurora.h:152
void * map
Definition aurora.h:108
uint8_t * psf_font_data
Definition aurora.h:145
void(* printf_gui)(const char *text,...)
Definition aurora.h:149
uint16_t Y_Resolution
Definition aurora.h:126
size_t kernel_size
Definition aurora.h:141
uint32_t resvmask
Definition aurora.h:135
uint32_t hid
Definition aurora.h:159
uint32_t uid
Definition aurora.h:160
Definition aurora.h:62
uint64_t physicalEnd
Definition aurora.h:86
uint64_t device_tree_end
Definition aurora.h:66
uint64_t initrd_end
Definition aurora.h:64
uint64_t littleBootStart
Definition aurora.h:78
uint64_t numberOfPages
Definition aurora.h:87
uint64_t device_tree_sz
Definition aurora.h:67
uint64_t initrd_start
Definition aurora.h:63
uint64_t littleBootEnd
Definition aurora.h:79
int usable_region_count
Definition aurora.h:84
uint64_t physicalStart
Definition aurora.h:85
void * usable_memory_map
Definition aurora.h:83
uint64_t device_tree_base
Definition aurora.h:65