From af8a516fc22865abd80d6e26f1541fa3d6bebfdc Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Thu, 9 May 2024 00:42:44 +0200 Subject: MHR-23: :boom:, refactors. - Move NewBoot to /Boot, thus making Kernel directory only containing the kernel. Signed-off-by: Amlal El Mahrouss --- Kernel/Builtins/MBCI/Interface.hxx | 10 +++++++ Kernel/Builtins/MBCI/MBCI.hxx | 55 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 Kernel/Builtins/MBCI/Interface.hxx create mode 100644 Kernel/Builtins/MBCI/MBCI.hxx (limited to 'Kernel/Builtins/MBCI') 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 +#include \ 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 +#include + +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 -- cgit v1.2.3