summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-07-09 08:57:23 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-07-09 08:57:23 +0200
commitfca3de82a3871b54ec840415640594bbbf62f300 (patch)
tree9f3011370ee5c65aea1d2f9158b672c71cf3c688
parent809e737176b0ed1ddc3524321d0afd6b3e502b53 (diff)
IMP: MBCIHostInterfacePacketFrame add new fields:
- DeviceSpeed field. - Flags field. Also added enum for DeviceSpeed field, we need to define the speed in the MBCI specs. Updated ReadMe.md as well. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
-rw-r--r--Kernel/Modules/MBCI/MBCI.hxx57
-rw-r--r--Kernel/Modules/MBCI/compile_flags.txt4
-rw-r--r--Kernel/Modules/ReadMe.md12
-rw-r--r--Kernel/Modules/ReadMe.txt19
4 files changed, 51 insertions, 41 deletions
diff --git a/Kernel/Modules/MBCI/MBCI.hxx b/Kernel/Modules/MBCI/MBCI.hxx
index c39cc129..44dd1d12 100644
--- a/Kernel/Modules/MBCI/MBCI.hxx
+++ b/Kernel/Modules/MBCI/MBCI.hxx
@@ -4,7 +4,8 @@
------------------------------------------- */
-#pragma once
+#ifndef _INC_MODULE_MBCI_HXX_
+#define _INC_MODULE_MBCI_HXX_
#include <NewKit/Defines.hpp>
#include <Modules/ACPI/ACPI.hxx>
@@ -26,19 +27,29 @@
namespace Kernel
{
struct MBCIHostInterface;
- struct MBCIPacketACK;
+ struct MBCIHostInterfacePacketFrame;
- /// @brief MBCI Acknowledge header.
- struct PACKED MBCIPacketACK final
+ /// @brief MBCI Packet frame header
+ struct PACKED MBCIHostInterfacePacketFrame final
{
UInt32 Magic;
UInt32 HostId;
- UInt16 VendorId;
- UInt16 DeviceId;
- Bool Acknowleged;
+ UInt32 Flags;
+ UInt32 VendorId;
+ UInt32 DeviceId;
+ UInt32 DeviceSpeed;
+ Bool Acknowledge;
Char Zero[cMBCIZeroSz];
};
+ enum
+ {
+ eMBCISpeedDeviceInvalid,
+ eMBCILowSpeedDevice,
+ eMBCIHighSpeedDevice,
+ eMBCISpeedDeviceCount,
+ };
+
/// @brief MBCI Host Interface header.
struct PACKED MBCIHostInterface final
{
@@ -60,24 +71,26 @@ namespace Kernel
/// @brief MBCI host flags.
enum MBCIHostFlags
{
- kMBCIHostFlagsSupportsNothing, // Invalid MBCI device.
- kMBCIHostFlagsSupportsAPM, // Advanced Power Management.
- kMBCIHostFlagsSupportsDaisyChain, // Is daisy chained.
- kMBCIHostFlagsSupportsHWInterrupts, // Has HW interrupts.
- kMBCIHostFlagsSupportsDMA, // Has DMA.
- kMBCIHostFlagsExtended = __UINT16_MAX__, // Extended flags table.
+ eMBCIHostFlagsSupportsNothing, // Invalid MBCI device.
+ eMBCIHostFlagsSupportsAPM, // Advanced Power Management.
+ eMBCIHostFlagsSupportsDaisyChain, // Is daisy chained.
+ eMBCIHostFlagsSupportsHWInterrupts, // Has HW interrupts.
+ eMBCIHostFlagsSupportsDMA, // Has DMA.
+ eMBCIHostFlagsExtended = __UINT16_MAX__, // Extended flags table.
};
enum MBCIHostKind
{
- kMBCIHostKindHardDisk,
- kMBCIHostKindOpticalDisk,
- kMBCIHostKindKeyboardLow,
- kMBCIHostKindMouseLow,
- kMBCIHostKindMouseHigh,
- kMBCIHostKindKeyboardHigh,
- kMBCIHostKindNetworkInterface,
- kMBCIHostKindDaisyChain,
- kMBCIHostKindStartExtended = __UINT16_MAX__, // Extended vendor table.
+ eMBCIHostKindHardDisk,
+ eMBCIHostKindOpticalDisk,
+ eMBCIHostKindKeyboardLow,
+ eMBCIHostKindMouseLow,
+ eMBCIHostKindMouseHigh,
+ eMBCIHostKindKeyboardHigh,
+ eMBCIHostKindNetworkInterface,
+ eMBCIHostKindDaisyChain,
+ eMBCIHostKindStartExtended = __UINT16_MAX__, // Extended vendor table.
};
} // namespace Kernel
+
+#endif // ifndef _INC_MODULE_MBCI_HXX_
diff --git a/Kernel/Modules/MBCI/compile_flags.txt b/Kernel/Modules/MBCI/compile_flags.txt
new file mode 100644
index 00000000..df83bf4c
--- /dev/null
+++ b/Kernel/Modules/MBCI/compile_flags.txt
@@ -0,0 +1,4 @@
+-I./
+-I../../
+-I../../Kernel
+-std=c++20
diff --git a/Kernel/Modules/ReadMe.md b/Kernel/Modules/ReadMe.md
new file mode 100644
index 00000000..dde14fe4
--- /dev/null
+++ b/Kernel/Modules/ReadMe.md
@@ -0,0 +1,12 @@
+# Kernel modules
+
+Pluggable modules for builtin hardware support within the kernel.
+
+## Maintainers
+
+ACPI: Amlal EL Mahrouss.
+AHCI: Amlal EL Mahrouss.
+CoreCG: Amlal EL Mahrouss.
+PS2: Amlal EL Mahrouss.
+ATA: Amlal EL Mahrouss.
+MBCI: Amlal El Mahrouss.
diff --git a/Kernel/Modules/ReadMe.txt b/Kernel/Modules/ReadMe.txt
deleted file mode 100644
index ea2bab42..00000000
--- a/Kernel/Modules/ReadMe.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-==============
-Kernel Modules
-==============
-
-===============
-What are these?
-===============
-
-These are like modules for the kernel.
-
-===================
-Maintainers/Authors
-===================
-
-ACPI: Amlal EL Mahrouss.
-AHCI: Amlal EL Mahrouss.
-CoreCG: Amlal EL Mahrouss.
-PS2: Amlal EL Mahrouss.
-ATA: Amlal EL Mahrouss.