diff options
Diffstat (limited to 'Private/NewBoot/BootKit')
| -rw-r--r-- | Private/NewBoot/BootKit/Boot.hxx | 84 | ||||
| -rw-r--r-- | Private/NewBoot/BootKit/Protocol.hxx | 5 |
2 files changed, 52 insertions, 37 deletions
diff --git a/Private/NewBoot/BootKit/Boot.hxx b/Private/NewBoot/BootKit/Boot.hxx index 07148702..4bdc9c84 100644 --- a/Private/NewBoot/BootKit/Boot.hxx +++ b/Private/NewBoot/BootKit/Boot.hxx @@ -7,6 +7,11 @@ * ======================================================== */ +/***********************************************************************************/ +/// @file Boot.hxx +/// @brief Bootloader API. +/***********************************************************************************/ + #pragma once #include <NewKit/Defines.hpp> @@ -15,55 +20,62 @@ using namespace hCore; typedef void *PEFImage; -enum -{ - kSegmentCode = 2, - kSegmentData = 4, - kSegmentBss = 6, +enum { + kSegmentCode = 2, + kSegmentData = 4, + kSegmentBss = 6, }; /** * @brief BootKit Text Writer class * Writes to VGA. */ -class BKTextWriter final -{ - volatile UInt16 *fWhere{nullptr}; +class BKTextWriter final { + volatile UInt16 *fWhere{nullptr}; - public: - void WriteString(const char *c, unsigned char forecolour, unsigned char backcolour, int x, int y); + 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); + void WriteCharacter(char c, unsigned char forecolour, + unsigned char backcolour, int x, int y); - public: - BKTextWriter() = default; - ~BKTextWriter() = default; + public: + BKTextWriter() = default; + ~BKTextWriter() = default; - public: - BKTextWriter &operator=(const BKTextWriter &) = default; - BKTextWriter(const 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, +enum { + kBlack, + kBlue, + kGreen, + kCyan, + kRed, + kMagenta, + kBrown, + kLightGray, + kDarkGray, + kLightBlue, + kLightGreen, + kLightCyan, + kLightRed, + kLightMagenta, + kYellow, + kWhite, }; -#define BK_START_KERNEL (0x10000000) +#define BK_START_KERNEL (0x80000000) 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> diff --git a/Private/NewBoot/BootKit/Protocol.hxx b/Private/NewBoot/BootKit/Protocol.hxx index bcbb43a3..26eef7e7 100644 --- a/Private/NewBoot/BootKit/Protocol.hxx +++ b/Private/NewBoot/BootKit/Protocol.hxx @@ -55,8 +55,11 @@ struct HandoverInformationHeader { SizeT f_VirtualSize; voidPtr f_PhysicalStart; SizeT f_PhysicalSize; - voidPtr f_FirmwareVendorName; + Char f_FirmwareVendorName[32]; SizeT f_FirmwareVendorLen; + voidPtr f_RsdPtr; + voidPtr f_SmBIOS; + voidPtr f_RTC; }; /** |
