summaryrefslogtreecommitdiffhomepage
path: root/dev
diff options
context:
space:
mode:
authorAmlal <amlal@nekernel.org>2025-05-07 10:25:43 +0200
committerAmlal <amlal@nekernel.org>2025-05-07 10:25:43 +0200
commita3ee1df87feddec339c710068e0922a40c6fd494 (patch)
treeb048d7b0d5422c5dc4a66ad5c86fb165dd8370b3 /dev
parentf7492b792e5ef083a856787fde2f581f369fa200 (diff)
feat(modules/MBCI): add tiemout for memory test.
Signed-off-by: Amlal <amlal@nekernel.org>
Diffstat (limited to 'dev')
-rw-r--r--dev/modules/MBCI/MBCI.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/dev/modules/MBCI/MBCI.h b/dev/modules/MBCI/MBCI.h
index f2bd7f71..37c18f79 100644
--- a/dev/modules/MBCI/MBCI.h
+++ b/dev/modules/MBCI/MBCI.h
@@ -99,7 +99,14 @@ typedef UInt32 MBCIAuthKeyType;
/// @internal
inline BOOL busi_test_mmio(_Input volatile struct IMBCIHost* host, const UInt32 test) {
host->MMIOTest = test;
- while (host->MMIOTest == test);
+ UInt16 timeout = 0UL;
+
+ while (host->MMIOTest == test) {
+ ++timeout;
+
+ if (timeout > 0x1000)
+ return NO;
+ }
return host->MMIOTest == 0;
}