summaryrefslogtreecommitdiffstats
path: root/kernel/kernel.c
diff options
context:
space:
mode:
authorAlexey Gavrilov <90127298+rebovas@users.noreply.github.com>2024-03-27 19:50:26 +0700
committerGitHub <noreply@github.com>2024-03-27 19:50:26 +0700
commita276644952ed018e77ca64181059434a6bc4ee62 (patch)
treee6a457ec4b2758c0c3bef78df475ad52d92a7ab4 /kernel/kernel.c
parent91b4d8fa6bed598e2969f16a7a953e293a1b7f89 (diff)
parente51dea0b6e34c2959b3b0f4a5db6b11d4b619960 (diff)
Merge pull request #5 from rebovas/acpi_madt
Acpi madt + some updates
Diffstat (limited to 'kernel/kernel.c')
-rw-r--r--kernel/kernel.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/kernel/kernel.c b/kernel/kernel.c
index dfb03e4..36fb0fd 100644
--- a/kernel/kernel.c
+++ b/kernel/kernel.c
@@ -1,6 +1,8 @@
#include "../arch/SecondaryInit.h"
+#include "../drivers/acpi/Acpi.h"
+#include <StringOperations.h>
-#include "../arch/x86/cpuinfo/Cpuinfo.h"
+void empty() {};
void main()
{
@@ -10,4 +12,23 @@ void main()
init.devicesInitialize();
out::display << "Hello, World!\n";
+ Rsdp *rsdp = (Rsdp *)StringOperations::findInMemory(Rsdp::signatureString,
+ MemArea(
+ Rsdp::romAreaStart,
+ Rsdp::romAreaEnd));
+ const Rsdt *rsdt = rsdp->getRsdt();
+ const Entry *entry = rsdt->getEntry(1);
+ const Madt *madt = (Madt *)entry;
+ const Ics *icsEntry[10] = {madt->getIcs(0),
+ madt->getIcs(1),
+ madt->getIcs(2),
+ madt->getIcs(3),
+ madt->getIcs(4),
+ madt->getIcs(5),
+ madt->getIcs(6),
+ madt->getIcs(7),
+ madt->getIcs(8)};
+ const IoapicStruct *ioapicStruct = (IoapicStruct *)icsEntry[1];
+ out::display << '\n';
+ empty();
};