<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/MdeModulePkg/Universal/Console, branch master</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=master</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2026-06-22T20:06:47+00:00</updated>
<entry>
<title>MdeModulePkg/TerminalDxe: Change print level to eliminate interference</title>
<updated>2026-06-22T20:06:47+00:00</updated>
<author>
<name>Qihang Gao</name>
<email>gaoqihang@loongson.cn</email>
</author>
<published>2026-06-17T08:39:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=c3ba0416ce77b561c9d0c3867d99478d175d9432'/>
<id>urn:sha1:c3ba0416ce77b561c9d0c3867d99478d175d9432</id>
<content type='text'>
The debug message introduced by PR#12282 was printed at DEBUG_INFO level,
which caused screen corruption in the UEFI Shell when running in DEBUG
mode. Change the print level to DEBUG_VERBOSE to keep the Shell output
clean during normal DEBUG builds while still retaining the message for
verbose debugging scenarios.

Signed-off-by: Qihang Gao &lt;gaoqihang@loongson.cn&gt;
Cc: Evgenii Shatokhin &lt;euspectre@gmail.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/TerminalDxe: Fix a typo</title>
<updated>2026-05-26T02:17:44+00:00</updated>
<author>
<name>Evgenii Shatokhin</name>
<email>euspectre@gmail.com</email>
</author>
<published>2026-04-02T14:48:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=44c61c88e6e2bfb37d026308a0ffe31260642552'/>
<id>urn:sha1:44c61c88e6e2bfb37d026308a0ffe31260642552</id>
<content type='text'>
s/Regsitered/Registered/

Signed-off-by: Evgenii Shatokhin &lt;euspectre@gmail.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/TerminalDxe: Fix handling of shift state in notifications</title>
<updated>2026-05-26T02:17:44+00:00</updated>
<author>
<name>Evgenii Shatokhin</name>
<email>euspectre@gmail.com</email>
</author>
<published>2026-03-10T20:46:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=184fb6b1035ee080ea6a5472f54b16dcdd3de0eb'/>
<id>urn:sha1:184fb6b1035ee080ea6a5472f54b16dcdd3de0eb</id>
<content type='text'>
Fixes: #12281

Currently, TerminalConInRegisterKeyNotify() allows registering a
notification with nonzero KeyShiftState or KeyToggleState. However,
IsKeyRegistered() ignores these when checking if the keys match.

As a result, some firmware component may successfully register a
notification for, say, RCtrl+n, but the notification function will be
called each time the user presses 'n', which is wrong.

Shift state and toggle state are not transferred via a serial line, so
the notification functions for the keys with nonzero KeyShiftState or
KeyToggleState will never trigger in this case.

TerminalConInRegisterKeyNotify() could reject such notifications but it is
unclear if it could break the existing UEFI components.

Instead, this patch adds a debug message when someone tries to register a
notification with nonzero states, it also updates IsKeyRegistered() to take
KeyShiftState and KeyToggleState into account.

This way, IsKeyRegistered() will treat the notifications for 'n' and
'RCtrl+n' as different ones. So, the callback function for 'RCtrl+n' will
not be called when the user presses 'n'.

As it is not prohibited to set only EFI_SHIFT_STATE_VALID flag in the shift
state (leaving the remaining bits zeroed), IsKeyRegistered() ignores
EFI_SHIFT_STATE_VALID.

Signed-off-by: Evgenii Shatokhin &lt;euspectre@gmail.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/TerminalDxe: Fix Backspace key for VT-UTF8 terminal type</title>
<updated>2026-02-28T04:43:49+00:00</updated>
<author>
<name>Damien-Chen</name>
<email>inkfan130924783@gmail.com</email>
</author>
<published>2026-02-09T11:07:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=58c9ba24d4b7192496eeedbac3bffc0e81cc420f'/>
<id>urn:sha1:58c9ba24d4b7192496eeedbac3bffc0e81cc420f</id>
<content type='text'>
When QEMU is launched with -nographic, the Backspace key (DEL, 0x7f)
doesn't work in the UEFI Shell because the VT-UTF8 terminal type
interprets DEL as SCAN_DELETE instead of CHAR_BACKSPACE.

Modern terminal emulators (xterm, gnome-terminal, etc.) send DEL (0x7f)
for Backspace and are UTF-8 compatible. This patch updates
TerminalTypeVtUtf8 to interpret DEL as CHAR_BACKSPACE, consistent with
how TerminalTypeTtyTerm already handles it.

This approach preserves VT-UTF8 as the default terminal type (which
supports full Unicode), while fixing the Backspace functionality for
modern terminal environments.

Signed-off-by: Damien Chen &lt;inkfan130924783@gmail.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Fix PreferMode selection for same-width text modes</title>
<updated>2026-02-28T03:35:35+00:00</updated>
<author>
<name>Ashraf Ali S</name>
<email>ashraf.ali.s@intel.com</email>
</author>
<published>2026-02-11T05:46:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=41b32312c47e2b8fdc5b0dacb4d7c1a4d159fcf0'/>
<id>urn:sha1:41b32312c47e2b8fdc5b0dacb4d7c1a4d159fcf0</id>
<content type='text'>
The current PreferMode selection logic requires both Columns AND Rows to
be strictly greater (&gt;) than the current maximum, which fails when a
text mode has the same column count but more rows.

Example failure case (1920x1200 display):
- Mode 5: 240x56 - Selected as PreferMode
- Mode 6: 240x63 - Rejected because 240 is not &gt; 240

This mismatch causes ConsplitterSetConsoleOutMode to later request
Mode 6, triggering an unnecessary text mode change and clearing the
screen during console init.

