From 70e95128b11dbb535e4679cbacb1cbeaa414c822 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sat, 27 Jan 2024 10:26:31 +0100 Subject: Kernel: Improving AMD64 HAL, Add TIBInstall.asm, currently Working on SMPManager and Bootloader. Signed-off-by: Amlal El Mahrouss --- Private/NewBoot/BootKit/Boot.hpp | 77 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 Private/NewBoot/BootKit/Boot.hpp (limited to 'Private/NewBoot/BootKit') diff --git a/Private/NewBoot/BootKit/Boot.hpp b/Private/NewBoot/BootKit/Boot.hpp new file mode 100644 index 00000000..7323737e --- /dev/null +++ b/Private/NewBoot/BootKit/Boot.hpp @@ -0,0 +1,77 @@ +/* + * ======================================================== + * + * NewBoot + * Copyright 2024 Mahrouss Logic, all rights reserved. + * + * ======================================================== + */ + +#pragma once + +#include + +using namespace hCore; + +typedef void* PEFImage; + +enum +{ + kSegmentCode = 2, + kSegmentData = 4, + kSegmentBss = 6, +}; + +/** + * @brief BootKit Text Writer class + * Writes to VGA. + */ +class BKTextWriter final +{ + volatile UInt16* fWhere{ nullptr }; + +public: + void WriteString(const char* c, + unsigned char forecolour, + unsigned char backcolour, + int x, + int y); + + void WriteCharacter(char c, + unsigned char forecolour, + unsigned char backcolour, + int x, + int y); + +public: + BKTextWriter() = default; + ~BKTextWriter() = default; + +public: + BKTextWriter& operator=(const BKTextWriter&) = default; + BKTextWriter(const BKTextWriter&) = default; + +}; + +enum +{ + kBlack, + kBlue, + kGreen, + kCyan, + kRed, + kMagenta, + kBrown, + kLightGray, + kDarkGray, + kLightBlue, + kLightGreen, + kLightCyan, + kLightRed, + kLightMagenta, + kYellow, + kWhite, +}; + +#define BK_START_KERNEL (0x00080000) + -- cgit v1.2.3