My Project
Loading...
Searching...
No Matches
kernel.c File Reference
#include "kernel.h"

Go to the source code of this file.

Macros

#define MAX_AHCI_CONTROLLERS   32
#define MAX_MEMORY_MAP_SIZE   0x8000
#define ISRAEL_UTC_OFFSET   3

Functions

void copy_memory_map (BOOT_INFO *boot_info)
void copy_gop (BOOT_INFO *boot_info)
void init_boot_info (BOOT_INFO *boot_info)
void kernel_idle_checks (void)
 __attribute__ ((noreturn))

Variables

bool isBugChecking = false
bool allApsInitialized = false
PROCESSOR cpu0
GOP_PARAMS gop_local
BOOT_INFO boot_info_local
uint64_t ahci_bases_local [MAX_AHCI_CONTROLLERS]
uint8_t apic_list [MAX_CPUS]
uint32_t cpu_count = 0
uint32_t lapicAddress
bool smpInitialized
EPROCESS PsInitialSystemProcess
uint8_t bss_start
uint8_t bss_end

Macro Definition Documentation

◆ ISRAEL_UTC_OFFSET

#define ISRAEL_UTC_OFFSET   3

◆ MAX_AHCI_CONTROLLERS

#define MAX_AHCI_CONTROLLERS   32

Definition at line 32 of file kernel.c.

◆ MAX_MEMORY_MAP_SIZE

#define MAX_MEMORY_MAP_SIZE   0x8000

Ended

Definition at line 41 of file kernel.c.

Function Documentation

◆ __attribute__()

__attribute__ ( (noreturn) )

Remember that paging is on when this is called, as UEFI turned it on.

Definition at line 180 of file kernel.c.

◆ copy_gop()

void copy_gop ( BOOT_INFO * boot_info)

Definition at line 61 of file kernel.c.

◆ copy_memory_map()

void copy_memory_map ( BOOT_INFO * boot_info)

Definition at line 45 of file kernel.c.

◆ init_boot_info()

void init_boot_info ( BOOT_INFO * boot_info)

Definition at line 72 of file kernel.c.

◆ kernel_idle_checks()

void kernel_idle_checks ( void )

Definition at line 100 of file kernel.c.

Variable Documentation

◆ ahci_bases_local

uint64_t ahci_bases_local[MAX_AHCI_CONTROLLERS]

Definition at line 33 of file kernel.c.

◆ allApsInitialized

bool allApsInitialized = false

Definition at line 20 of file kernel.c.

◆ apic_list

uint8_t apic_list[MAX_CPUS]

Definition at line 143 of file kernel.c.

◆ boot_info_local

BOOT_INFO boot_info_local

Definition at line 27 of file kernel.c.

◆ bss_end

uint8_t bss_end
extern

◆ bss_start

uint8_t bss_start
extern

◆ cpu0

PROCESSOR cpu0

Definition at line 21 of file kernel.c.

◆ cpu_count

uint32_t cpu_count = 0

Definition at line 144 of file kernel.c.

◆ gop_local

GOP_PARAMS gop_local

Definition at line 26 of file kernel.c.

◆ isBugChecking

bool isBugChecking = false

Global variables initialization

Definition at line 19 of file kernel.c.

◆ lapicAddress

uint32_t lapicAddress

Definition at line 145 of file kernel.c.

◆ PsInitialSystemProcess

EPROCESS PsInitialSystemProcess

The Stack Overflow check only checks for minor overflows, that don't completely smash the stack, yet do change the canaries (since it only checks in function epilogue) Complete stack smashes are guarded with the guard page in MiCreateKernelStack.

Definition at line 162 of file kernel.c.

◆ smpInitialized

bool smpInitialized

Definition at line 146 of file kernel.c.