diff options
Diffstat (limited to 'Private/NewBoot/BootKit/BootKit.hxx')
| -rw-r--r-- | Private/NewBoot/BootKit/BootKit.hxx | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/Private/NewBoot/BootKit/BootKit.hxx b/Private/NewBoot/BootKit/BootKit.hxx new file mode 100644 index 00000000..70607a9c --- /dev/null +++ b/Private/NewBoot/BootKit/BootKit.hxx @@ -0,0 +1,81 @@ +/* + * ======================================================== + * + * NewBoot + * Copyright 2024 Mahrouss Logic, all rights reserved. + * + * ======================================================== + */ + +/***********************************************************************************/ +/// @file Boot.hxx +/// @brief Bootloader API. +/***********************************************************************************/ + +#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 (0x8000000) + +HCore::SizeT BStrLen(const char *ptr); +HCore::SizeT BSetMem(char *src, const char byte, const HCore::SizeT len); + +/***********************************************************************************/ +/// Include other APIs. +/***********************************************************************************/ + +#include <BootKit/Processor.hxx> +#include <BootKit/Protocol.hxx> |
