This patchset is a follow on to my previous
backspace patchse, and adds a new terminal type "LinuxTerm"
(for lack of a better name) that better handles
the typical Linux terminal (xterm/rxvt/gnome terminal/etc.)
These often treat backspace/delete differently than the
existing EDK2 terminal types expect, particularly in emulated
environments where the emulated serial port is connected
to a graphical terminal rather than a serial console.
For a description of how Debian has dealt with the terminal
backspace/delete/^H mess, see the "Keyboard configuration"
section of:
https://www.debian.org/doc/debian-policy/ch-opersys.html#s9.8">KeyboardConfiguration
I do not think that all Linux distributions agree on all the details,
so my goal is to have a terminal defition that mostly works
in many configurations.
Backspace being broken in these environments is the primary
motivation for this, but this terminal type could be exentend
to better support the typical graphical terminal now in use.
This terminal type may be of use in BSD environments as well,
so I'm open to more generic name suggestions. I deliberately
avoided calling it "xterm", as my intention is to try to work
with multiple terminal types to the degree possible.
Roy Franz (4):
Add "LinuxTerm" terminal type to TerminalDxe
Treat ASCII 0x7F as backspace for LinuxTerm terminal
accept [3~ as delete for LinuxTerm terminals
Change QEMU terminal type to LinuxTerm
.../ArmVirtualizationPkg/ArmVirtualizationQemu.dsc | 4 +-
BaseTools/Source/C/Include/Guid/PcAnsi.h | 6 +++
.../Foundation/Efi/Guid/PcAnsi/PcAnsi.c | 2 +
.../Foundation/Efi/Guid/PcAnsi/PcAnsi.h | 6 +++
.../Universal/BdsDxe/BootMaint/BootMaint.h | 2 +-
.../Universal/BdsDxe/BootMaint/Data.c | 5 ++-
.../Universal/Console/TerminalDxe/Terminal.c | 44 ++++++++++++++++----
.../Universal/Console/TerminalDxe/Terminal.h | 2 +
.../Universal/Console/TerminalDxe/TerminalConIn.c | 47 ++++++++++++++++++++--
.../Universal/Console/TerminalDxe/TerminalConOut.c | 2 +
.../Universal/Console/TerminalDxe/TerminalDxe.inf | 1 +
MdePkg/Include/Guid/PcAnsi.h | 6 +++
MdePkg/Include/Protocol/DevicePath.h | 1 +
.../Library/UefiDevicePathLib/DevicePathFromText.c | 27 +++++++++++++
.../Library/UefiDevicePathLib/DevicePathToText.c | 3 ++
.../UefiDevicePathLib/UefiDevicePathLib.inf | 2 +
...UefiDevicePathLibOptionalDevicePathProtocol.inf | 4 +-
MdePkg/MdePkg.dec | 3 ++
.../UefiHandleParsingLib/UefiHandleParsingLib.c | 1 +
.../UefiHandleParsingLib/UefiHandleParsingLib.inf | 1 +
20 files changed, 153 insertions(+), 16 deletions(-)
--
1.9.1
Don't try to read the RSDP structure or RSDT/XSDT tables
from memory with the -c option. These are now provided
as files in /sysfs, and this allows acpidump to function
when /dev/mem is not available, which will be the case
for Aarch64 servers.
Signed-off-by: Roy Franz <roy.franz(a)linaro.org>
---
Graeme - all this is tested with your patch, which looks good. It takes
care of what acpidump needs from sysfs.
Al - this fixes acpidump. Are there other utilities that I need to look at
within acpica-tools?
This produces almost the same output with/without the "-c" option,
with the /sysfs files being used with "-c", with the following differences:
* Table address are 0x0 with -c, since we don't get them from the sysfs files
* the tables are listed in a different order.
I have verified with strace that no /dev/mem accesses are made with
"-c".
An issue that this patch doesn't address, is what should be the default,
and what should be done if /dev/mem is missing, or there but not readable.
source/os_specific/service_layers/oslinuxtbl.c | 87 +++++++++++++-------------
1 file changed, 43 insertions(+), 44 deletions(-)
diff --git a/source/os_specific/service_layers/oslinuxtbl.c b/source/os_specific/service_layers/oslinuxtbl.c
index e090a3c..95cc674 100644
--- a/source/os_specific/service_layers/oslinuxtbl.c
+++ b/source/os_specific/service_layers/oslinuxtbl.c
@@ -686,70 +686,69 @@ OslTableInitialize (
return (AE_OK);
}
+ if (!Gbl_DumpCustomizedTables)
+ {
/* Get RSDP from memory */
- Status = OslLoadRsdp ();
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
+ Status = OslLoadRsdp ();
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
- /* Get XSDT from memory */
+ /* Get XSDT from memory */
- if (Gbl_Rsdp.Revision && !Gbl_DoNotDumpXsdt)
- {
- if (Gbl_Xsdt)
+ if (Gbl_Rsdp.Revision && !Gbl_DoNotDumpXsdt)
{
- free (Gbl_Xsdt);
- Gbl_Xsdt = NULL;
+ if (Gbl_Xsdt)
+ {
+ free (Gbl_Xsdt);
+ Gbl_Xsdt = NULL;
+ }
+
+ Gbl_Revision = 2;
+ Status = OslGetBiosTable (ACPI_SIG_XSDT, 0,
+ ACPI_CAST_PTR (ACPI_TABLE_HEADER *, &Gbl_Xsdt), &Address);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
}
- Gbl_Revision = 2;
- Status = OslGetBiosTable (ACPI_SIG_XSDT, 0,
- ACPI_CAST_PTR (ACPI_TABLE_HEADER *, &Gbl_Xsdt), &Address);
- if (ACPI_FAILURE (Status))
+ /* Get RSDT from memory */
+
+ if (Gbl_Rsdp.RsdtPhysicalAddress)
{
- return (Status);
+ if (Gbl_Rsdt)
+ {
+ free (Gbl_Rsdt);
+ Gbl_Rsdt = NULL;
+ }
+
+ Status = OslGetBiosTable (ACPI_SIG_RSDT, 0,
+ ACPI_CAST_PTR (ACPI_TABLE_HEADER *, &Gbl_Rsdt), &Address);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
}
- }
- /* Get RSDT from memory */
+ /* Get FADT from memory */
- if (Gbl_Rsdp.RsdtPhysicalAddress)
- {
- if (Gbl_Rsdt)
+ if (Gbl_Fadt)
{
- free (Gbl_Rsdt);
- Gbl_Rsdt = NULL;
+ free (Gbl_Fadt);
+ Gbl_Fadt = NULL;
}
- Status = OslGetBiosTable (ACPI_SIG_RSDT, 0,
- ACPI_CAST_PTR (ACPI_TABLE_HEADER *, &Gbl_Rsdt), &Address);
+ Status = OslGetBiosTable (ACPI_SIG_FADT, 0,
+ ACPI_CAST_PTR (ACPI_TABLE_HEADER *, &Gbl_Fadt), &Gbl_FadtAddress);
if (ACPI_FAILURE (Status))
{
return (Status);
}
- }
- /* Get FADT from memory */
-
- if (Gbl_Fadt)
- {
- free (Gbl_Fadt);
- Gbl_Fadt = NULL;
- }
-
- Status = OslGetBiosTable (ACPI_SIG_FADT, 0,
- ACPI_CAST_PTR (ACPI_TABLE_HEADER *, &Gbl_Fadt), &Gbl_FadtAddress);
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
-
- if (!Gbl_DumpCustomizedTables)
- {
/* Add mandatory tables to global table list first */
-
Status = OslAddTableToList (ACPI_RSDP_NAME, 0);
if (ACPI_FAILURE (Status))
{
--
1.9.1
Hi all,
As part of the promotion of the ArmVirtualizationPkg/ to a top-level
Tianocore package, we used the opportunity to shorten its name (and
other derived names).
So the new top level package will be called ArmVirtPkg/. Other
occurrences have been shortened as well, e.g., the QEMU platform DSC
is now called ArmVirtPkg/ArmVirtQemu.dsc, and the AArch64 targeted
build will be created in Build/ArmVirtQemu-AARCH64/
This change is effective immediately: the change has been submitted to
the authoritative Subversion server, so the change will be synced to
GitHub later today.
Regards,
Ard.
Don't try to read the RSDP structure or RSDT/XSDT tables
from memory with the -c option. These are now provided
as files in /sysfs, and this allows acpidump to function
when /dev/mem is not available, which is the case when
booted in UEFI secure boot mode, and also for ARM servers.
Signed-off-by: Roy Franz <roy.franz(a)linaro.org>
---
This produces almost the same output with/without the "-c" option,
with the /sysfs files being used with "-c", with the following differences:
* Table address are 0x0 with -c, since we don't get them from the sysfs files
* the tables are listed in a different order.
This has been tested against the following Linux patch which is being submitted
upstream:
https://lists.linaro.org/pipermail/linaro-acpi/2015-May/004549.html
source/os_specific/service_layers/oslinuxtbl.c | 87 +++++++++++++-------------
1 file changed, 43 insertions(+), 44 deletions(-)
diff --git a/source/os_specific/service_layers/oslinuxtbl.c b/source/os_specific/service_layers/oslinuxtbl.c
index e090a3c..95cc674 100644
--- a/source/os_specific/service_layers/oslinuxtbl.c
+++ b/source/os_specific/service_layers/oslinuxtbl.c
@@ -686,70 +686,69 @@ OslTableInitialize (
return (AE_OK);
}
+ if (!Gbl_DumpCustomizedTables)
+ {
/* Get RSDP from memory */
- Status = OslLoadRsdp ();
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
+ Status = OslLoadRsdp ();
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
- /* Get XSDT from memory */
+ /* Get XSDT from memory */
- if (Gbl_Rsdp.Revision && !Gbl_DoNotDumpXsdt)
- {
- if (Gbl_Xsdt)
+ if (Gbl_Rsdp.Revision && !Gbl_DoNotDumpXsdt)
{
- free (Gbl_Xsdt);
- Gbl_Xsdt = NULL;
+ if (Gbl_Xsdt)
+ {
+ free (Gbl_Xsdt);
+ Gbl_Xsdt = NULL;
+ }
+
+ Gbl_Revision = 2;
+ Status = OslGetBiosTable (ACPI_SIG_XSDT, 0,
+ ACPI_CAST_PTR (ACPI_TABLE_HEADER *, &Gbl_Xsdt), &Address);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
}
- Gbl_Revision = 2;
- Status = OslGetBiosTable (ACPI_SIG_XSDT, 0,
- ACPI_CAST_PTR (ACPI_TABLE_HEADER *, &Gbl_Xsdt), &Address);
- if (ACPI_FAILURE (Status))
+ /* Get RSDT from memory */
+
+ if (Gbl_Rsdp.RsdtPhysicalAddress)
{
- return (Status);
+ if (Gbl_Rsdt)
+ {
+ free (Gbl_Rsdt);
+ Gbl_Rsdt = NULL;
+ }
+
+ Status = OslGetBiosTable (ACPI_SIG_RSDT, 0,
+ ACPI_CAST_PTR (ACPI_TABLE_HEADER *, &Gbl_Rsdt), &Address);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
}
- }
- /* Get RSDT from memory */
+ /* Get FADT from memory */
- if (Gbl_Rsdp.RsdtPhysicalAddress)
- {
- if (Gbl_Rsdt)
+ if (Gbl_Fadt)
{
- free (Gbl_Rsdt);
- Gbl_Rsdt = NULL;
+ free (Gbl_Fadt);
+ Gbl_Fadt = NULL;
}
- Status = OslGetBiosTable (ACPI_SIG_RSDT, 0,
- ACPI_CAST_PTR (ACPI_TABLE_HEADER *, &Gbl_Rsdt), &Address);
+ Status = OslGetBiosTable (ACPI_SIG_FADT, 0,
+ ACPI_CAST_PTR (ACPI_TABLE_HEADER *, &Gbl_Fadt), &Gbl_FadtAddress);
if (ACPI_FAILURE (Status))
{
return (Status);
}
- }
- /* Get FADT from memory */
-
- if (Gbl_Fadt)
- {
- free (Gbl_Fadt);
- Gbl_Fadt = NULL;
- }
-
- Status = OslGetBiosTable (ACPI_SIG_FADT, 0,
- ACPI_CAST_PTR (ACPI_TABLE_HEADER *, &Gbl_Fadt), &Gbl_FadtAddress);
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
-
- if (!Gbl_DumpCustomizedTables)
- {
/* Add mandatory tables to global table list first */
-
Status = OslAddTableToList (ACPI_RSDP_NAME, 0);
if (ACPI_FAILURE (Status))
{
--
1.9.1
Add support to map generic watchdog in 64 bit address space.
v0 --> v1
Replace FixedPcdGet32 with FixedPcdGet64 in ArmPlatformPkg/ArmJunoPkg/AcpiTables/Gtdt.aslc
to read the 64 bit base address of generic watchdog control and refresh frame.
Jayanthi A (2):
ArmPkg: Generic Watchdog address map
ArmPlatformPkg: Replace FixedPcdGet32 with FixedPcdGet64
ArmPkg/ArmPkg.dec | 4 ++--
ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdog.h | 8 ++++----
ArmPlatformPkg/ArmJunoPkg/AcpiTables/Gtdt.aslc | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
--
2.1.0
Most Linux terminal emulators use ASCII 0x7f (^?) for backspace,
rather than 0x08 (^H) since ^H is used by some programs for other
purposes, such as help menus. This results in backspace not working
in most Linux environments, particularly in emulated environments
such as QEMU where telnet or xterm may be used to connect to
the emulated UART. While in some cases this can be configured in the
terminal emulator, it must be done on every connection, as if
permently configured this will break all other uses of the terminal.
This change causes both ASCII 0x08 and 0x7F to be treated as
backspace. This provides a working backspace when tested with
minicom, screen, telnet, and xterm under Linux. I also tested
teraterm and hyperterm under Windows connecting via rs232, and
saw no regressions. (The delete key doesn't work on hyperterm
both before and after the change)
This change removes the ASCII encoding for delete, however
this did not cause regressions on any tested terminal emulators
as they do not use the ASCII encoding for the delete key.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Roy Franz <roy.franz(a)linaro.org>
---
MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c
index 4a008c9..c92d3d4 100644
--- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c
+++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c
@@ -1212,6 +1212,14 @@ UnicodeToEfiKey (
switch (TerminalDevice->InputState) {
case INPUT_STATE_DEFAULT:
+ switch (UnicodeChar) {
+ case 0x7f:
+ UnicodeChar = CHAR_BACKSPACE;
+ break;
+ default :
+ break;
+ }
+
break;
case INPUT_STATE_ESC:
--
1.9.1