summaryrefslogtreecommitdiffhomepage
path: root/Kernel/Modules/MBCI
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Modules/MBCI')
-rw-r--r--Kernel/Modules/MBCI/Interface.hxx2
-rw-r--r--Kernel/Modules/MBCI/MBCI.hxx72
-rw-r--r--Kernel/Modules/MBCI/compile_flags.txt4
3 files changed, 49 insertions, 29 deletions
diff --git a/Kernel/Modules/MBCI/Interface.hxx b/Kernel/Modules/MBCI/Interface.hxx
index fa6f479b..f40cc9cb 100644
--- a/Kernel/Modules/MBCI/Interface.hxx
+++ b/Kernel/Modules/MBCI/Interface.hxx
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright Zeta Electronics Corporation
+ Copyright ZKA Technologies
------------------------------------------- */
diff --git a/Kernel/Modules/MBCI/MBCI.hxx b/Kernel/Modules/MBCI/MBCI.hxx
index e8b48501..ab423be2 100644
--- a/Kernel/Modules/MBCI/MBCI.hxx
+++ b/Kernel/Modules/MBCI/MBCI.hxx
@@ -1,10 +1,11 @@
/* -------------------------------------------
- Copyright Zeta Electronics Corporation
+ Copyright ZKA Technologies
------------------------------------------- */
-#pragma once
+#ifndef _INC_MODULE_MBCI_HXX_
+#define _INC_MODULE_MBCI_HXX_
#include <NewKit/Defines.hpp>
#include <Modules/ACPI/ACPI.hxx>
@@ -13,32 +14,42 @@
- VCC (IN) (OUT for MCU)
- CLK (IN) (OUT for MCU)
- ACK (BI) (Contains an Acknowledge Packet Frame)
-- D0- (IN) (Starts with the Host Imterface Packet Frame)
-- D1- (IN) (Starts with the Host Imterface Packet Frame)
-- D0+ (OUT) (Starts with the Host Imterface Packet Frame)
-- D1+ (OUT) (Starts with the Host Imterface Packet Frame)
+- D0- (IN) (Starts with the Host Interface Packet Frame)
+- D1- (IN) (Starts with the Host Interface Packet Frame)
+- D0+ (OUT) (Starts with the Host Interface Packet Frame)
+- D1+ (OUT) (Starts with the Host Interface Packet Frame)
- GND (IN) (OUT for MCU)
*/
#define cMBCIZeroSz (8)
-#define cMBCIMagic "MBCI "
+#define cMBCIMagic "MBCI "
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,29 @@ namespace Kernel
/// @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.
+ 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.
};
+
+ /// @brief An AuthKey is a context used to decrpy data from an MBCI packet.
+ typedef UInt64 MBCIAuthyKeyType;
} // 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