diff options
| author | Amlal <amlal@nekernel.org> | 2025-05-07 10:25:43 +0200 |
|---|---|---|
| committer | Amlal <amlal@nekernel.org> | 2025-05-07 10:25:43 +0200 |
| commit | a3ee1df87feddec339c710068e0922a40c6fd494 (patch) | |
| tree | b048d7b0d5422c5dc4a66ad5c86fb165dd8370b3 | |
| parent | f7492b792e5ef083a856787fde2f581f369fa200 (diff) | |
feat(modules/MBCI): add tiemout for memory test.
Signed-off-by: Amlal <amlal@nekernel.org>
| -rw-r--r-- | dev/modules/MBCI/MBCI.h | 9 |
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; } |
