From e043e3e3bfec98de90386235c8d4c62b34e06665 Mon Sep 17 00:00:00 2001 From: Qingyu Date: Mon, 11 Mar 2024 16:18:41 +0800 Subject: MdeModulePkg: Update the comments of ReadKeyStroke and ReadKeyStrokeEx Refer to Uefi spec 2.10 section 12.3.3, Add a new retval EFI_UNSUPPORTED to EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.ReadKeyStrokeEx and EFI_SIMPLE_TEXT_INPUT_PROTOCOL.ReadKeyStroke(). Cc: Liming Gao Cc: Michael D Kinney Signed-off-by: Qingyu Reviewed-by: Liming Gao --- MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c | 4 +++- MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h | 3 +++ MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c | 2 ++ MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.h | 2 ++ MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c | 6 ++++++ MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h | 6 ++++++ MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h | 4 ++++ MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c | 4 ++++ 8 files changed, 30 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c b/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c index b1ab17a..81d3c6e 100644 --- a/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c +++ b/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c @@ -258,7 +258,8 @@ KeyboardEfiReset ( @param This Pointer to instance of EFI_SIMPLE_TEXT_INPUT_PROTOCOL @param Key The output buffer for key value - @retval EFI_SUCCESS success to read key stroke + @retval EFI_SUCCESS success to read key stroke + @retval EFI_UNSUPPORTED The device does not support the ability to read keystroke data. **/ EFI_STATUS EFIAPI @@ -433,6 +434,7 @@ KeyboardEfiResetEx ( @retval EFI_DEVICE_ERROR The keystroke information was not returned due to hardware errors. @retval EFI_INVALID_PARAMETER KeyData is NULL. + @retval EFI_UNSUPPORTED The device does not support the ability to read keystroke data. **/ EFI_STATUS diff --git a/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h b/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h index ca1dd9b..7b4db9c 100644 --- a/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h +++ b/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h @@ -338,6 +338,7 @@ KeyboardEfiReset ( @param Key The output buffer for key value @retval EFI_SUCCESS success to read key stroke + @retval EFI_UNSUPPORTED The device does not support the ability to read keystroke data. **/ EFI_STATUS EFIAPI @@ -441,6 +442,8 @@ KeyboardEfiResetEx ( @retval EFI_DEVICE_ERROR - The keystroke information was not returned due to hardware errors. @retval EFI_INVALID_PARAMETER - KeyData is NULL. + @retval EFI_UNSUPPORTED - The device does not support the ability to read + keystroke data. **/ EFI_STATUS diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c index e889f42..bcda072 100644 --- a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c +++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c @@ -692,6 +692,7 @@ USBKeyboardReset ( @retval EFI_NOT_READY There was no keystroke data available. @retval EFI_DEVICE_ERROR The keystroke information was not returned due to hardware errors. + @retval EFI_UNSUPPORTED The device does not support the ability to read keystroke data. **/ EFI_STATUS @@ -975,6 +976,7 @@ USBKeyboardResetEx ( @retval EFI_DEVICE_ERROR The keystroke information was not returned due to hardware errors. @retval EFI_INVALID_PARAMETER KeyData is NULL. + @retval EFI_UNSUPPORTED The device does not support the ability to read keystroke data. **/ EFI_STATUS diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.h b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.h index a9dfeaf..b9e9a72 100644 --- a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.h +++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.h @@ -412,6 +412,7 @@ USBKeyboardReset ( @retval EFI_NOT_READY There was no keystroke data available. @retval EFI_DEVICE_ERROR The keystroke information was not returned due to hardware errors. + @retval EFI_UNSUPPORTED The device does not support the ability to read keystroke data. **/ EFI_STATUS @@ -466,6 +467,7 @@ USBKeyboardResetEx ( @retval EFI_DEVICE_ERROR The keystroke information was not returned due to hardware errors. @retval EFI_INVALID_PARAMETER KeyData is NULL. + @retval EFI_UNSUPPORTED The device does not support the ability to read keystroke data. **/ EFI_STATUS diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c index 8b5e62e..0a776f3 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c @@ -3551,6 +3551,8 @@ ConSplitterTextInExDequeueKey ( @retval EFI_NOT_READY There was no keystroke data availiable. @retval EFI_DEVICE_ERROR The keydtroke information was not returned due to hardware errors. + @retval EFI_UNSUPPORTED The device does not support the ability to read + keystroke data. **/ EFI_STATUS @@ -3623,6 +3625,8 @@ ConSplitterTextInPrivateReadKeyStroke ( @retval EFI_NOT_READY There was no keystroke data availiable. @retval EFI_DEVICE_ERROR The keydtroke information was not returned due to hardware errors. + @retval EFI_UNSUPPORTED The device does not support the ability to read + keystroke data. **/ EFI_STATUS @@ -3805,6 +3809,8 @@ ConSplitterTextInResetEx ( @retval EFI_DEVICE_ERROR The keystroke information was not returned due to hardware errors. @retval EFI_INVALID_PARAMETER KeyData is NULL. + @retval EFI_UNSUPPORTED The device does not support the ability to read + keystroke data. **/ EFI_STATUS diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h index a1fe747..354107c 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h @@ -1265,6 +1265,8 @@ ConSplitterTextInReset ( @retval EFI_NOT_READY There was no keystroke data availiable. @retval EFI_DEVICE_ERROR The keydtroke information was not returned due to hardware errors. + @retval EFI_UNSUPPORTED The device does not support the ability to read + keystroke data. **/ EFI_STATUS @@ -1342,6 +1344,8 @@ ConSplitterTextInResetEx ( @retval EFI_DEVICE_ERROR The keystroke information was not returned due to hardware errors. @retval EFI_INVALID_PARAMETER KeyData is NULL. + @retval EFI_UNSUPPORTED The device does not support the ability to read + keystroke data. **/ EFI_STATUS @@ -1453,6 +1457,8 @@ ConSplitterTextInWaitForKey ( @retval EFI_NOT_READY There was no keystroke data availiable. @retval EFI_DEVICE_ERROR The keydtroke information was not returned due to hardware errors. + @retval EFI_UNSUPPORTED The device does not support the ability to read + keystroke data. **/ EFI_STATUS diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h index 4238f84..7581cda 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h +++ b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h @@ -223,6 +223,8 @@ TerminalConInReset ( @retval EFI_SUCCESS The keystroke information is returned successfully. @retval EFI_NOT_READY There is no keystroke data available. @retval EFI_DEVICE_ERROR The dependent serial device encounters error. + @retval EFI_UNSUPPORTED The device does not support the ability to read + keystroke data. **/ EFI_STATUS @@ -303,6 +305,8 @@ TerminalConInResetEx ( @retval EFI_DEVICE_ERROR The keystroke information was not returned due to hardware errors. @retval EFI_INVALID_PARAMETER KeyData is NULL. + @retval EFI_UNSUPPORTED The device does not support the ability to read + keystroke data. **/ EFI_STATUS diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c index 2286264..aafa65f 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c @@ -109,6 +109,8 @@ TerminalConInReset ( @retval EFI_SUCCESS The keystroke information is returned successfully. @retval EFI_NOT_READY There is no keystroke data available. @retval EFI_DEVICE_ERROR The dependent serial device encounters error. + @retval EFI_UNSUPPORTED The device does not support the ability to read + keystroke data. **/ EFI_STATUS @@ -237,6 +239,8 @@ TerminalConInResetEx ( @retval EFI_DEVICE_ERROR The keystroke information was not returned due to hardware errors. @retval EFI_INVALID_PARAMETER KeyData is NULL. + @retval EFI_UNSUPPORTED The device does not support the ability to read + keystroke data. **/ EFI_STATUS -- cgit v1.1