Root Cause:
GraphicsConsole used: if ((Col &gt; Max) &amp;&amp; (Row &gt; Max))
This fails when only rows increase while columns stay the same.

Solution:
Change to: if ((Col &gt;= Max) &amp;&amp; (Row &gt;= Max))
This aligns with ConSplitter mode selection logic and correctly selects
the mode with the highest column and row counts.

After fix (1920x1200 display):
- Mode 5: 240x56
- Mode 6: 240x63 - Correctly selected as PreferMode

This ensures GraphicsConsole and ConSplitter match on the preferred mode
preventing unnecessary screen clears during console initialization.

Signed-off-by: Ashraf Ali S &lt;ashraf.ali.s@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Replace include guards with #pragma once</title>
<updated>2026-02-23T21:01:28+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2026-02-03T18:48:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=7a934d0befca7d10f361c76af6d2fcb6eb48c835'/>
<id>urn:sha1:7a934d0befca7d10f361c76af6d2fcb6eb48c835</id>
<content type='text'>
Replace traditional `#ifndef`/`#define`/`#endif` include guards with
`#pragma` once.

`#pragma once` is a widely supported preprocessor directive that
prevents header files from being included multiple times. It is
supported by all toolchains used to build edk2: GCC, Clang/LLVM, and
MSVC.

Compared to macro-based include guards, `#pragma once`:

- Eliminates the risk of macro name collisions or copy/paste errors
  where two headers inadvertently use the same guard macro.
- Eliminate inconsistency in the way include guard macros are named
  (e.g., some files use `__FILE_H__`, others use `FILE_H_`, etc.).
- Reduces boilerplate (three lines replaced by one).
- Avoids polluting the macro namespace with guard symbols.
- Can improve build times as the preprocessor can skip re-opening the
  file entirely, rather than re-reading it to find the matching
  `#endif` ("multiple-include optimization").
  - Note that some compilers may already optimize traditional include
    guards, by recognzining the idiomatic pattern.

This change is made acknowledging that overall portability of the
code will technically be reduced, as `#pragma once` is not part of the
C/C++ standards.

However, this is considered acceptable given:

1. edk2 already defines a subset of supported compilers in
   BaseTools/Conf/tools_def.template, all of which have supported
   `#pragma once` for over two decades.
2. There have been concerns raised to the project about inconsistent
   include guard naming and potential macro collisions.

Approximate compiler support dates:

- MSVC: Supported since Visual C++ 4.2 (1996)
- GCC: Supported since 3.4 (2004)
  (http://gnu.ist.utl.pt/software/gcc/gcc-3.4/changes.html)
- Clang (LLVM based): Since initial release in 2007

Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Remove extraneous parentheses</title>
<updated>2025-11-22T01:43:26+00:00</updated>
<author>
<name>Mike Beaton</name>
<email>mjsbeaton@gmail.com</email>
</author>
<published>2025-11-08T06:40:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=5185e6cb00054a5c45110352be0dd865cfa1cb4a'/>
<id>urn:sha1:5185e6cb00054a5c45110352be0dd865cfa1cb4a</id>
<content type='text'>
XCODE5 toolchain finds these, with errors such as:
PxeFunction.c:763:27: error: equality comparison with extraneous parentheses

Signed-off-by: Mike Beaton &lt;mjsbeaton@gmail.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg : Clear keyboard queue buffer after reading</title>
<updated>2025-10-09T08:02:51+00:00</updated>
<author>
<name>nick.wang</name>
<email>nick.wang@insyde.com</email>
</author>
<published>2025-04-15T11:35:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=0cad130cb4885961da201bb9b08424b3fd3d2249'/>
<id>urn:sha1:0cad130cb4885961da201bb9b08424b3fd3d2249</id>
<content type='text'>
There is a possibility to retrieve user input keystroke data stored in the
queue buffer via the EFI_SIMPLE_TEXT_INPUT_PROTOCOL pointer. To prevent
exposure of the password string, clear the queue buffer by filling it
with zeros after reading.

Signed-off-by: Nick Wang &lt;nick.wang@insyde.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/TerminalDxe: Improve the implementation of AnsiTestString</title>
<updated>2025-09-23T01:02:47+00:00</updated>
<author>
<name>Gao Qihang</name>
<email>gaoqihang@loongson.cn</email>
</author>
<published>2025-08-27T06:48:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=ba41bd096af6fc1c7ad61f32359014bac85540ef'/>
<id>urn:sha1:ba41bd096af6fc1c7ad61f32359014bac85540ef</id>
<content type='text'>
Adjust AnsiTestString to be compatible with wide/narrow string in
TerminalDxe driver. If WIDE_CHAR or NARROW_CHAR is hit, the string
is still valid since OutputString function will correctly handle it.

Signed-off-by: Gao Qihang &lt;gaoqihang@loongson.cn&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/TerminalDxe: Add missing types for TestString function</title>
<updated>2025-09-23T01:02:47+00:00</updated>
<author>
<name>Gao Qihang</name>
<email>gaoqihang@loongson.cn</email>
</author>
<published>2025-07-21T03:12:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=0053bbf833bb1612813a4af2ee653cd8b0ba4e19'/>
<id>urn:sha1:0053bbf833bb1612813a4af2ee653cd8b0ba4e19</id>
<content type='text'>
Add four newly added terminal types in TerminalConOutTestString, although
this function is rarely used. This patch is a supplement to previous patch
https://github.com/tianocore/edk2/commit/8a53ea9d9f40aad5504dc6080978a30b1b89ff3e.

Signed-off-by: Gao Qihang &lt;gaoqihang@loongson.cn&gt;
</content>
</entry>
</feed>
