summaryrefslogtreecommitdiffhomepage
path: root/Kernel/Builtins/MBCI
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-05-09 00:42:44 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-05-09 00:42:44 +0200
commitaf8a516fc22865abd80d6e26f1541fa3d6bebfdc (patch)
tree96d42a10945fc03df022389aef54708383c1d616 /Kernel/Builtins/MBCI
parenta874e9cc98df994178d55996943fe81799c61d2f (diff)
MHR-23: :boom:, refactors.
- Move NewBoot to /Boot, thus making Kernel directory only containing the kernel. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Kernel/Builtins/MBCI')
-rw-r--r--Kernel/Builtins/MBCI/Interface.hxx10
-rw-r--r--Kernel/Builtins/MBCI/MBCI.hxx55
2 files changed, 65 insertions, 0 deletions
diff --git a/Kernel/Builtins/MBCI/Interface.hxx b/Kernel/Builtins/MBCI/Interface.hxx
new file mode 100644
index 00000000..d0c51a6c
--- /dev/null
+++ b/Kernel/Builtins/MBCI/Interface.hxx
@@ -0,0 +1,10 @@
+/* -------------------------------------------
+
+ Copyright SoftwareLabs
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.hpp>
+#include <Builtins/MBCI/MBCI.hxx> \ No newline at end of file
diff --git a/Kernel/Builtins/MBCI/MBCI.hxx b/Kernel/Builtins/MBCI/MBCI.hxx
new file mode 100644
index 00000000..f9a20d7c
--- /dev/null
+++ b/Kernel/Builtins/MBCI/MBCI.hxx
@@ -0,0 +1,55 @@
+/* -------------------------------------------
+
+ Copyright SoftwareLabs
+
+------------------------------------------- */
+
+#pragma once
+
+#include <NewKit/Defines.hpp>
+#include <Builtins/ACPI/ACPI.hxx>
+
+namespace NewOS
+{
+ struct MBCIHostInterface;
+
+ /// @brief MBCI Host Interface header.
+ struct PACKED MBCIHostInterface final
+ {
+ UInt32 HostId;
+ UInt16 VendorId;
+ UInt16 DeviceId;
+ UInt8 MemoryType;
+ UInt16 HostType;
+ UInt16 HostFlags;
+ UInt8 Error;
+ UInt8 Status;
+ UInt8 InterruptEnable;
+ UInt64 BaseAddressRegister;
+ UInt64 BaseAddressRegisterSize;
+ };
+
+ /// @brief MBCI host flags.
+ enum MBCIHostFlags
+ {
+ kMBCIHostFlagsSupportsPageProtection, /// Page protected.
+ kMBCIHostFlagsSupportsAPM, /// Advanced Power Management.
+ kMBCIHostFlagsSupportsDaisyChain, /// Is daisy chained.
+ kMBCIHostFlagsSupportsHWInterrupts, /// Has HW interrupts.
+ kMBCIHostFlagsSupportsDMA, /// Has DMA.
+ kMBCIHostFlagsExtended = __UINT16_MAX__, // Extended flags table.
+ };
+
+ enum MBCIHostKind
+ {
+ kMBCIHostKindHardDisk,
+ kMBCIHostKindOpticalDisk,
+ kMBCIHostKindKeyboardLow,
+ kMBCIHostKindMouseLow,
+ kMBCIHostKindMouseHigh,
+ kMBCIHostKindKeyboardHigh,
+ kMBCIHostKindNetworkInterface,
+ kMBCIHostKindDaisyChain,
+ kMBCIHostKindStartExtended = __UINT16_MAX__, /// Extended vendor table.
+ };
+} // namespace NewOS