mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-26 19:25:02 +00:00
Stub out easter egg, in case BIOS wants to implement one.
BUG=none TEST=manual Type 'xyzzy' at dev-mode BIOS screen. What happens next depends on the BIOS. Change-Id: Ifdb49eb6cb53ecee91f576be91679bd5a232f008 Reviewed-on: http://gerrit.chromium.org/gerrit/7656 Tested-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
@@ -461,8 +461,19 @@ VbError_t VbDisplayDebugInfo(VbCommonParams* cparams, VbNvContext *vncptr) {
|
||||
}
|
||||
|
||||
|
||||
#define MAGIC_WORD_LEN 5
|
||||
#define MAGIC_WORD "xyzzy"
|
||||
static uint8_t MagicBuffer[MAGIC_WORD_LEN];
|
||||
|
||||
VbError_t VbCheckDisplayKey(VbCommonParams* cparams, uint32_t key,
|
||||
VbNvContext *vncptr) {
|
||||
int i;
|
||||
|
||||
/* Update key buffer */
|
||||
for(i=1; i<MAGIC_WORD_LEN; i++)
|
||||
MagicBuffer[i-1] = MagicBuffer[i];
|
||||
/* Save as lower-case ASCII */
|
||||
MagicBuffer[MAGIC_WORD_LEN-1] = (key | 0x20) & 0xFF;
|
||||
|
||||
if ('\t' == key) {
|
||||
/* Tab = display debug info */
|
||||
@@ -488,5 +499,9 @@ VbError_t VbCheckDisplayKey(VbCommonParams* cparams, uint32_t key,
|
||||
return VbDisplayScreen(cparams, disp_current_screen, 1, vncptr);
|
||||
}
|
||||
|
||||
if (0 == Memcmp(MagicBuffer, MAGIC_WORD, MAGIC_WORD_LEN)) {
|
||||
VBEASTEREGG(cparams, vncptr);
|
||||
}
|
||||
|
||||
return VBERROR_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user