Variable RT+BS 'EFIGlobalVariable:SetupMode' DataSize = 0x01
00000000: 01
This indicates the system is in Setup Mode (SetupMode = 1).
⸻
Observed Behavior
Despite the above, Mosby exits early with:
```ERROR: Setup Mode not enabled (Attempt #1)
Analysis
From Ghidra, Mosby reads SetupMode into a buffer and validates multiple byte offsets:
```byte local_45[5];
status = GetVariable(L"SetupMode", ..., data_size, local_45);
if ((status < 0) ||
(local_45[4] == 1) ||
(local_45[3] != 1) ||
(local_45[2] != 0)) {
Print("ERROR: Setup Mode not enabled");
}
On this system:
• Firmware returns SetupMode as a 1-byte value (0x01)
• Higher buffer offsets are not meaningful but are still checked
• This causes a valid Setup Mode to be rejected
⸻
Expected Behavior
Mosby should accept a valid SetupMode = 1 result, e.g.:
```status == EFI_SUCCESS && local_45[0] == 1
or validate based on returned data size rather than fixed offsets.
⸻
Impact
This prevents Mosby from running on otherwise valid systems, blocking:
• Removal of Microsoft PCA 2011
• Installation of Windows UEFI CA 2023
⸻
Suggested Fix
Replace strict buffer validation with a simpler check:
```if (status != EFI_SUCCESS || local_45[0] != 1) {
error;
}
or validate using returned data size rather than fixed offsets.
This should improve compatibility with OEM firmware implementations.
⸻
Notes
• Issue reproduced consistently on Dell OptiPlex 7060
⸻
Bug: False “Setup Mode not enabled” on Dell firmware
Summary
Mosby reports:
on a Dell OptiPlex 7060 system, even though the firmware is verifiably in Setup Mode.
Environment
Verification
From UEFI Shell: