Skip to content

Commit 9ebd4d5

Browse files
committed
extra debug prints
Signed-off-by: Filip Lewiński <[email protected]>
1 parent d1be4e3 commit 9ebd4d5

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,10 @@ TerminalConInReset (
7777
TerminalDevice->DevicePath
7878
);
7979

80+
DEBUG ((DEBUG_INFO, "TERMINAL: TerminalConInReset() called\n"));
8081
Status = TerminalDevice->SerialIo->Reset (TerminalDevice->SerialIo);
81-
82+
DEBUG ((DEBUG_INFO, "TERMINAL: SerialIo->Reset() returned %r\n", Status));
83+
8284
//
8385
// Make all the internal buffer empty for keys
8486
//
@@ -95,6 +97,7 @@ TerminalConInReset (
9597
);
9698
}
9799

100+
DEBUG ((DEBUG_INFO, "TERMINAL: Reset() finished successfully\n"));
98101
return Status;
99102
}
100103

@@ -127,13 +130,17 @@ TerminalConInReadKeyStroke (
127130
//
128131
TerminalDevice = TERMINAL_CON_IN_DEV_FROM_THIS (This);
129132

133+
DEBUG ((DEBUG_INFO, "TERMINAL: ReadKeyStroke() called\n"));
130134
Status = ReadKeyStrokeWorker (TerminalDevice, &KeyData);
135+
DEBUG ((DEBUG_INFO, "TERMINAL: ReadKeyStrokeWorker() returned %r\n", Status));
131136
if (EFI_ERROR (Status)) {
132137
return Status;
133138
}
134139

135140
CopyMem (Key, &KeyData.Key, sizeof (EFI_INPUT_KEY));
136141

142+
DEBUG ((DEBUG_INFO, "TERMINAL: ReadKeyStroke() Key -> ScanCode: %x, Unicode: %x\n",
143+
Key->ScanCode, Key->UnicodeChar));
137144
return EFI_SUCCESS;
138145
}
139146

@@ -486,8 +493,13 @@ TerminalConInWaitForKey (
486493
// Someone is waiting on the keystroke event, if there's
487494
// a key pending, signal the event
488495
//
496+
DEBUG ((DEBUG_INFO, "TERMINAL: WaitForKey() called\n"));
497+
489498
if (!IsEfiKeyFiFoEmpty ((TERMINAL_DEV *)Context)) {
499+
DEBUG ((DEBUG_INFO, "TERMINAL: FIFO not empty, signaling event\n"));
490500
gBS->SignalEvent (Event);
501+
} else {
502+
DEBUG ((DEBUG_INFO, "TERMINAL: FIFO empty, not signaling\n"));
491503
}
492504
}
493505

0 commit comments

Comments
 (0)