summaryrefslogtreecommitdiffhomepage
path: root/Private/Source
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-24 14:31:57 +0100
committerAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-24 14:31:57 +0100
commit2a1e69c1fe299d6e2f03cb5ebc78e27de87d0662 (patch)
tree6328a1117557ada5c9577b4c90664dfbf59a2dd2 /Private/Source
parentb842e2d8e09189d527006ca5b3dec58128afe953 (diff)
HCR-11 && HCR-14: Work had been done to bring driver support to hcore's
kernel. - AHCI is the de-facto kernel driver. - Drivers will be loaded as processes (except the builtin disk driver) - A GUI subsystem is in progress. Signed-off-by: Amlal El Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Private/Source')
-rw-r--r--Private/Source/KernelMain.cxx49
1 files changed, 48 insertions, 1 deletions
diff --git a/Private/Source/KernelMain.cxx b/Private/Source/KernelMain.cxx
index e1fba478..e641c7e9 100644
--- a/Private/Source/KernelMain.cxx
+++ b/Private/Source/KernelMain.cxx
@@ -10,7 +10,9 @@
#include <ArchKit/ArchKit.hpp>
#include <EFIKit/Handover.hxx>
#include <KernelKit/FileManager.hpp>
+#include <KernelKit/Framebuffer.hpp>
#include <KernelKit/PEFCodeManager.hxx>
+#include <KernelKit/Rsrc/HCore.hxx>
#include <NewKit/Json.hpp>
#include <NewKit/KernelHeap.hpp>
#include <NewKit/UserHeap.hpp>
@@ -30,7 +32,7 @@ EXTERN_C void RuntimeMain(
/// Init the HAL.
MUST_PASS(HCore::ke_init_hal());
- if (!HandoverHeader->f_LiteEdition) {
+ if (HandoverHeader->f_Bootloader == 0xDD) {
/// Mount a New partition.
HCore::IFilesystemManager::Mount(new HCore::NewFilesystemManager());
@@ -42,6 +44,51 @@ EXTERN_C void RuntimeMain(
HCore::ke_stop(RUNTIME_CHECK_BOOTSTRAP);
}
} else {
+ /**
+ ** This draws the background.
+ */
+
+ for (HCore::SizeT i = 0ul; i < HandoverHeader->f_GOP.f_Width; ++i) {
+ for (HCore::SizeT u = 0ul; u < HandoverHeader->f_GOP.f_Height; ++u) {
+ *(((volatile HCore::UInt32*)(HandoverHeader->f_GOP.f_The +
+ 4 * HandoverHeader->f_GOP.f_PixelPerLine *
+ i +
+ 4 * u))) = RGB(20, 20, 20);
+ }
+ }
+
+ /**
+ ** This draws the HCore resource icon..
+ */
+
+ HCore::SizeT uA = 0;
+
+ for (HCore::SizeT i = 10ul; i < HCORELOGO_WIDTH + 10; ++i) {
+ for (HCore::SizeT u = 10ul; u < HCORELOGO_HEIGHT + 10; ++u) {
+ if (HCoreLogo[uA] == 0) {
+ *(((volatile HCore::UInt32*)(HandoverHeader->f_GOP.f_The +
+ 4 *
+ HandoverHeader->f_GOP
+ .f_PixelPerLine *
+ i +
+ 4 * u))) |= HCoreLogo[uA];
+ } else {
+ *(((volatile HCore::UInt32*)(HandoverHeader->f_GOP.f_The +
+ 4 *
+ HandoverHeader->f_GOP
+ .f_PixelPerLine *
+ i +
+ 4 * u))) = HCoreLogo[uA];
+ }
+
+ ++uA;
+ }
+ }
+
+ /**
+ This mounts the NewFS drive.
+ */
+
HCore::kcout << "HCoreKrnl: Setup is starting...\n";
HCore::kcout << "HCoreKrnl: Mounting drive A: ...\n";
}