Hello UEFI builders!
I'd like your feedback on this patch.
I often look at boot logs from LAVA and other people and don't quite know
where the UEFI binary came from. With ones that I've provided, I can often
recognise the build date stamp. But at other times, I'm simply trying to
work out if someone is building the code they say they are, or some other
code.
As the commit message says, rather than leaving the version string blank,
my patch will append the git commit id of the current commit, with "dirty"
appended if the user is building with uncommited mods.
I considered including the code from linux scripts/setlocalversion, but
apart from giving me a "-" at the front, I thought it was overkill.
Comments?
Cheers,
Ryan.
--
>From af952a40005536215cedbbeea9102915e461486f Mon Sep 17 00:00:00 2001
From: Ryan Harkin <ryan.harkin(a)linaro.org>
Date: Tue, 30 Jun 2015 15:10:56 +0100
Subject: [PATCH] Use commit id as default FIRMWARE_VER
If a FIRMWARE_VER setting is not provided and we are building from a GIT
repo, provide a default value based on the SHA ID of the commit where we
built from.
If the repo has local uncommited changes, then we mark the version
string with "-dirty".
This is based loosely on the same idea from the linux kernel in:
scripts/setlocalversion
Signed-off-by: Ryan Harkin <ryan.harkin(a)linaro.org>
---
uefi-build.sh | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/uefi-build.sh b/uefi-build.sh
index 486cf86..60ea872 100755
--- a/uefi-build.sh
+++ b/uefi-build.sh
@@ -27,6 +27,16 @@ function build_platform
PLATFORM_DSC="`$TOOLS_DIR/parse-platforms.py $PLATFORM_CONFIG -p
$board get -o dsc`"
PLATFORM_ARCH="`$TOOLS_DIR/parse-platforms.py $PLATFORM_CONFIG -p
$board get -o arch`"
+ if [[ $PLATFORM_BUILDFLAGS != *"FIRMWARE_VER"* ]]; then
+ if test -d .git && head=`git rev-parse --verify --short HEAD
2>/dev/null`; then
+ FIRMWARE_VER=`git rev-parse --short HEAD`
+ if ! git diff-index --quiet HEAD --; then
+ FIRMWARE_VER="${FIRMWARE_VER}-dirty"
+ fi
+ PLATFORM_BUILDFLAGS="$PLATFORM_BUILDFLAGS -D
FIRMWARE_VER=$FIRMWARE_VER"
+ fi
+ fi
+
set_cross_compile
CROSS_COMPILE="$TEMP_CROSS_COMPILE"
--
2.1.0
The following 3 patches break reboot/shutdown from within UEFI on TC2 and
probably all 32-bit ARM Ltd platforms:
ee171cc 2015-05-08 ArmVExpressPkg: restrict ArmVExpressSysConfigLib to
SEC and DXE_DRIVER [Ard Biesheuvel]
c889bf2 2015-05-08 ArmVExpressPkg: avoid the use of
ArmVExpressSysConfigLib at runtime [Ard Biesheuvel]
7b99da9 2015-05-08 ArmVExpressPkg: use PSCI for system reset at
runtime [Ard Biesheuvel]
The symptoms are that the board hangs when I try to call reboot/shutdown.
If I revert the top two patches only (ee171cc and c889bf2), then the board
crashes and continuously spews out the following message:
Undefined OpCode Exception PC at 0xBF419DBC CPSR 0x800001D6
Reverting all three gets reboot/shutdown working again.
Patch 7b99da9 is adding PSCI support to all ARM Ltd platforms. PSCI is a
64-bit only feature.
Regards,
Ryan.
I'm seeing some strange behavior when using the "-serial
telnet:localhost:5000,server" option for
serial output on qemu. I've been been using this for quite some time
without problem, but recently I have been seeing a complete lack of
output in about 1 in 5 times. At first I thought that it was just
hung, but from looking at it with gdb it appears to be booting all the
way to the shell. (I get the same backtrace with or without output.)
I've tried a couple of different versions of qemu (2.2 and 2.3), and
various versions of EDK2 and see the same behavior.
Has anyone else seen something like this?
Roy
[+Olivier at his proper email address]
[+ linaro-uefi mailing list]
On 18 June 2015 at 18:46, Ryan Harkin <ryan.harkin(a)linaro.org> wrote:
> TC2 no longer boots for me with this patch. If I revert it, it instead
> crashes like this:
>
> add-symbol-file
> /linaro/working/edk2.git/Build/ArmVExpress-CTA15-A7/DEBUG_GCC49/ARM/EmbeddedPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe/DEBUG/FdtPlatformDxe.dll
> 0xBA835240
> Loading driver at 0x000BA835000 EntryPoint=0x000BA835271 FdtPlatformDxe.efi
> InstallFdt() - loaded FDT binary image seems corrupt
> ASSERT /linaro/working/edk2.git/MdeModulePkg/Core/Dxe/Mem/Page.c(722):
> NumberOfPages
>
> I'm building pure tianocore EDK2 from this commit:
>
> cc63add 2015-06-17 MdeModulePkg:System hangs in setup menu [Dandan Bi]
>
> ... with the patch from this thread reverted.
>
>
> On 26 August 2014 at 11:16, <oliviermartin(a)users.sourceforge.net> wrote:
>
>> Revision: 15903
>> http://sourceforge.net/p/edk2/code/15903
>> Author: oliviermartin
>> Date: 2014-08-26 10:16:16 +0000 (Tue, 26 Aug 2014)
>> Log Message:
>> -----------
>> ArmPkg/ArmArchTimerLib: Remove non required [depex] and IoLib
>>
>> Contributed-under: TianoCore Contribution Agreement 1.0
>> Signed-off-by: Olivier Martin <olivier.martin(a)arm.com>
>>
>> Modified Paths:
>> --------------
>> trunk/edk2/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
>>
>> Modified: trunk/edk2/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
>> ===================================================================
>> --- trunk/edk2/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
>> 2014-08-26 10:15:21 UTC (rev 15902)
>> +++ trunk/edk2/ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
>> 2014-08-26 10:16:16 UTC (rev 15903)
>> @@ -1,6 +1,6 @@
>> #/** @file
>> #
>> -# Copyright (c) 2011-2012, ARM Limited. All rights reserved.<BR>
>> +# Copyright (c) 2011 - 2014, ARM Limited. All rights reserved.<BR>
>> # This program and the accompanying materials
>> # are licensed and made available under the terms and conditions of the
>> BSD License
>> # which accompanies this distribution. The full text of the license
>> may be found at
>> @@ -28,19 +28,10 @@
>> EmbeddedPkg/EmbeddedPkg.dec
>> ArmPkg/ArmPkg.dec
>>
>> -
>> [LibraryClasses]
>> DebugLib
>> - IoLib
>> ArmLib
>> BaseLib
>>
>> -[Protocols]
>> -
>> -[Guids]
>> -
>> [Pcd]
>> gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz
>> -
>> -[Depex]
>> - gEfiCpuArchProtocolGuid
>>
>> This was sent by the SourceForge.net collaborative development platform,
>> the world's largest Open Source development site.
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Slashdot TV.
>> Video for Nerds. Stuff that matters.
>> http://tv.slashdot.org/
>> _______________________________________________
>> edk2-commits mailing list
>> edk2-commits(a)lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/edk2-commits
>>
>
>
Hi all,
I'm looking for a JTAG debugger that working in native linux
environment. Do you know which one could support source code debugging
on both Arm Trust Firmware and UEFI?
Best Regards
Haojian
Hi Fathi,
As we discussed yesterday, you mentioned that both "FDT support" and
"Initrd support" should not be included in default boot args.
But the problem is at here. https://github.com/96boards/bugs/issues/40
Fathi & Leif,
Since PcdDefaultBootType is set to 0 by default, the kernel image is
recognized as an EFI application. So we can't set any FDT path and
Initrd path when it creates the default boot entry in UEFI. And we also
can't set them even when we create a new boot entry from the boot image.
We have to specify them in boot args.
So I want to know what's the expected behavior in UEFI. Do we need to
enhance the Bds to find FDT path & Initrd path even the kernel is
recognized as an EFI application?
Best Regards
Haojian
From: Fu Wei <fu.wei(a)linaro.org>
This patchset update gtdt.asl for VExpress/AcpiTables/rtsm_ve-aemv8a
(1)Fix "Platform Timer Offset" value bug
(2)Add Memory-mapped GT and SBSA Generic Watchdog timer info
base on Foundation Model
Changelog:
v2: Add "ontributed-under: TianoCore Contribution Agreement 1.0"
for all patch
Add an explanation for the fix of "Platform Timer Offset"
value bug in the commit message.
v1: The first version upstream patchset to linaro mailing listf
for OpenPlatformPkg
Fu Wei (2):
Platforms/ARM: Fix "Platform Timer Offset" value bug in gtdt.asl
Platforms/ARM: update gtdt.asl for VExpress
.../VExpress/AcpiTables/rtsm_ve-aemv8a/gtdt.asl | 67 +++++++++++++++++-----
1 file changed, 53 insertions(+), 14 deletions(-)
--
1.9.1
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