summaryrefslogtreecommitdiffhomepage
path: root/Private/NewBoot/BootKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-29 22:38:43 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-29 22:38:43 +0100
commita8c17ccd6d97cc78830917dc6282b040b21ba16c (patch)
tree2181e96ccf9c89c677d2208661bce5584a667470 /Private/NewBoot/BootKit
parent78861f1b16f18a85e9f6890e16eb320412b6ab80 (diff)
Kernel: Update SPECS and TODO list.
Cleaned up the SPECS to get into the point. Current Task: Load kernel into memory. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/NewBoot/BootKit')
-rw-r--r--Private/NewBoot/BootKit/Boot.hxx84
-rw-r--r--Private/NewBoot/BootKit/Protocol.hxx5
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;
};
/**