diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-27 10:26:31 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-27 10:26:31 +0100 |
| commit | 70e95128b11dbb535e4679cbacb1cbeaa414c822 (patch) | |
| tree | 42fd94536a54058a39f0c85be99431c6ad1a0cf8 /Private/NewBoot/BootKit | |
| parent | 44a081a4442181b208c09c6f748124c9d23b61fd (diff) | |
Kernel: Improving AMD64 HAL, Add TIBInstall.asm, currently Working on
SMPManager and Bootloader.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/NewBoot/BootKit')
| -rw-r--r-- | Private/NewBoot/BootKit/Boot.hpp | 77 |
1 files changed, 77 insertions, 0 deletions
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 <NewKit/Defines.hpp> + +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) + |
