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:
Bill Richardson
2011-09-13 15:28:55 -07:00
parent c55f0f6c7a
commit 518d4f39b4
4 changed files with 26 additions and 3 deletions

View File

@@ -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;
}