summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal/Console
Commit message (Collapse)AuthorAgeFilesLines
* MdeModulePkg: Avoid key notification called more than onceDandan Bi2018-09-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=996 Issue: In current code logic, when a key is pressed, it will search the whole NotifyList to find whether a notification has been registered with the keystroke. if yes, it will en-queue the key for notification execution later. And now if different notification functions have been registered with the same key, then the key will be en-queued more than once. Then it will cause the notification executed more than once. This patch is to enhance the code logic to fix this issue. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg/ConPlatform: Support short-form USB device pathRuiyu Ni2018-09-123-199/+339
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Today's implementation does an exact device path match to check whether the device path of a console is in ConIn/ConOut/ErrOut. But that doesn't work for the USB keyboard. Because when a platform have multiple USB port, ConIn needs to carry all device paths corresponding to each port. Even worse, today's BDS core logic removes the device path from ConIn/ConOut/ErrOut when the connection to that device path fails. So if user switches the USB keyboard from one port to another across boot, the USB keyboard doesn't work in the second boot. ConPlatform driver solved this problem by adding the IsHotPlugDevice() function. So that for USB keyboard, ConPlatform doesn't care whether its device path is in ConIn or not. But the rule is too loose, and now causes platform BDS cannot control whether to enable USB keyboard as an active console. The patch changes ConPlatform to support USB short-form device path when checking whether the device path of a console is in ConIn/ConOut/ErrOut. The logic to always accept USB/PCCARD device as active console is removed. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg: Removing ipf which is no longer supported from edk2.Chen A Chen2018-09-064-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removing rules for Ipf sources file: * Remove the source file which path with "ipf" and also listed in [Sources.IPF] section of INF file. * Remove the source file which listed in [Components.IPF] section of DSC file and not listed in any other [Components] section. * Remove the embedded Ipf code for MDE_CPU_IPF. Removing rules for Inf file: * Remove IPF from VALID_ARCHITECTURES comments. * Remove DXE_SAL_DRIVER from LIBRARY_CLASS in [Defines] section. * Remove the INF which only listed in [Components.IPF] section in DSC. * Remove statements from [BuildOptions] that provide IPF specific flags. * Remove any IPF sepcific sections. Removing rules for Dec file: * Remove [Includes.IPF] section from Dec. Removing rules for Dsc file: * Remove IPF from SUPPORTED_ARCHITECTURES in [Defines] section of DSC. * Remove any IPF specific sections. * Remove statements from [BuildOptions] that provide IPF specific flags. Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg TerminalDxe: Remove a redundant functionshenglei2018-08-212-37/+0
| | | | | | | | | | | | | | The function UnicodeFiFoGetKeyCount that is never called has been removed. https://bugzilla.tianocore.org/show_bug.cgi?id=1062 Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: shenglei <shenglei.zhang@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* MdeModulePkg: Clean up source filesLiming Gao2018-06-2819-148/+148
| | | | | | | | | | 1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg/Terminal: Check status of OpenProtocol in BindingStartRuiyu Ni2018-05-031-1/+7
| | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=917 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Steven Shi <steven.shi@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg/Terminal: ReadKeyStrokeEx always return key stateRuiyu Ni2018-03-061-5/+4
| | | | | | | | | Because terminal doesn't support shift and toggle key state, ReadKeyStrokeEx just sets the two states to 0. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg/ConSplitter: ReadKeyStrokeEx always return key stateRuiyu Ni2018-02-012-25/+151
| | | | | | | | | | | | | | Today's implementation only return key state when there is key. But when user doesn't press any key, the key state cannot be returned. The patch changes the ReadKeyStrokeEx() to always return the key state even there is no key pressed. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com>
* MdeModulePkg/TerminalDxe: Fix PCANSI mapping for TRIANGLE and ARROWMichael D Kinney2017-11-131-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=761 When a TerminalType is set to PCANSI, characters in the range 0x00 to 0x1F are control characters. The mapping table for PCANSI maps TRIANGLE glyphs, ARROW_UP glyph, and ARROW_DOWN glyph into this control character range and that causes no characters to be displayed by PCANSI compatible terminal emulators. The mappings are updated so these glyphs are mapped to ANSI characters in the range 0x20 to 0x7E. GEOMETRICSHAPE_UP_TRIANGLE '^' GEOMETRICSHAPE_RIGHT_TRIANGLE '>' GEOMETRICSHAPE_DOWN_TRIANGLE 'v' GEOMETRICSHAPE_LEFT_TRIANGLE '<' ARROW_UP '^' ARROW_DOWN 'v' Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>
* MdeModulePkg: Update comments in SimpleTextInEx according to UEFI 2.7Dandan Bi2017-06-204-14/+26
| | | | | | | | | | | v2: Add some missing changes Ps2KeyboardDxe. Cc: Star Zeng <star.zeng@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* MdeModulePkg/TerminalDxe: Avoid always append device path to *DevRuiyu Ni2017-04-201-8/+59
| | | | | | | | | | | When TerminalDxe Start() is called multiple times, the old logic unconditionally appended the terminal device path candidates to *Dev (ConInDev/ConOutDev/ErrOutDev), resulting the volatile storage is full. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg/ConPlatform: Support GOP created as PCI's grandsonRuiyu Ni2017-03-173-41/+9
| | | | | | | | | | | | | | | | | | | The original logic assumes GOP hande is son of PCI handle but it is not always true. Below wordings are from UEFI Spec: If a graphics device supports multiple frame buffers, then handles for the frame buffers must be created first, and then the handles for the video output devices can be created as children of the frame buffer handles. So the GOP handle could be grandson of the PCI handle. EfiBootManagerGetGopDevicePath(VideoController) is used to fix this bug. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
* MdeModulePkg: Use EfiEventEmptyFunction from UefiLibStar Zeng2017-01-202-37/+3
| | | | | | | | | | | | | | | Use EfiEventEmptyFunction from UefiLib and remove the duplication of event empty function. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=298 Cc: Feng Tian <feng.tian@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg: Remove superfluous return statementsThomas Huth2017-01-201-3/+0
| | | | | | | | | If the code eventually returns "Status" anyway, it does not make sense to explicitly return "Status" in case of an error, too. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg/TerminalDxe: Refine SetTerminalDevicePathHao Wu2017-01-161-1/+1
| | | | | | | | | Pass '&Node.Header' instead of '&Node' as the 1st parameter to function SetDevicePathNodeLength(). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* MdeModulePkg/TerminalDxe: Remove out-of-dated commentsRuiyu Ni2017-01-131-5/+0
| | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
* MdeModulePkg/TerminalDxe: Fix driver model bugRuiyu Ni2017-01-111-663/+281
| | | | | | | | | | | | | | | | | TerminalDxe driver contains bugs in its DriverBindingStart(): 1. It cannot be started AGAIN using a different terminal type; 2. It doesn't install SimpleTextInput/SimpleTextOut when ConIn/ConOut doesn't contain its device path. The check is duplicated of the same logic in ConPlatform driver and can be removed. The patch optimized the code to remove the unnecessary gEfiCallerIdGuid protocol installation. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg/TerminalDxe: Remove unnecessary NULL pointer checkRuiyu Ni2017-01-111-7/+2
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg/TerminalDxe: Separate state machine start/stop logicRuiyu Ni2017-01-111-26/+59
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg/TerminalDxe: Refine SetTerminalDevicePathRuiyu Ni2017-01-111-38/+3
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg/TerminalDxe: Refine InitializeTerminalConsoleTextModeRuiyu Ni2017-01-111-82/+26
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg/TerminalDxe: Separate controller name init logicRuiyu Ni2017-01-111-91/+56
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg/TerminalDxe: Add TerminalTypeFromGuid internal functionRuiyu Ni2017-01-111-26/+29
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg/TerminalDxe: Replace macro with enum for terminal typesRuiyu Ni2017-01-114-97/+100
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg TerminalDxe: Execute key notify func at TPL_CALLBACKStar Zeng2016-12-263-7/+284
| | | | | | | | | | | | | | | | | | Current implementation executes key notify function in TimerHandler at TPL_NOTIFY. The code change is to make key notify function executed at TPL_CALLBACK to reduce the time occupied at TPL_NOTIFY. The code will signal KeyNotify process event if the key pressed matches any key registered and insert the KeyData to the EFI Key queue for notify, then the KeyNotify process handler will invoke key notify functions at TPL_CALLBACK. Cc: Ruiyu Ni <Ruiyu.ni@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>
* MdeModulePkg ConSplitterDxe: Support toggle state syncStar Zeng2016-12-262-9/+194
| | | | | | | | | | | | | | | | | Register key notify for toggle state (CapsLock, NumLock and ScrollLock) sync between multiple keyboards. The implementation for this feature requires keyboard driver supports EFI_KEY_STATE_EXPOSED, and turns on physical TextInEx partial key report for toggle state sync. The virtual TextInEx will report the partial key after it is required by calling SetState(X | KEY_STATE_VALID_EXPOSED) explicitly. Cc: Ruiyu Ni <Ruiyu.ni@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>
* MdeModulePkg/TerminalDxe: Initialize variable after declarationDandan Bi2016-12-201-1/+3
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg/TerminalDxe: Fix IA32 VS2015x86 build breakMichael Kinney2016-10-271-3/+3
| | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=190 The issue is with signed/unsigned comparisons between Mode->CursorRow and Row and Mode->CursorColumn and Column. The fix is to add typecast to UINTN for comparisons. Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Brian Johnson <bjohnson@sgi.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Brian Johnson <bjohnson@sgi.com>
* MdeModulePkg/Universal: Fix typos in commentsGary Lin2016-10-273-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - stardard -> standard - doule -> double - defalut -> default - Pacakge -> Package - globa -> global - responsiblity -> responsibility - outputed -> outputted - specifiecd -> specified - Resuts -> Results - the a -> a - suported -> supported - assocated -> associated - TURE -> TRUE - successfull -> successfully - excute -> execute - reseting -> resetting - Retrive -> Retrieve - funciton -> function - paramter -> parameter - dependecy -> dependency - boundry -> boundary - permenantly -> permanently Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg/TerminalDxe: Handle more keys with TtyTermBrian J. Johnson2016-10-271-3/+21
| | | | | | | | | | | | | | | | | | The TtyTerm terminal driver is missing support for sequences produced by the page up, page down, insert, home, and end keys in some terimnal emulators. Add them. Tested under Ubuntu 16.04 using xterm 322-1ubuntu1, GNOME terminal 3.18.3-1ubuntu1, and XFCE terminal 0.6.3-2ubuntu1. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Kyle Roberts <kyroberts@sgi.com> Signed-off-by: Brian Johnson <bjohnson@sgi.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Reviewed-by: Roy Franz <roy.franz@hpe.com> Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg/TerminalDxe: Optimize TtyTerm cursor motionBrian J. Johnson2016-10-272-5/+33
| | | | | | | | | | | | | | | | | For TtyTerm terminals, output a shorter escape sequence when possible to move the cursor within the current line, and don't print any escape sequence if the cursor is already at the correct position. This removes extra cursor motion activity at the EFI shell prompt, improving performance. It also makes it possible in many cases to successfully use a terminal window which is taller than the driver's mode setting (eg. 80x25.) Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Brian Johnson <bjohnson@sgi.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg/TerminalDxe: Improve TtyTerm cursor position trackingBrian J. Johnson2016-10-271-0/+25
| | | | | | | | | | | | | | | | | | | | | When we print the last character on a line, the terminal driver wraps CursorRow/CursorColumn to the beginning of the next line. But the terminal itself doesn't wrap its cursor until the next character is printed. That throws off the driver's cursor position tracking. So when we have printed the last character on a line, and are not in the middle of outputing an escape sequence, synchronize the terminal with the driver by outputing CR+LF. This matches the expected behavior, and the behavior of the VGA console driver. Only change the behavior of TtyTerm, not the other terminal types. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Brian Johnson <bjohnson@sgi.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg/GraphicsOutputDxe.inf: Correct the protocol/GUID usagesRuiyu Ni2016-10-251-5/+5
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com>
* MdeModulePkg: Add GraphicsOutputDxe driver.Ruiyu Ni2016-10-124-0/+1042
| | | | | | | | | | | | | | The driver uses the GraphicsInfo HOB and GraphicsDeviceInfo HOB passed from PEI to find the graphics controller to manage and produce the GraphicsOutput protocol. GraphicsInfo HOB and GraphicsDeviceInfo HOB are created by a PEIM which initializes the graphics controller hardware in PEI phase. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg: Fix typos in comments and variablesGiri P Mudusuru2016-07-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - abstrated to abstracted - accessibla to accessible - addres to address - apropriate to appropriate - arry to array - availabe to available - avaliable to available - becasue to because - correponding to corresponding - etablished to established - exeuction to execution - extensiable to extensible - fileds to fields - loadding to loading - ptototypes to prototypes - prococol protocol - requried to required - resoruce to resource - runing to running - uild to build Cc: Star Zeng <star.zeng@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* Revert "TerminalDxe: select the UART's default receive FIFO depth"Ruiyu Ni2016-04-012-2/+2
| | | | | | | | | | | | | | This reverts commit 31ae446b1a039a55d0336f2201d77d1032533413. Changing the receive FIFO depth in Terminal driver Start() is not recommended. A new PCD PcdUartDefaultReceiveFifoDepth was added and MdeModulePkg/SerialDxe driver uses the PCD as the default receive FIFO depth. Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
* MdeModulePkg: ConSplitterDxe: use U64 mult/div wrappers in AbsPtr scalingLaszlo Ersek2016-03-161-3/+24
| | | | | | | | | This is an emergency fix for UINT64 multiplications and divisions not being done with the right BaseLib functions -- they break Ia32 builds. Fixes: 30ed3422ab2de03abf7c1433ebb482f6e5e16f45 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com>
* MdeModulePkg: Rescale ConSplitter Absolute Pointer.Derek Lin2016-03-161-7/+36
| | | | | | | | | | ConSplitter's Absolute Pointer should scale virtual device's resolution like what Simple Pointer do. Before this change, caller will get Virtual device's resolution but physical device's current point. This change let caller get Virtual device's resolution with virtual device's current point. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Derek Lin <derek.lin2@hpe.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* MdeModulePkg: TerminalDxe: select the UART's default receive FIFO depthLaszlo Ersek2016-01-212-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Serial IO protocol instances provided by SerialDxe and consumed by TerminalDxe come with a Mode.ReceiveFifoDepth=1 default setting, as required by UEFI 2.5. Although TerminalDxe calls EFI_SERIAL_IO_PROTOCOL.SetAttributes() in the TerminalDriverBindingStart() and TerminalConInTimerHandler() functions, it only does so to change the Mode.Timeout member. Other members of Mode, including Mode.ReceiveFifoDepth, are preserved. On some platforms this causes the UART that underlies TerminalDxe not to have enough room for bursts of scan codes, which translates to broken parsing of escape sequences, e.g. cursor movement keys. According to the UEFI spec, passing ReceiveFifoDepth=0 to EFI_SERIAL_IO_PROTOCOL.SetAttributes() "will use the device's default FIFO depth". While TerminalDxe could try to configure a receive FIFO depth that matches the longest escape sequence it wishes to parse, in practice the device-specific default FIFO depth -- which may well differ from the spec-mandated SerialIo->Mode.ReceiveFifoDepth=1 default -- seems to work. Hence let's just set that. This issue was exposed by SVN r18971 / git commit 921e987b2b ("ArmPlatformPkg: Use SerialDxe in MdeModulePkg instead of EmbeddedPkg"). In that conversion, MdeModulePkg's SerialDxe started to initialize Mode.ReceiveFifoDepth to 1 (in conformance with the spec), unlike the prior, non-conformant initialization to 0 in EmbeddedPkg's SerialDxe. Since TerminalDxe would never change ReceiveFifoDepth from the new default value 1, and the ArmPlatformPkg/Drivers/PL011Uart library instance, underlying SerialDxe through SerialPortLib, would obey it too, they would collectively effect a receive queue depth of 1, rather than the default 16 or 32. This broke cursor keys on the ARM FVP and Juno platforms. It is the client of EFI_SERIAL_IO_PROTOCOL that is responsible for modifying the attributes, if the defaults are not appropriate, hence this patch modifies TerminalDxe. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Ryan Harkin <ryan.harkin@linaro.org> Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Star Zeng <star.zeng@intel.com> Reported-by: Ryan Harkin <ryan.harkin@linaro.org> Reference: http://thread.gmane.org/gmane.comp.bios.edk2.devel/4779/focus=6553 Reference: http://thread.gmane.org/gmane.comp.bios.edk2.devel/6594 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19701 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Fix GraphicsConsole driver resolution out of sync issueRuiyu Ni2016-01-111-3/+5
| | | | | | | | | | | | | | | When the GOP doesn't support the resolution specified by PcdVideoHorizontalResolution and PcdVideoVerticalResolution, the code tries to set the resolution to 800x600 but uses the resolution equals to the PCD when calculating the text print position. The patch fixes the bug by updating the resolution to 800x600 for this case. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19630 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Convert all .uni files to utf-8Jordan Justen2015-12-158-0/+0
| | | | | | | | | | | | | To convert these files I ran: $ python3 BaseTools/Scripts/ConvertUni.py MdeModulePkg Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19257 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: TerminalDxe: avoid checking uninitialized variableStar Zeng2015-11-261-3/+4
| | | | | | | | | | | | | | | | | | | | The SerialIo->GetControl() function is not required to set the Control output parameter on error. Make sure we apply the EFI_SERIAL_INPUT_BUFFER_EMPTY optimization in TerminalConInTimerHandler() only if the SerialIo->GetControl() function call set that bit in the Control variable. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Suggested-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18962 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Use PcdSet##S to replace PcdSet##Eric Dong2015-10-151-3/+5
| | | | | | | | | | | | | | | | PcdSet## has no error status returned, then the caller has no idea about whether the set operation is successful or not. PcdSet##S were added to return error status and PcdSet## APIs were put in ifndef DISABLE_NEW_DEPRECATED_INTERFACES condition. To adopt PcdSet##S and further code development with DISABLE_NEW_DEPRECATED_INTERFACES defined, we need to Replace PcdSet## usage with PcdSet##S. Normally, DynamicDefault PCD set is expected to be success, but DynamicHii PCD set failure is a legal case. So for DynamicDefault, we add assert when set failure. For DynamicHii, we add logic to handle it. Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18603 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg/TerminalDxe: Some improvementsHeyi Guo2015-07-161-23/+4
| | | | | | | | | | | | | | | | 1. Get default terminal type from PCD rather than using PCANSI directly in BuildTeminalDevpath; 2. Only terminal type is needed to create an TerminalDev instance, so remove the useless code of creating and freeing DefaultNode. 3. Some white space refining. Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Heyi Guo <heyi.guo@linaro.org> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18027 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg/TerminalDxe: Set NullRemaining to FALSE by defaultHeyi Guo2015-07-161-1/+1
| | | | | | | | | | | | | This is bug fix for TerminalDxe: NullRemaining should be set to FALSE by fault and then be set to TRUE conditionally. Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Heyi Guo <heyi.guo@linaro.org> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18026 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Fix TerminalDxe VS2013 build failureRoy Franz2015-07-101-2/+2
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Roy Franz <roy.franz@linaro.org> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17910 6f19259b-4bc3-4df7-8a09-765794883524
* Accept VT220 DEL and function keys for TTY terminal typeRoy Franz2015-07-093-1/+101
| | | | | | | | | | | | | | | | | | | | | | | | | Accept the VT220 escape code [3~ as backspace for TtyTerm terminals. This is sent by many Linux terminals by default. Also accept VT220 function keys F1-F12, and VT100 F1-F4 keys as these are commonly sent by Linux terminals. The VT220 escape codes are longer, and variable length so a new state is added to the state machine along with a variable to construct the multibyte escape sequence. There are currently no ambiguous escape sequence prefixes accepted, so the TTY terminal accepts escape sequences for a variety of terminals. The goal is to 'just work' with as many terminals as possible, rather than properly emulating any specific terminal. Backspace, Del, and F10 have been tested on xterm, rxvt, tmux, and screen. Note: The existing vt100 function key handling does not match the vt100 documentation that I found, so I added the TTY terminal handling of VT100 F1-F4 (really PF1-PF4 on vt100) separately. The vt100 has no F5-F10 keys, so I don't know what the current vt100 code is based on. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Roy Franz <roy.franz@linaro.org> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17897 6f19259b-4bc3-4df7-8a09-765794883524
* Treat ASCII 0x7F as backspace for TtyTerm terminalsRoy Franz2015-07-091-2/+8
| | | | | | | | | | | | | Treat ASCII 0x7F as backspace, rather than delete, for TTY terminals. This better matches the default Linux terminal settings that are used when connecting to a simulated platform using xterm or a similar terminal program. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Roy Franz <roy.franz@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17896 6f19259b-4bc3-4df7-8a09-765794883524
* Add "TtyTerm" terminal type to TerminalDxeRoy Franz2015-07-095-8/+45
| | | | | | | | | | | | | | | This patch a adds new terminal type, TtyTerm, to TerminalDxe. This terminal type provides a place to add support for various *nix terminals that don't behave like standard VT terminals. The goal is to 'just work' with as many terminals as possible, rather than properly emulating any one specific terminal. Signed-off-by: Roy Franz <roy.franz@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17895 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Source fixes and cleanup for ARMGCC compilesRandy Pawell2014-12-041-1/+2
| | | | | | | | | | | | | | | | - Fix EFI_IPv4_ADDRESS usages to use a macro to copy the structure instead of direct assignment, to avoid runtime alignment errors. - Fix a EFI_INPUT_KEY usage in TerminalDxe to use CopyMem() to copy the structure instead of direct assignment, to avoid runtime alignment error. - Delete excess local variables that are initialized but otherwise unused. - CompilerIntrinsicsLib library now imported for AARCH64, as well as ARM. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Randy Pawell <randy_pawell@hp.com> Reviewed-by: Olivier Martin <Olivier.Martin@arm.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16471 6f19259b-4bc3-4df7-8a09-765794883524