Date   

[PATCH 2/4] UefiPayloadPkg: Use toolchain appropriate CpuExceptionHandlerLib

Lendacky, Thomas
 

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2340

Use the XCODE5 CpuExceptionHandlerLib library in place of the standard
library when building with the XCODE5 toolchain. The XCODE5 version of
the library performs binary patching and should only be used when building
with the XCODE5 toolchain.

Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
---
UefiPayloadPkg/UefiPayloadPkgIa32.dsc | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/UefiPayloadPkg/UefiPayloadPkgIa32.dsc b/UefiPayloadPkg/UefiPayloadPkgIa32.dsc
index d52945442e0e..2bf7aafd8c77 100644
--- a/UefiPayloadPkg/UefiPayloadPkgIa32.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkgIa32.dsc
@@ -232,7 +232,11 @@ [LibraryClasses.common.DXE_CORE]
!if $(SOURCE_DEBUG_ENABLE)
DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
!endif
+!if $(TOOL_CHAIN_TAG) != "XCODE5"
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
+!else
+ CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5DxeCpuExceptionHandlerLib.inf
+!endif

[LibraryClasses.common.DXE_DRIVER]
PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
@@ -243,7 +247,11 @@ [LibraryClasses.common.DXE_DRIVER]
!if $(SOURCE_DEBUG_ENABLE)
DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf
!endif
+!if $(TOOL_CHAIN_TAG) != "XCODE5"
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
+!else
+ CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5DxeCpuExceptionHandlerLib.inf
+!endif
MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf

[LibraryClasses.common.DXE_RUNTIME_DRIVER]
--
2.17.1


[PATCH 1/4] UefiCpuPkg/CpuExceptionHandler: Make XCODE5 changes toolchain specific

Lendacky, Thomas
 

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2340

Commit 2db0ccc2d7fe ("UefiCpuPkg: Update CpuExceptionHandlerLib pass
XCODE5 tool chain") introduced binary patching into the exception handling
support. CPU exception handling is allowed during SEC and this results in
binary patching of flash, which should not be done.

Separate the changes from commit 2db0ccc2d7fe into an XCODE5 toolchain
specific file, Xcode5ExceptionHandlerAsm.nasm, and create new INF files
for an XCODE5 version of CpuExceptionHandlerLib. Update the UefiCpuPkg.dsc
file to use the new files when the XCODE5 toolchain is used.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
---
UefiCpuPkg/UefiCpuPkg.dsc | 23 +
.../Xcode5DxeCpuExceptionHandlerLib.inf | 64 +++
.../Xcode5PeiCpuExceptionHandlerLib.inf | 63 +++
.../Xcode5SecPeiCpuExceptionHandlerLib.inf | 55 +++
.../Xcode5SmmCpuExceptionHandlerLib.inf | 59 +++
.../X64/Xcode5ExceptionHandlerAsm.nasm | 413 ++++++++++++++++++
6 files changed, 677 insertions(+)
create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5DxeCpuExceptionHandlerLib.inf
create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5PeiCpuExceptionHandlerLib.inf
create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.inf
create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SmmCpuExceptionHandlerLib.inf
create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/Xcode5ExceptionHandlerAsm.nasm

diff --git a/UefiCpuPkg/UefiCpuPkg.dsc b/UefiCpuPkg/UefiCpuPkg.dsc
index d28cb5cccb52..ad298011232d 100644
--- a/UefiCpuPkg/UefiCpuPkg.dsc
+++ b/UefiCpuPkg/UefiCpuPkg.dsc
@@ -59,7 +59,11 @@ [LibraryClasses]

[LibraryClasses.common.SEC]
PlatformSecLib|UefiCpuPkg/Library/PlatformSecLibNull/PlatformSecLibNull.inf
+!if $(TOOL_CHAIN_TAG) != "XCODE5"
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf
+!else
+ CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.inf
+!endif
HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf
MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
@@ -73,12 +77,20 @@ [LibraryClasses.common.PEIM]

[LibraryClasses.IA32.PEIM, LibraryClasses.X64.PEIM]
PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf
+!if $(TOOL_CHAIN_TAG) != "XCODE5"
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf
+!else
+ CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5PeiCpuExceptionHandlerLib.inf
+!endif

[LibraryClasses.common.DXE_DRIVER]
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
+!if $(TOOL_CHAIN_TAG) != "XCODE5"
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
+!else
+ CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5DxeCpuExceptionHandlerLib.inf
+!endif
MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
RegisterCpuFeaturesLib|UefiCpuPkg/Library/RegisterCpuFeaturesLib/DxeRegisterCpuFeaturesLib.inf

@@ -86,7 +98,11 @@ [LibraryClasses.common.DXE_SMM_DRIVER]
SmmServicesTableLib|MdePkg/Library/SmmServicesTableLib/SmmServicesTableLib.inf
MemoryAllocationLib|MdePkg/Library/SmmMemoryAllocationLib/SmmMemoryAllocationLib.inf
HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
+!if $(TOOL_CHAIN_TAG) != "XCODE5"
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf
+!else
+ CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SmmCpuExceptionHandlerLib.inf
+!endif

[LibraryClasses.common.UEFI_APPLICATION]
UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
@@ -122,10 +138,17 @@ [Components.IA32, Components.X64]
UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf
UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf
UefiCpuPkg/Library/CpuCommonFeaturesLib/CpuCommonFeaturesLib.inf
+!if $(TOOL_CHAIN_TAG) != "XCODE5"
UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf
UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf
UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf
+!else
+ UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5DxeCpuExceptionHandlerLib.inf
+ UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.inf
+ UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SmmCpuExceptionHandlerLib.inf
+ UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5PeiCpuExceptionHandlerLib.inf
+!endif
UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf
UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.inf
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5DxeCpuExceptionHandlerLib.inf b/UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5DxeCpuExceptionHandlerLib.inf
new file mode 100644
index 000000000000..ef37efec6246
--- /dev/null
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5DxeCpuExceptionHandlerLib.inf
@@ -0,0 +1,64 @@
+## @file
+# CPU Exception Handler library instance for DXE modules.
+#
+# Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = Xcode5DxeCpuExceptionHandlerLib
+ MODULE_UNI_FILE = DxeCpuExceptionHandlerLib.uni
+ FILE_GUID = B6E9835A-EDCF-4748-98A8-27D3C722E02D
+ MODULE_TYPE = DXE_DRIVER
+ VERSION_STRING = 1.1
+ LIBRARY_CLASS = CpuExceptionHandlerLib|DXE_CORE DXE_DRIVER UEFI_APPLICATION
+
+#
+# The following information is for reference only and not required by the build tools.
+#
+# VALID_ARCHITECTURES = IA32 X64
+#
+
+[Sources.Ia32]
+ Ia32/ExceptionHandlerAsm.nasm
+ Ia32/ExceptionTssEntryAsm.nasm
+ Ia32/ArchExceptionHandler.c
+ Ia32/ArchInterruptDefs.h
+ Ia32/ArchAMDSevVcHandler.c
+
+[Sources.X64]
+ X64/Xcode5ExceptionHandlerAsm.nasm
+ X64/ArchExceptionHandler.c
+ X64/ArchInterruptDefs.h
+ X64/ArchAMDSevVcHandler.c
+
+[Sources.common]
+ CpuExceptionCommon.h
+ CpuExceptionCommon.c
+ PeiDxeSmmCpuException.c
+ DxeException.c
+ AMDSevVcHandler.c
+ AMDSevVcCommon.h
+
+[Pcd]
+ gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard
+ gUefiCpuPkgTokenSpaceGuid.PcdCpuStackSwitchExceptionList
+ gUefiCpuPkgTokenSpaceGuid.PcdCpuKnownGoodStackSize
+
+[Packages]
+ MdePkg/MdePkg.dec
+ MdeModulePkg/MdeModulePkg.dec
+ UefiCpuPkg/UefiCpuPkg.dec
+
+[LibraryClasses]
+ BaseLib
+ SerialPortLib
+ PrintLib
+ SynchronizationLib
+ LocalApicLib
+ PeCoffGetEntryPointLib
+ MemoryAllocationLib
+ DebugLib
+ VmgExitLib
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5PeiCpuExceptionHandlerLib.inf b/UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5PeiCpuExceptionHandlerLib.inf
new file mode 100644
index 000000000000..830ed1eb8bad
--- /dev/null
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5PeiCpuExceptionHandlerLib.inf
@@ -0,0 +1,63 @@
+## @file
+# CPU Exception Handler library instance for PEI module.
+#
+# Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = Xcode5PeiCpuExceptionHandlerLib
+ MODULE_UNI_FILE = PeiCpuExceptionHandlerLib.uni
+ FILE_GUID = 980DDA67-44A6-4897-99E6-275290B71F9E
+ MODULE_TYPE = PEIM
+ VERSION_STRING = 1.1
+ LIBRARY_CLASS = CpuExceptionHandlerLib|PEI_CORE PEIM
+
+#
+# The following information is for reference only and not required by the build tools.
+#
+# VALID_ARCHITECTURES = IA32 X64
+#
+
+[Sources.Ia32]
+ Ia32/ExceptionHandlerAsm.nasm
+ Ia32/ExceptionTssEntryAsm.nasm
+ Ia32/ArchExceptionHandler.c
+ Ia32/ArchInterruptDefs.h
+ Ia32/ArchAMDSevVcHandler.c
+
+[Sources.X64]
+ X64/Xcode5ExceptionHandlerAsm.nasm
+ X64/ArchExceptionHandler.c
+ X64/ArchInterruptDefs.h
+ X64/ArchAMDSevVcHandler.c
+
+[Sources.common]
+ CpuExceptionCommon.h
+ CpuExceptionCommon.c
+ PeiCpuException.c
+ PeiDxeSmmCpuException.c
+ AMDSevVcHandler.c
+ AMDSevVcCommon.h
+
+[Packages]
+ MdePkg/MdePkg.dec
+ MdeModulePkg/MdeModulePkg.dec
+ UefiCpuPkg/UefiCpuPkg.dec
+
+[LibraryClasses]
+ BaseLib
+ SerialPortLib
+ PrintLib
+ LocalApicLib
+ PeCoffGetEntryPointLib
+ HobLib
+ MemoryAllocationLib
+ SynchronizationLib
+ VmgExitLib
+
+[Pcd]
+ gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard # CONSUMES
+
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.inf b/UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.inf
new file mode 100644
index 000000000000..36420be22faa
--- /dev/null
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.inf
@@ -0,0 +1,55 @@
+## @file
+# CPU Exception Handler library instance for SEC/PEI modules.
+#
+# Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = Xcode5SecPeiCpuExceptionHandlerLib
+ MODULE_UNI_FILE = SecPeiCpuExceptionHandlerLib.uni
+ FILE_GUID = CA4BBC99-DFC6-4234-B553-8B6586B7B113
+ MODULE_TYPE = PEIM
+ VERSION_STRING = 1.1
+ LIBRARY_CLASS = CpuExceptionHandlerLib|SEC PEI_CORE PEIM
+
+#
+# The following information is for reference only and not required by the build tools.
+#
+# VALID_ARCHITECTURES = IA32 X64
+#
+
+[Sources.Ia32]
+ Ia32/ExceptionHandlerAsm.nasm
+ Ia32/ExceptionTssEntryAsm.nasm
+ Ia32/ArchExceptionHandler.c
+ Ia32/ArchInterruptDefs.h
+ Ia32/ArchAMDSevVcHandler.c
+
+[Sources.X64]
+ X64/Xcode5ExceptionHandlerAsm.nasm
+ X64/ArchExceptionHandler.c
+ X64/ArchInterruptDefs.h
+ X64/ArchAMDSevVcHandler.c
+
+[Sources.common]
+ CpuExceptionCommon.h
+ CpuExceptionCommon.c
+ SecPeiCpuException.c
+ AMDSevVcHandler.c
+ AMDSevVcCommon.h
+
+[Packages]
+ MdePkg/MdePkg.dec
+ MdeModulePkg/MdeModulePkg.dec
+ UefiCpuPkg/UefiCpuPkg.dec
+
+[LibraryClasses]
+ BaseLib
+ SerialPortLib
+ PrintLib
+ LocalApicLib
+ PeCoffGetEntryPointLib
+ VmgExitLib
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SmmCpuExceptionHandlerLib.inf b/UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SmmCpuExceptionHandlerLib.inf
new file mode 100644
index 000000000000..8f71a45c86d5
--- /dev/null
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SmmCpuExceptionHandlerLib.inf
@@ -0,0 +1,59 @@
+## @file
+# CPU Exception Handler library instance for SMM modules.
+#
+# Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = Xcode5SmmCpuExceptionHandlerLib
+ MODULE_UNI_FILE = SmmCpuExceptionHandlerLib.uni
+ FILE_GUID = 8D2C439B-3981-42ff-9CE5-1B50ECA502D6
+ MODULE_TYPE = DXE_SMM_DRIVER
+ VERSION_STRING = 1.1
+ LIBRARY_CLASS = CpuExceptionHandlerLib|DXE_SMM_DRIVER
+
+#
+# The following information is for reference only and not required by the build tools.
+#
+# VALID_ARCHITECTURES = IA32 X64
+#
+
+[Sources.Ia32]
+ Ia32/ExceptionHandlerAsm.nasm
+ Ia32/ExceptionTssEntryAsm.nasm
+ Ia32/ArchExceptionHandler.c
+ Ia32/ArchInterruptDefs.h
+ Ia32/ArchAMDSevVcHandler.c
+
+[Sources.X64]
+ X64/Xcode5ExceptionHandlerAsm.nasm
+ X64/ArchExceptionHandler.c
+ X64/ArchInterruptDefs.h
+ X64/ArchAMDSevVcHandler.c
+
+[Sources.common]
+ CpuExceptionCommon.h
+ CpuExceptionCommon.c
+ PeiDxeSmmCpuException.c
+ SmmException.c
+ AMDSevVcHandler.c
+ AMDSevVcCommon.h
+
+[Packages]
+ MdePkg/MdePkg.dec
+ MdeModulePkg/MdeModulePkg.dec
+ UefiCpuPkg/UefiCpuPkg.dec
+
+[LibraryClasses]
+ BaseLib
+ SerialPortLib
+ PrintLib
+ SynchronizationLib
+ LocalApicLib
+ PeCoffGetEntryPointLib
+ DebugLib
+ VmgExitLib
+
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/Xcode5ExceptionHandlerAsm.nasm b/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/Xcode5ExceptionHandlerAsm.nasm
new file mode 100644
index 000000000000..26cae56cc5cf
--- /dev/null
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/Xcode5ExceptionHandlerAsm.nasm
@@ -0,0 +1,413 @@
+;------------------------------------------------------------------------------ ;
+; Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>
+; SPDX-License-Identifier: BSD-2-Clause-Patent
+;
+; Module Name:
+;
+; ExceptionHandlerAsm.Asm
+;
+; Abstract:
+;
+; x64 CPU Exception Handler
+;
+; Notes:
+;
+;------------------------------------------------------------------------------
+
+;
+; CommonExceptionHandler()
+;
+
+%define VC_EXCEPTION 29
+
+extern ASM_PFX(mErrorCodeFlag) ; Error code flags for exceptions
+extern ASM_PFX(mDoFarReturnFlag) ; Do far return flag
+extern ASM_PFX(CommonExceptionHandler)
+
+SECTION .data
+
+DEFAULT REL
+SECTION .text
+
+ALIGN 8
+
+AsmIdtVectorBegin:
+%rep 32
+ db 0x6a ; push #VectorNum
+ db ($ - AsmIdtVectorBegin) / ((AsmIdtVectorEnd - AsmIdtVectorBegin) / 32) ; VectorNum
+ push rax
+ mov rax, strict qword 0 ; mov rax, ASM_PFX(CommonInterruptEntry)
+ jmp rax
+%endrep
+AsmIdtVectorEnd:
+
+HookAfterStubHeaderBegin:
+ db 0x6a ; push
+@VectorNum:
+ db 0 ; 0 will be fixed
+ push rax
+ mov rax, strict qword 0 ; mov rax, HookAfterStubHeaderEnd
+JmpAbsoluteAddress:
+ jmp rax
+HookAfterStubHeaderEnd:
+ mov rax, rsp
+ and sp, 0xfff0 ; make sure 16-byte aligned for exception context
+ sub rsp, 0x18 ; reserve room for filling exception data later
+ push rcx
+ mov rcx, [rax + 8]
+ bt [ASM_PFX(mErrorCodeFlag)], ecx
+ jnc .0
+ push qword [rsp] ; push additional rcx to make stack alignment
+.0:
+ xchg rcx, [rsp] ; restore rcx, save Exception Number in stack
+ push qword [rax] ; push rax into stack to keep code consistence
+
+;---------------------------------------;
+; CommonInterruptEntry ;
+;---------------------------------------;
+; The follow algorithm is used for the common interrupt routine.
+; Entry from each interrupt with a push eax and eax=interrupt number
+; Stack frame would be as follows as specified in IA32 manuals:
+;
+; +---------------------+ <-- 16-byte aligned ensured by processor
+; + Old SS +
+; +---------------------+
+; + Old RSP +
+; +---------------------+
+; + RFlags +
+; +---------------------+
+; + CS +
+; +---------------------+
+; + RIP +
+; +---------------------+
+; + Error Code +
+; +---------------------+
+; + Vector Number +
+; +---------------------+
+; + RBP +
+; +---------------------+ <-- RBP, 16-byte aligned
+; The follow algorithm is used for the common interrupt routine.
+global ASM_PFX(CommonInterruptEntry)
+ASM_PFX(CommonInterruptEntry):
+ cli
+ pop rax
+ ;
+ ; All interrupt handlers are invoked through interrupt gates, so
+ ; IF flag automatically cleared at the entry point
+ ;
+ xchg rcx, [rsp] ; Save rcx into stack and save vector number into rcx
+ and rcx, 0xFF
+ cmp ecx, 32 ; Intel reserved vector for exceptions?
+ jae NoErrorCode
+ bt [ASM_PFX(mErrorCodeFlag)], ecx
+ jc HasErrorCode
+
+NoErrorCode:
+
+ ;
+ ; Push a dummy error code on the stack
+ ; to maintain coherent stack map
+ ;
+ push qword [rsp]
+ mov qword [rsp + 8], 0
+HasErrorCode:
+ push rbp
+ mov rbp, rsp
+ push 0 ; clear EXCEPTION_HANDLER_CONTEXT.OldIdtHandler
+ push 0 ; clear EXCEPTION_HANDLER_CONTEXT.ExceptionDataFlag
+
+ ;
+ ; Stack:
+ ; +---------------------+ <-- 16-byte aligned ensured by processor
+ ; + Old SS +
+ ; +---------------------+
+ ; + Old RSP +
+ ; +---------------------+
+ ; + RFlags +
+ ; +---------------------+
+ ; + CS +
+ ; +---------------------+
+ ; + RIP +
+ ; +---------------------+
+ ; + Error Code +
+ ; +---------------------+
+ ; + RCX / Vector Number +
+ ; +---------------------+
+ ; + RBP +
+ ; +---------------------+ <-- RBP, 16-byte aligned
+ ;
+
+ ;
+ ; Since here the stack pointer is 16-byte aligned, so
+ ; EFI_FX_SAVE_STATE_X64 of EFI_SYSTEM_CONTEXT_x64
+ ; is 16-byte aligned
+ ;
+
+;; UINT64 Rdi, Rsi, Rbp, Rsp, Rbx, Rdx, Rcx, Rax;
+;; UINT64 R8, R9, R10, R11, R12, R13, R14, R15;
+ push r15
+ push r14
+ push r13
+ push r12
+ push r11
+ push r10
+ push r9
+ push r8
+ push rax
+ push qword [rbp + 8] ; RCX
+ push rdx
+ push rbx
+ push qword [rbp + 48] ; RSP
+ push qword [rbp] ; RBP
+ push rsi
+ push rdi
+
+;; UINT64 Gs, Fs, Es, Ds, Cs, Ss; insure high 16 bits of each is zero
+ movzx rax, word [rbp + 56]
+ push rax ; for ss
+ movzx rax, word [rbp + 32]
+ push rax ; for cs
+ mov rax, ds
+ push rax
+ mov rax, es
+ push rax
+ mov rax, fs
+ push rax
+ mov rax, gs
+ push rax
+
+ mov [rbp + 8], rcx ; save vector number
+
+;; UINT64 Rip;
+ push qword [rbp + 24]
+
+;; UINT64 Gdtr[2], Idtr[2];
+ xor rax, rax
+ push rax
+ push rax
+ sidt [rsp]
+ mov bx, word [rsp]
+ mov rax, qword [rsp + 2]
+ mov qword [rsp], rax
+ mov word [rsp + 8], bx
+
+ xor rax, rax
+ push rax
+ push rax
+ sgdt [rsp]
+ mov bx, word [rsp]
+ mov rax, qword [rsp + 2]
+ mov qword [rsp], rax
+ mov word [rsp + 8], bx
+
+;; UINT64 Ldtr, Tr;
+ xor rax, rax
+ str ax
+ push rax
+ sldt ax
+ push rax
+
+;; UINT64 RFlags;
+ push qword [rbp + 40]
+
+;; UINT64 Cr0, Cr1, Cr2, Cr3, Cr4, Cr8;
+ mov rax, cr8
+ push rax
+ mov rax, cr4
+ or rax, 0x208
+ mov cr4, rax
+ push rax
+ mov rax, cr3
+ push rax
+ mov rax, cr2
+ push rax
+ xor rax, rax
+ push rax
+ mov rax, cr0
+ push rax
+
+;; UINT64 Dr0, Dr1, Dr2, Dr3, Dr6, Dr7;
+ cmp qword [rbp + 8], VC_EXCEPTION
+ je VcDebugRegs ; For SEV-ES (#VC) Debug registers ignored
+
+ mov rax, dr7
+ push rax
+ mov rax, dr6
+ push rax
+ mov rax, dr3
+ push rax
+ mov rax, dr2
+ push rax
+ mov rax, dr1
+ push rax
+ mov rax, dr0
+ push rax
+ jmp DrFinish
+
+VcDebugRegs:
+;; UINT64 Dr0, Dr1, Dr2, Dr3, Dr6, Dr7 are skipped for #VC to avoid exception recursion
+ xor rax, rax
+ push rax
+ push rax
+ push rax
+ push rax
+ push rax
+ push rax
+
+DrFinish:
+;; FX_SAVE_STATE_X64 FxSaveState;
+ sub rsp, 512
+ mov rdi, rsp
+ db 0xf, 0xae, 0x7 ;fxsave [rdi]
+
+;; UEFI calling convention for x64 requires that Direction flag in EFLAGs is clear
+ cld
+
+;; UINT32 ExceptionData;
+ push qword [rbp + 16]
+
+;; Prepare parameter and call
+ mov rcx, [rbp + 8]
+ mov rdx, rsp
+ ;
+ ; Per X64 calling convention, allocate maximum parameter stack space
+ ; and make sure RSP is 16-byte aligned
+ ;
+ sub rsp, 4 * 8 + 8
+ call ASM_PFX(CommonExceptionHandler)
+ add rsp, 4 * 8 + 8
+
+ cli
+;; UINT64 ExceptionData;
+ add rsp, 8
+
+;; FX_SAVE_STATE_X64 FxSaveState;
+
+ mov rsi, rsp
+ db 0xf, 0xae, 0xE ; fxrstor [rsi]
+ add rsp, 512
+
+;; UINT64 Dr0, Dr1, Dr2, Dr3, Dr6, Dr7;
+;; Skip restoration of DRx registers to support in-circuit emualators
+;; or debuggers set breakpoint in interrupt/exception context
+ add rsp, 8 * 6
+
+;; UINT64 Cr0, Cr1, Cr2, Cr3, Cr4, Cr8;
+ pop rax
+ mov cr0, rax
+ add rsp, 8 ; not for Cr1
+ pop rax
+ mov cr2, rax
+ pop rax
+ mov cr3, rax
+ pop rax
+ mov cr4, rax
+ pop rax
+ mov cr8, rax
+
+;; UINT64 RFlags;
+ pop qword [rbp + 40]
+
+;; UINT64 Ldtr, Tr;
+;; UINT64 Gdtr[2], Idtr[2];
+;; Best not let anyone mess with these particular registers...
+ add rsp, 48
+
+;; UINT64 Rip;
+ pop qword [rbp + 24]
+
+;; UINT64 Gs, Fs, Es, Ds, Cs, Ss;
+ pop rax
+ ; mov gs, rax ; not for gs
+ pop rax
+ ; mov fs, rax ; not for fs
+ ; (X64 will not use fs and gs, so we do not restore it)
+ pop rax
+ mov es, rax
+ pop rax
+ mov ds, rax
+ pop qword [rbp + 32] ; for cs
+ pop qword [rbp + 56] ; for ss
+
+;; UINT64 Rdi, Rsi, Rbp, Rsp, Rbx, Rdx, Rcx, Rax;
+;; UINT64 R8, R9, R10, R11, R12, R13, R14, R15;
+ pop rdi
+ pop rsi
+ add rsp, 8 ; not for rbp
+ pop qword [rbp + 48] ; for rsp
+ pop rbx
+ pop rdx
+ pop rcx
+ pop rax
+ pop r8
+ pop r9
+ pop r10
+ pop r11
+ pop r12
+ pop r13
+ pop r14
+ pop r15
+
+ mov rsp, rbp
+ pop rbp
+ add rsp, 16
+ cmp qword [rsp - 32], 0 ; check EXCEPTION_HANDLER_CONTEXT.OldIdtHandler
+ jz DoReturn
+ cmp qword [rsp - 40], 1 ; check EXCEPTION_HANDLER_CONTEXT.ExceptionDataFlag
+ jz ErrorCode
+ jmp qword [rsp - 32]
+ErrorCode:
+ sub rsp, 8
+ jmp qword [rsp - 24]
+
+DoReturn:
+ cmp qword [ASM_PFX(mDoFarReturnFlag)], 0 ; Check if need to do far return instead of IRET
+ jz DoIret
+ push rax
+ mov rax, rsp ; save old RSP to rax
+ mov rsp, [rsp + 0x20]
+ push qword [rax + 0x10] ; save CS in new location
+ push qword [rax + 0x8] ; save EIP in new location
+ push qword [rax + 0x18] ; save EFLAGS in new location
+ mov rax, [rax] ; restore rax
+ popfq ; restore EFLAGS
+ DB 0x48 ; prefix to composite "retq" with next "retf"
+ retf ; far return
+DoIret:
+ iretq
+
+;-------------------------------------------------------------------------------------
+; GetTemplateAddressMap (&AddressMap);
+;-------------------------------------------------------------------------------------
+; comments here for definition of address map
+global ASM_PFX(AsmGetTemplateAddressMap)
+ASM_PFX(AsmGetTemplateAddressMap):
+ lea rax, [AsmIdtVectorBegin]
+ mov qword [rcx], rax
+ mov qword [rcx + 0x8], (AsmIdtVectorEnd - AsmIdtVectorBegin) / 32
+ lea rax, [HookAfterStubHeaderBegin]
+ mov qword [rcx + 0x10], rax
+
+; Fix up CommonInterruptEntry address
+ lea rax, [ASM_PFX(CommonInterruptEntry)]
+ lea rcx, [AsmIdtVectorBegin]
+%rep 32
+ mov qword [rcx + (JmpAbsoluteAddress - 8 - HookAfterStubHeaderBegin)], rax
+ add rcx, (AsmIdtVectorEnd - AsmIdtVectorBegin) / 32
+%endrep
+; Fix up HookAfterStubHeaderEnd
+ lea rax, [HookAfterStubHeaderEnd]
+ lea rcx, [JmpAbsoluteAddress]
+ mov qword [rcx - 8], rax
+
+ ret
+
+;-------------------------------------------------------------------------------------
+; AsmVectorNumFixup (*NewVectorAddr, VectorNum, *OldVectorAddr);
+;-------------------------------------------------------------------------------------
+global ASM_PFX(AsmVectorNumFixup)
+ASM_PFX(AsmVectorNumFixup):
+ mov rax, rdx
+ mov [rcx + (@VectorNum - HookAfterStubHeaderBegin)], al
+ ret
+
--
2.17.1


[PATCH 0/4] XCODE5 toolchain binary patching fix

Lendacky, Thomas
 

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2340

Commit 2db0ccc2d7fe ("UefiCpuPkg: Update CpuExceptionHandlerLib pass
XCODE5 tool chain") introduced binary patching in the
ExceptionHandlerAsm.nasm in order to support the XCODE5 toolchain.
However, the CpuExceptionHandlerLib can be used during SEC phase which
would result in binary patching of flash.

This series creates a new CpuExceptionHandlerLib file to support
the required binary patching for the XCODE5 toolchain, while reverting
the changes from commit 2db0ccc2d7fe in the standard file.

This is accomplished in phases:
- Create a new XCODE5 specific version of the ExceptionHandlerAsm.nasm
file
- Update the DSC files that use the CpuExceptionHandlerLib library to
to use the XCODE5 version of the library when the XCODE5 toolchain
is used.
- Revert the changes made by commit 2db0ccc2d7fe in the standard file.

I don't have access to an XCODE5 toolchain setup, so I have not tested
this with XCODE5. I would like to request that someone who does please
test this.

---

These patches are based on commit:
e54310451f1a ("OvmfPkg: Add VBE2 mode info structure to LegacyVgaBios.h")

Cc: Andrew Fish <afish@apple.com>
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Benjamin You <benjamin.you@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Julien Grall <julien@xen.org>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Ray Ni <ray.ni@intel.com>

Tom Lendacky (4):
UefiCpuPkg/CpuExceptionHandler: Make XCODE5 changes toolchain specific
UefiPayloadPkg: Use toolchain appropriate CpuExceptionHandlerLib
OvmfPkg: Use toolchain appropriate CpuExceptionHandlerLib
UefiCpuPkg/CpuExceptionHandler: Revert binary patching in standard
CpuExceptionHandlerLib

OvmfPkg/OvmfPkgIa32.dsc | 20 +
OvmfPkg/OvmfPkgIa32X64.dsc | 20 +
OvmfPkg/OvmfPkgX64.dsc | 20 +
OvmfPkg/OvmfXen.dsc | 16 +
UefiCpuPkg/UefiCpuPkg.dsc | 23 +
UefiPayloadPkg/UefiPayloadPkgIa32.dsc | 8 +
.../Xcode5DxeCpuExceptionHandlerLib.inf | 64 +++
.../Xcode5PeiCpuExceptionHandlerLib.inf | 63 +++
.../Xcode5SecPeiCpuExceptionHandlerLib.inf | 55 +++
.../Xcode5SmmCpuExceptionHandlerLib.inf | 59 +++
.../X64/ExceptionHandlerAsm.nasm | 25 +-
.../X64/Xcode5ExceptionHandlerAsm.nasm | 413 ++++++++++++++++++
12 files changed, 767 insertions(+), 19 deletions(-)
create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5DxeCpuExceptionHandlerLib.inf
create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5PeiCpuExceptionHandlerLib.inf
create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.inf
create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SmmCpuExceptionHandlerLib.inf
create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/Xcode5ExceptionHandlerAsm.nasm

--
2.17.1


[PATCH 1/1] BaseTools: add repo name option to SetupGit.py

Rebecca Cran
 

Allow users who didn't clone one of the TianoCore repos from a
canonical URL to specify the name of the repo (edk2, edk2-platforms
or edk2-non-osi) when running SetupGit.py to allow them to configure
their repo properly.

The new option is:

-n repo, --name repo set the repo name to configure for, if not
detected automatically

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
---
Tested with:
pylama : no new issues detected
Option tested:
-n : correctly said a parameter was needed
-n edk2 : configured the repo for edk2
-n edk2-foo : errored out with a list of repo names
-n edk2-platforms : updated the configuration for edk2-platforms

Note the error block in __main__ if the upstream isn't found is
redundant, since it already errors out and exits in get_upstream.

BaseTools/Scripts/SetupGit.py | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/BaseTools/Scripts/SetupGit.py b/BaseTools/Scripts/SetupGit.py
index e320ba2f887e..4416111ac0a5 100644
--- a/BaseTools/Scripts/SetupGit.py
+++ b/BaseTools/Scripts/SetupGit.py
@@ -106,10 +106,11 @@ def fuzzy_match_repo_url(one, other):
return False


-def get_upstream(url):
+def get_upstream(url, name):
"""Extracts the dict for the current repo origin."""
for upstream in UPSTREAMS:
- if fuzzy_match_repo_url(upstream['repo'], url):
+ if (fuzzy_match_repo_url(upstream['repo'], url) or
+ upstream['name'] == name):
return upstream
print("Unknown upstream '%s' - aborting!" % url)
sys.exit(3)
@@ -143,6 +144,11 @@ if __name__ == '__main__':
help='overwrite existing settings conflicting with program defaults',
action='store_true',
required=False)
+ PARSER.add_argument('-n', '--name', type=str, metavar='repo',
+ choices=['edk2', 'edk2-platforms', 'edk2-non-osi'],
+ help='set the repo name to configure for, if not '
+ 'detected automatically',
+ required=False)
PARSER.add_argument('-v', '--verbose',
help='enable more detailed output',
action='store_true',
@@ -156,7 +162,7 @@ if __name__ == '__main__':

URL = REPO.remotes.origin.url

- UPSTREAM = get_upstream(URL)
+ UPSTREAM = get_upstream(URL, ARGS.name)
if not UPSTREAM:
print("Upstream '%s' unknown, aborting!" % URL)
sys.exit(7)
--
2.25.1


[edk2-staging/EdkRepo] [PATCH] EdkRepo: Add source_manifest_repo argument to edkrepo_command.py

Ashley E Desimone
 

Add a common definition of the source_manifest_repo argument
to edkrepo_command.py to enable selection of the correct source
global manifest repository by commands.

Signed-off-by: Ashley E Desimone <ashley.e.desimone@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
Cc: Erik Bjorge <erik.c.bjorge@intel.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Prince Agyeman <prince.agyeman@intel.com>
---
edkrepo/commands/arguments/edkrepo_cmd_args.py | 1 +
edkrepo/commands/edkrepo_command.py | 6 ++++++
2 files changed, 7 insertions(+)

diff --git a/edkrepo/commands/arguments/edkrepo_cmd_args.py b/edkrepo/commands/arguments/edkrepo_cmd_args.py
index f2d7eb6..e8a6138 100644
--- a/edkrepo/commands/arguments/edkrepo_cmd_args.py
+++ b/edkrepo/commands/arguments/edkrepo_cmd_args.py
@@ -16,3 +16,4 @@ DRY_RUN_HELP = "Don't actually do anything"
OVERRIDE_HELP = 'Ignore warnings'
SUBMODULE_SKIP_HELP = 'Skip the pull or sync of any submodules.'
COLOR_HELP = 'Force color output (useful with \'less -r\')'
+SOURCE_MANIFEST_REPO_HELP = "The name of the workspace's source global manifest repository"
diff --git a/edkrepo/commands/edkrepo_command.py b/edkrepo/commands/edkrepo_command.py
index f69bdb8..700b48a 100644
--- a/edkrepo/commands/edkrepo_command.py
+++ b/edkrepo/commands/edkrepo_command.py
@@ -48,3 +48,9 @@ SubmoduleSkipArgument = {'name': 'skip-submodule',
'positional' : False,
'required' : False,
'help-text' : arguments.SUBMODULE_SKIP_HELP}
+
+SourceManRepoArgument = {'name' : 'source-manifest-repo',
+ 'positional': False,
+ 'required' : False,
+ 'action' : 'store',
+ 'help-text' : arguments.SOURCE_MANIFEST_REPO_HELP}
--
2.16.2.windows.1


Re: [edk2-non-osi][PATCH 1/1] RPi: delete device tree binaries

Ard Biesheuvel
 

On 5/1/20 12:54 PM, Pete Batard wrote:
Reviewed-by: Pete Batard <pete@akeo.ie>
Pushed as 4703c83d7312..dc4afd066ca5

Thanks,


Re: [edk2-platforms][PATCH 0/2] Rip out "internal DTB" support in FdtDxe

Ard Biesheuvel
 

On 4/30/20 11:16 PM, Andrei Warkentin wrote:
Dear all,
This patch set removes the internal (embedded) DTB support from Pi 3
and Pi 4 platforms, since these platforms should *always* be using
the devicetree passed by the VideoCore firmware.
Andrei Warkentin (2):
RPi: rip out FdtDxe logic to use internal DTB
RPi: remove any mention of an "internal DTB"
Pushed as defef0562115..9cf38493625a

Thanks


Re: [edk2-platforms][PATCH 1/2] RPi: rip out FdtDxe logic to use internal DTB

Ard Biesheuvel
 

On 5/1/20 6:56 PM, Andrei Warkentin wrote:
Hi folks,
I added that specific line more as a safeguard in case the depex ever changes, as I wasn't comfortable with code that relied on an external factor to have defined behavior.
I don't have a strong position on it. If you want it to go, I'll send an update.
No worries, I'll just drop it from the patch.


A
------------------------------------------------------------------------
*From:* devel@edk2.groups.io <devel@edk2.groups.io> on behalf of Pete Batard via groups.io <pete=akeo.ie@groups.io>
*Sent:* Friday, May 1, 2020 10:16 AM
*To:* Ard Biesheuvel <ard.biesheuvel@arm.com>; Andrei Warkentin <andrey.warkentin@gmail.com>; devel@edk2.groups.io <devel@edk2.groups.io>
*Cc:* leif@nuviainc.com <leif@nuviainc.com>; philmd@redhat.com <philmd@redhat.com>
*Subject:* Re: [edk2-devel] [edk2-platforms][PATCH 1/2] RPi: rip out FdtDxe logic to use internal DTB
On 2020.05.01 16:13, Ard Biesheuvel wrote:
On 5/1/20 5:11 PM, Pete Batard wrote:
On 2020.05.01 14:19, Ard Biesheuvel wrote:
On 4/30/20 11:16 PM, Andrei Warkentin wrote:
Initially, FdtDxe used an internal (embedded in UEFI) FDT,
because it was neither understood how to consume the
one loaded by the VideoCore firmware, nor understood just
how important it is to use the DTB provided by config.txt.

Embedding the DT was a bad idea, because:
- Permanently stale
- No overlays

Also, on devices like the Pi 4 you _have_ to have a DT
around for the start4 VPU firmware to pick up, otherwise
the board is left in an inconsistent state. So we're being
proscriptive now about DT use with config.txt, which means
this internal DT logic is deadc code.

Further FdtDxe cleanups are possible and will be handled
separately, specifically:
- probably no need to use a separate allocation for patched DT (optimize memory used)
- suspicious use of EfiBootServicesData (I filed https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FARM-software%2Febbr%2Fissues%2F45&;data=02%7C01%7Cawarkentin%40vmware.com%7Ccd65ce9968f54b569f8208d7ede2a025%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637239429916614640&amp;sdata=pJ3Wu%2BGJhj%2FqfbBEFMQ9nQ%2B1Pgc%2Bo4Xw0fer2h9ZYvQ%3D&amp;reserved=0
to sort out the real
requirements)

Testing: Booted Ubuntu 18.04 on Pi 2B (1.2).

Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
---
  Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c   | 206 ++++----------------
  Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.inf |   4 -
  Platform/RaspberryPi/RPi3/RPi3.fdf             |  11 --
  Platform/RaspberryPi/RPi4/RPi4.fdf             |   8 -
  Platform/RaspberryPi/RaspberryPi.dec           |   7 -
  5 files changed, 38 insertions(+), 198 deletions(-)

diff --git a/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c b/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c
index e7143f57..187b9566 100644
--- a/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c
+++ b/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c
@@ -335,90 +335,6 @@ CleanSimpleFramebuffer (
    return EFI_SUCCESS;
  }
-#define MAX_CMDLINE_SIZE    512
-
-STATIC
-EFI_STATUS
-UpdateBootArgs (
-  VOID
-  )
-{
-  INTN          Node;
-  INTN          Retval;
-  EFI_STATUS    Status;
-  CHAR8         *CommandLine;
-
-  //
-  // Locate the /chosen node
-  //
-  Node = fdt_path_offset (mFdtImage, "/chosen");
-  if (Node < 0) {
-    DEBUG ((DEBUG_ERROR, "%a: failed to locate /chosen node\n", __FUNCTION__));
-    return EFI_NOT_FOUND;
-  }
-
-  //
-  // If /chosen/bootargs already exists, we want to add a space character
-  // before adding the firmware supplied arguments. However, the RpiFirmware
-  // protocol expects a 32-bit aligned buffer. So let's allocate 4 bytes of
-  // slack, and skip the first 3 when passing this buffer into libfdt.
-  //
-  CommandLine = AllocatePool (MAX_CMDLINE_SIZE) + 4;
-  if (!CommandLine) {
-    DEBUG ((DEBUG_ERROR, "%a: failed to allocate memory\n", __FUNCTION__));
-    return EFI_OUT_OF_RESOURCES;
-  }
-
-  //
-  // Get the command line from the firmware
-  //
-  Status = mFwProtocol->GetCommandLine (MAX_CMDLINE_SIZE, CommandLine + 4);
-  if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: failed to retrieve command line\n", __FUNCTION__));
-    return Status;
-  }
-
-  if (AsciiStrLen (CommandLine + 4) == 0) {
-    DEBUG ((DEBUG_INFO, "%a: empty command line received\n", __FUNCTION__));
-    return EFI_SUCCESS;
-  }
-
-  CommandLine[3] = ' ';
-
-  Retval = fdt_appendprop_string (mFdtImage, Node, "bootargs", &CommandLine[3]);
-  if (Retval != 0) {
-    DEBUG ((DEBUG_ERROR, "%a: failed to set /chosen/bootargs property (%d)\n",
-      __FUNCTION__, Retval));
-  }
-
-  DEBUG_CODE_BEGIN ();
-    CONST CHAR8    *Prop;
-    INT32         Length;
-    INT32         Index;
-
-    Node = fdt_path_offset (mFdtImage, "/chosen");
-    ASSERT (Node >= 0);
-
-    Prop = fdt_getprop (mFdtImage, Node, "bootargs", &Length);
-    ASSERT (Prop != NULL);
-
-    DEBUG ((DEBUG_INFO, "Command line set from firmware (length %d):\n'", Length));
-
-    for (Index = 0; Index < Length; Index++, Prop++) {
-      if (*Prop == '\0') {
-        continue;
-      }
-      DEBUG ((DEBUG_INFO, "%c", *Prop));
-    }
-
-    DEBUG ((DEBUG_INFO, "'\n"));
-  DEBUG_CODE_END ();
-
-  FreePool (CommandLine - 4);
-  return EFI_SUCCESS;
-}
-
-
  /**
    @param  ImageHandle   of the loaded driver
    @param  SystemTable   Pointer to the System Table
@@ -435,13 +351,10 @@ FdtDxeInitialize (
    IN EFI_SYSTEM_TABLE   *SystemTable
    )
  {
+  INT32      Retval;
    EFI_STATUS Status;
-  EFI_GUID   *FdtGuid;
-  VOID       *FdtImage;
    UINTN      FdtSize;
-  INT32      Retval;
-  UINT32     BoardRevision;
-  BOOLEAN    Internal;
+  VOID       *FdtImage = NULL;
    if (PcdGet32 (PcdOptDeviceTree) == 0) {
      DEBUG ((DEBUG_INFO, "Device Tree disabled per user configuration\n"));
@@ -450,77 +363,28 @@ FdtDxeInitialize (
    Status = gBS->LocateProtocol (&gRaspberryPiFirmwareProtocolGuid, NULL,
                    (VOID**)&mFwProtocol);
-  ASSERT_EFI_ERROR (Status);
+  if (mFwProtocol == NULL) {
+    /*
+     * Impossible because of the depex...
+     */
+    ASSERT_EFI_ERROR (Status);
+    return EFI_NOT_FOUND;
+  }
Do we need this change?
Looking at what we are doing elsewhere, I thing we should go with:

   ASSERT_EFI_ERROR (Status);
   if (EFI_ERROR (Status)) {
     return Status;
   }

The ASSERT_EFI_ERROR () on its own was not enough for RELEASE, so we definitely want to return an error code here if needed, and I guess that, technically, we could consider that LocateProtocol () may succeed and return a NULL value for mFwProtocol, but I doubt that's a valid consideration.
But the DEPEX guarantees that the module will only be dispatched at a time when LocateProtocol() will succeed. This is a common pattern, so I wonder why it is being silently modified here.
Fair enough. Let's wait for Andrei to reply on this.
/Pete


Re: [edk2-platforms][PATCH 1/2] RPi: rip out FdtDxe logic to use internal DTB

Andrei Warkentin
 

Hi folks,

I added that specific line more as a safeguard in case the depex ever changes, as I wasn't comfortable with code that relied on an external factor to have defined behavior.

I don't have a strong position on it. If you want it to go, I'll send an update.

A


From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf of Pete Batard via groups.io <pete@...>
Sent: Friday, May 1, 2020 10:16 AM
To: Ard Biesheuvel <ard.biesheuvel@...>; Andrei Warkentin <andrey.warkentin@...>; devel@edk2.groups.io <devel@edk2.groups.io>
Cc: leif@... <leif@...>; philmd@... <philmd@...>
Subject: Re: [edk2-devel] [edk2-platforms][PATCH 1/2] RPi: rip out FdtDxe logic to use internal DTB
 
On 2020.05.01 16:13, Ard Biesheuvel wrote:
> On 5/1/20 5:11 PM, Pete Batard wrote:
>> On 2020.05.01 14:19, Ard Biesheuvel wrote:
>>> On 4/30/20 11:16 PM, Andrei Warkentin wrote:
>>>> Initially, FdtDxe used an internal (embedded in UEFI) FDT,
>>>> because it was neither understood how to consume the
>>>> one loaded by the VideoCore firmware, nor understood just
>>>> how important it is to use the DTB provided by config.txt.
>>>>
>>>> Embedding the DT was a bad idea, because:
>>>> - Permanently stale
>>>> - No overlays
>>>>
>>>> Also, on devices like the Pi 4 you _have_ to have a DT
>>>> around for the start4 VPU firmware to pick up, otherwise
>>>> the board is left in an inconsistent state. So we're being
>>>> proscriptive now about DT use with config.txt, which means
>>>> this internal DT logic is deadc code.
>>>>
>>>> Further FdtDxe cleanups are possible and will be handled
>>>> separately, specifically:
>>>> - probably no need to use a separate allocation for patched DT
>>>> (optimize memory used)
>>>> - suspicious use of EfiBootServicesData (I filed
>>>> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FARM-software%2Febbr%2Fissues%2F45&amp;data=02%7C01%7Cawarkentin%40vmware.com%7Ccd65ce9968f54b569f8208d7ede2a025%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637239429916614640&amp;sdata=pJ3Wu%2BGJhj%2FqfbBEFMQ9nQ%2B1Pgc%2Bo4Xw0fer2h9ZYvQ%3D&amp;reserved=0 to sort out the real
>>>> requirements)
>>>>
>>>> Testing: Booted Ubuntu 18.04 on Pi 2B (1.2).
>>>>
>>>> Signed-off-by: Andrei Warkentin <andrey.warkentin@...>
>>>> ---
>>>>   Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c   | 206
>>>> ++++----------------
>>>>   Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.inf |   4 -
>>>>   Platform/RaspberryPi/RPi3/RPi3.fdf             |  11 --
>>>>   Platform/RaspberryPi/RPi4/RPi4.fdf             |   8 -
>>>>   Platform/RaspberryPi/RaspberryPi.dec           |   7 -
>>>>   5 files changed, 38 insertions(+), 198 deletions(-)
>>>>
>>>> diff --git a/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c
>>>> b/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c
>>>> index e7143f57..187b9566 100644
>>>> --- a/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c
>>>> +++ b/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c
>>>> @@ -335,90 +335,6 @@ CleanSimpleFramebuffer (
>>>>     return EFI_SUCCESS;
>>>>   }
>>>> -#define MAX_CMDLINE_SIZE    512
>>>> -
>>>> -STATIC
>>>> -EFI_STATUS
>>>> -UpdateBootArgs (
>>>> -  VOID
>>>> -  )
>>>> -{
>>>> -  INTN          Node;
>>>> -  INTN          Retval;
>>>> -  EFI_STATUS    Status;
>>>> -  CHAR8         *CommandLine;
>>>> -
>>>> -  //
>>>> -  // Locate the /chosen node
>>>> -  //
>>>> -  Node = fdt_path_offset (mFdtImage, "/chosen");
>>>> -  if (Node < 0) {
>>>> -    DEBUG ((DEBUG_ERROR, "%a: failed to locate /chosen node\n",
>>>> __FUNCTION__));
>>>> -    return EFI_NOT_FOUND;
>>>> -  }
>>>> -
>>>> -  //
>>>> -  // If /chosen/bootargs already exists, we want to add a space
>>>> character
>>>> -  // before adding the firmware supplied arguments. However, the
>>>> RpiFirmware
>>>> -  // protocol expects a 32-bit aligned buffer. So let's allocate 4
>>>> bytes of
>>>> -  // slack, and skip the first 3 when passing this buffer into libfdt.
>>>> -  //
>>>> -  CommandLine = AllocatePool (MAX_CMDLINE_SIZE) + 4;
>>>> -  if (!CommandLine) {
>>>> -    DEBUG ((DEBUG_ERROR, "%a: failed to allocate memory\n",
>>>> __FUNCTION__));
>>>> -    return EFI_OUT_OF_RESOURCES;
>>>> -  }
>>>> -
>>>> -  //
>>>> -  // Get the command line from the firmware
>>>> -  //
>>>> -  Status = mFwProtocol->GetCommandLine (MAX_CMDLINE_SIZE,
>>>> CommandLine + 4);
>>>> -  if (EFI_ERROR (Status)) {
>>>> -    DEBUG ((DEBUG_ERROR, "%a: failed to retrieve command line\n",
>>>> __FUNCTION__));
>>>> -    return Status;
>>>> -  }
>>>> -
>>>> -  if (AsciiStrLen (CommandLine + 4) == 0) {
>>>> -    DEBUG ((DEBUG_INFO, "%a: empty command line received\n",
>>>> __FUNCTION__));
>>>> -    return EFI_SUCCESS;
>>>> -  }
>>>> -
>>>> -  CommandLine[3] = ' ';
>>>> -
>>>> -  Retval = fdt_appendprop_string (mFdtImage, Node, "bootargs",
>>>> &CommandLine[3]);
>>>> -  if (Retval != 0) {
>>>> -    DEBUG ((DEBUG_ERROR, "%a: failed to set /chosen/bootargs
>>>> property (%d)\n",
>>>> -      __FUNCTION__, Retval));
>>>> -  }
>>>> -
>>>> -  DEBUG_CODE_BEGIN ();
>>>> -    CONST CHAR8    *Prop;
>>>> -    INT32         Length;
>>>> -    INT32         Index;
>>>> -
>>>> -    Node = fdt_path_offset (mFdtImage, "/chosen");
>>>> -    ASSERT (Node >= 0);
>>>> -
>>>> -    Prop = fdt_getprop (mFdtImage, Node, "bootargs", &Length);
>>>> -    ASSERT (Prop != NULL);
>>>> -
>>>> -    DEBUG ((DEBUG_INFO, "Command line set from firmware (length
>>>> %d):\n'", Length));
>>>> -
>>>> -    for (Index = 0; Index < Length; Index++, Prop++) {
>>>> -      if (*Prop == '\0') {
>>>> -        continue;
>>>> -      }
>>>> -      DEBUG ((DEBUG_INFO, "%c", *Prop));
>>>> -    }
>>>> -
>>>> -    DEBUG ((DEBUG_INFO, "'\n"));
>>>> -  DEBUG_CODE_END ();
>>>> -
>>>> -  FreePool (CommandLine - 4);
>>>> -  return EFI_SUCCESS;
>>>> -}
>>>> -
>>>> -
>>>>   /**
>>>>     @param  ImageHandle   of the loaded driver
>>>>     @param  SystemTable   Pointer to the System Table
>>>> @@ -435,13 +351,10 @@ FdtDxeInitialize (
>>>>     IN EFI_SYSTEM_TABLE   *SystemTable
>>>>     )
>>>>   {
>>>> +  INT32      Retval;
>>>>     EFI_STATUS Status;
>>>> -  EFI_GUID   *FdtGuid;
>>>> -  VOID       *FdtImage;
>>>>     UINTN      FdtSize;
>>>> -  INT32      Retval;
>>>> -  UINT32     BoardRevision;
>>>> -  BOOLEAN    Internal;
>>>> +  VOID       *FdtImage = NULL;
>>>>     if (PcdGet32 (PcdOptDeviceTree) == 0) {
>>>>       DEBUG ((DEBUG_INFO, "Device Tree disabled per user
>>>> configuration\n"));
>>>> @@ -450,77 +363,28 @@ FdtDxeInitialize (
>>>>     Status = gBS->LocateProtocol (&gRaspberryPiFirmwareProtocolGuid,
>>>> NULL,
>>>>                     (VOID**)&mFwProtocol);
>>>> -  ASSERT_EFI_ERROR (Status);
>>>> +  if (mFwProtocol == NULL) {
>>>> +    /*
>>>> +     * Impossible because of the depex...
>>>> +     */
>>>> +    ASSERT_EFI_ERROR (Status);
>>>> +    return EFI_NOT_FOUND;
>>>> +  }
>>>
>>> Do we need this change?
>>
>> Looking at what we are doing elsewhere, I thing we should go with:
>>
>>    ASSERT_EFI_ERROR (Status);
>>    if (EFI_ERROR (Status)) {
>>      return Status;
>>    }
>>
>> The ASSERT_EFI_ERROR () on its own was not enough for RELEASE, so we
>> definitely want to return an error code here if needed, and I guess
>> that, technically, we could consider that LocateProtocol () may
>> succeed and return a NULL value for mFwProtocol, but I doubt that's a
>> valid consideration.
>>
>
> But the DEPEX guarantees that the module will only be dispatched at a
> time when LocateProtocol() will succeed. This is a common pattern, so I
> wonder why it is being silently modified here.
>

Fair enough. Let's wait for Andrei to reply on this.

/Pete




Re: [PATCH v1 1/1] INF Spec: Add file dependency to [Sources] syntax

PierreGondois
 

Hello Bob,
Would one of the 2 solutions detailed in the last message fit?
Just a thought: to allow building ASL files before C files, an ordering must be done somewhere. Either it shall be hard-coded into the build system, either it shall be possible for people to modify it. In the latter case, this order could be in module specific INF file, or in for larger scope in the build_rule.txt file.
If you have any other angle, idea on how we could do it, please let me know.

Regards,
Pierre

-----Original Message-----
From: Feng, Bob C <bob.c.feng@intel.com>
Sent: Thursday, April 23, 2020 10:37 AM
To: Pierre Gondois <Pierre.Gondois@arm.com>; devel@edk2.groups.io; Kinney, Michael D <michael.d.kinney@intel.com>; Sami Mujawar <Sami.Mujawar@arm.com>; Gao, Liming <liming.gao@intel.com>
Cc: nd <nd@arm.com>
Subject: RE: [edk2-devel] [PATCH v1 1/1] INF Spec: Add file dependency to [Sources] syntax

Hi Pierre,

Sorry for the late response. I have no good idea to resolve the concern about the INF syntax change, but I think the ASL compilation should not be done in AutoGen phase.

I summarize the solutions that we have discussed.
1. Put the ASL build target before the C build target.
This solution would not work when the make program enable multiple-threads.
2. Separate your original driver into a lib and a driver. The library include the asl file and the driver include c files. Make the driver depends on the library, so that the library can be built before the driver and the .hex file will be generated before build the c file.
This solution break the module functional integrity.
3. Add the syntax in INF file to support source file dependency between source file.
This solution should work. But the dependency descripted in the Makefile looks not accurate since you would see a cfile.obj depends on a aslfile.aml. The cfile.obj should depend on aslfile.hex, but basetool only know the output of a ASL file is a AML file. And this solution looks complicated.
4. Build ASL in AutoGen phase.
Compilation activities should belong to Make phase.

We might need to figure out a better solution.

Thanks,
Bob

-----Original Message-----
From: Pierre Gondois <Pierre.Gondois@arm.com>
Sent: Tuesday, April 21, 2020 2:16 AM
To: devel@edk2.groups.io; Kinney, Michael D <michael.d.kinney@intel.com>; Feng, Bob C <bob.c.feng@intel.com>; Sami Mujawar <Sami.Mujawar@arm.com>; Gao, Liming <liming.gao@intel.com>
Cc: nd <nd@arm.com>
Subject: RE: [edk2-devel] [PATCH v1 1/1] INF Spec: Add file dependency to [Sources] syntax

Hello Bob, Michael and Liming,
I don't have a clear idea on which direction to go in order to enable building ASL files before C files in edk2. I would need an answer to agree on which direction I should continue to investigate. For the record, the matching patch in edk2 is available at https://edk2.groups.io/g/devel/message/56662 and
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2425

Regards,
Pierre

-----Original Message-----
From: Pierre Gondois
Sent: Wednesday, April 15, 2020 4:41 PM
To: devel@edk2.groups.io; michael.d.kinney@intel.com; Feng, Bob C <bob.c.feng@intel.com>; Sami Mujawar <Sami.Mujawar@arm.com>; Gao, Liming <liming.gao@intel.com>
Cc: nd <nd@arm.com>
Subject: RE: [edk2-devel] [PATCH v1 1/1] INF Spec: Add file dependency to [Sources] syntax

Hello Bob, Liming and Michael,
This is just a re-post of my last message on the Bugzilla ticket available at https://bugzilla.tianocore.org/show_bug.cgi?id=2646

I wanted to be sure we agreed before trying to make an implementation. It seems that in edk2 build system, the steps described below are followed (in the same order):
1. Autogen.c/h files are generated, using UNI files among other files.
2. Makefiles are generated by:
2.1. Probing the files in the module (from the [Sources] section of the ".inf" file).
2.2. For each file probed, copy/pasting the [Commands] section of the "Conf/build_rule.txt" file relevant for the file extension. This allows to generate the file of the [OutputFile] section. For an ASL file, the list of commands at [Acpi-Source-Language-File].<Command.GCC> will be copy/pasted (if someone uses GCC).

The UNI files are processes in the first step, when generating Autogen.c/h files. As the [Unicode-Text-File].<Command> section is empty, no command needs to be executed for UNI files in the second step. It is possible for the Makefile to reference the Autogen.h file because it has already been created.

Based on how UNI files are handled, we can process ASL files before the Makefile generation step. The build steps would then be:
1. Autogen.c/h files are generated, using UNI files among other files.
2. ASL files are compiled.
3. Makefiles are generated by:
3.1. Probing the files in the module (from the [Sources] section of the ".inf" file).
3.2. For each file probed, copy/pasting the [Commands] section of the "Conf/build_rule.txt" file relevant for the file extension. This allows to generate the file of the [OutputFile] section. For an ASL file, the list of commands at [Acpi-Source-Language-File].<Command.GCC> will be copy/pasted (if someone uses GCC).

However, this would imply:
- Not building ASL files by calling the Makefile. Indeed, if ASL files are built before the Makefile generation, they cannot be built by the Makefile.
- Having a hard-coded build order for ASL files. They will always be built before other files (excepted form UNI files. We can still choose to build ASL files before or after UNI files)
- In a module having ASL files, always including the HEX files generated by the compilation of ASL files. Indeed, the build dependency between C and ASL files still needs to be resolved.

Please let me know if you are ok with this solution,

Regards,
Pierre

P.S.:
The options that we have already tried are:
- Option 1: When listing the build target in the "CODA_TARGET" variable, the AML build target are put first. This was the first implementation available at https://edk2.groups.io/g/devel/message/49659 . The issue for this solution is that there is no explicit dependency between a C file and an AML/HEX file (the C file needs to include the HEX file generated while compiling an ASL file). For a multi-thread build, the build will fail, as you pointed out at https://edk2.groups.io/g/devel/message/50477
- Option 2: Modifying INF files to describe dependencies between source files of different languages. This allows to handle multi-thread builds, but the INF specification needs to be modified. Patch available at https://edk2.groups.io/g/devel/message/56663


-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Michael D Kinney via Groups.Io
Sent: 01 April 2020 17:19
To: devel@edk2.groups.io; Feng, Bob C <bob.c.feng@intel.com>; Pierre Gondois <Pierre.Gondois@arm.com>; Sami Mujawar <Sami.Mujawar@arm.com>; Gao, Liming <liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>
Cc: nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH v1 1/1] INF Spec: Add file dependency to [Sources] syntax

Hi Pierre,

We discussed this in the bug scrub yesterday.

We think there may be a simpler way to address this issue without extending the INF syntax.

It is our understanding that the ASL files need to be processed before C files when both are present in an INF.

This is similar to the requirement that UNI files be processed before C files that is already supported.

Please continue the discussion in Bugzilla with Bob.

Thanks,

Mike

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Bob
Feng
Sent: Wednesday, April 1, 2020 1:53 AM
To: devel@edk2.groups.io; pierre.gondois@arm.com; Sami Mujawar
<Sami.Mujawar@arm.com>; Gao, Liming <liming.gao@intel.com>
Cc: nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH v1 1/1] INF Spec: Add file dependency
to [Sources] syntax

Hi Pierre,

I will review the spec and code change in this week.

Thanks,
Bob

-----Original Message-----
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
PierreGondois
Sent: Monday, March 30, 2020 11:52 PM
To: devel@edk2.groups.io; Sami Mujawar <Sami.Mujawar@arm.com>; Feng,
Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>
Cc: nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH v1 1/1] INF Spec: Add file dependency
to [Sources] syntax

Hello Liming and Bob,
I couldn't find the list of maintainers for the specification files,
but it seems Liming is a maintainer.
If a maintainer is missing, please feel free to cc him,

Regards,
Pierre

-----Original Message-----
From: PierreGondois <pierre.gondois@arm.com>
Sent: Monday, March 30, 2020 4:43 PM
To: devel@edk2.groups.io
Cc: Pierre Gondois <Pierre.Gondois@arm.com>; liming.gao@intel.com;
sami.mujawar@arm.org; nd <nd@arm.com>
Subject: [PATCH v1 1/1] INF Spec: Add file dependency to [Sources]
syntax

From: Pierre Gondois <Pierre.Gondois@arm.com>

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2464

When building an edk2 module, a C file was including a .hex file
generated by the compilation of an ASL file.
To describe this dependency between an ASL file and a C file, the edk2
patch,
- named "BaseTools: Build ASL files before C files",
- discussed at:
https://edk2.groups.io/g/devel/message/52550
has been created.
This patch allows to establish build dependencies in the [Sources]
section, between files that are not of the same language.
E.g.:
[Sources]
FileName1.X
FileName2.Y : FileName1.X
FileName3.Z : FileName1.X FileName2.Y

Here:
* FileName1.X will be built prior to FileName2.Y.
* FileName1.X and FileName2.Y will be built prior to
FileName3.Z.

This patch updates the Inf specification accordingly.

Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
---

The changes can be seen at
https://github.com/PierreARM/edk2-
InfSpecification/tree/Bugzilla_2464_Enable_Build_Dependen
cies_v1

Notes:
v1:
- Enable build dependencies in the [Sources] section

2_inf_overview/25_[sources]_section.md
| 12 ++++++++++++
3_edk_ii_inf_file_format/32_component_inf_definition.md
| 3 +++
3_edk_ii_inf_file_format/39_[sources]_sections.md
| 6 ++++--
README.md
| 1 +
4 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/2_inf_overview/25_[sources]_section.md
b/2_inf_overview/25_[sources]_section.md
index
54757e61e37268eed293a5288e607cf2c7cfacf6..5b9f0a8395ef2be
4497d99197dc695625d841830 100644
--- a/2_inf_overview/25_[sources]_section.md
+++ b/2_inf_overview/25_[sources]_section.md
@@ -2,6 +2,7 @@
2.5 [Sources] Section

Copyright (c) 2007-2019, Intel Corporation. All rights
reserved.<BR>
+ Copyright (c) 2020, ARM Limited. All rights
reserved.<BR>

Redistribution and use in source (original document
form) and 'compiled'
forms (converted to PDF, epub, HTML and other formats) with or
without @@ -94,6 +95,17 @@ The following is an example for sources
sections.

```

+The following example depicts the syntax to establish
dependencies
+between files of different source types. As shown in the
example below,
+Dsdt.asl will be compiled before DadtHandler.c:
+
+```ini
+[Sources.common]
+ DsdtHandler.c : Dsdt.asl
+ DsdtHandler.h
+ Dsdt.asl
+```
+
All Unicode files must be listed in the source section.
If a Unicode file, `A.uni`, has the statement: `#include B.uni`, and
`B.uni` has a statement:
`#include C.uni`, both `B.uni` and `C.uni` files must be listed in
the INF diff --git
a/3_edk_ii_inf_file_format/32_component_inf_definition.md
b/3_edk_ii_inf_file_format/32_component_inf_definition.md
index
164771cb4cfff6e81fbf762a67ff741c190cecde..d776714c24c0baf
2348f53dc2576c9feb6f3cb5e 100644
---
a/3_edk_ii_inf_file_format/32_component_inf_definition.md
+++
b/3_edk_ii_inf_file_format/32_component_inf_definition.md
@@ -2,6 +2,7 @@
3.2 Component INF Definition

Copyright (c) 2007-2019, Intel Corporation. All rights
reserved.<BR>
+ Copyright (c) 2020, ARM Limited. All rights
reserved.<BR>

Redistribution and use in source (original document
form) and 'compiled'
forms (converted to PDF, epub, HTML and other formats) with or
without @@ -133,6 +134,8 @@ The following are common definitions used
by multiple section types.
<Eq> ::= <TS> "=" <TS>
<FieldSeparator> ::= "|"
<FS> ::= <TS> <FieldSeparator> <TS>
+<SrcDepSeperator> ::= ":"
+<DepS> ::= <TS> <SrcDepSeperator> <TS>
<Wildcard> ::= "*"
<CommaSpace> ::= "," <Space>*
<Cs> ::= "," <Space>*
diff --git
a/3_edk_ii_inf_file_format/39_[sources]_sections.md
b/3_edk_ii_inf_file_format/39_[sources]_sections.md
index
810995df26ba409ca2cf3ebe6238aa5d55cf81f1..ac966425101fd44
a57b09d36f95a0f732eab1c59 100644
--- a/3_edk_ii_inf_file_format/39_[sources]_sections.md
+++ b/3_edk_ii_inf_file_format/39_[sources]_sections.md
@@ -2,6 +2,7 @@
3.9 [Sources] Sections

Copyright (c) 2007-2019, Intel Corporation. All rights
reserved.<BR>
+ Copyright (c) 2020, ARM Limited. All rights
reserved.<BR>

Redistribution and use in source (original document
form) and 'compiled'
forms (converted to PDF, epub, HTML and other formats) with or
without @@ -74,7 +75,8 @@ This section is not valid for a generated
"As Built" binary INF file.
<Options> ::= <FS> [<Family>] [<opt1>]
<opt1> ::= <FS> [<TagName>] [<opt2>]
<opt2> ::= <FS> [<ToolCode>] [<opt3>]
-<opt3> ::= <FS> [<FeatureFlagExpress>]
+<opt3> ::= <FS> [<FeatureFlagExpress>]
[<opt4>]
+<opt4> ::= <DepS> <FileNameDependency>+
<Family> ::= {"MSFT"} {"GCC"} {"INTEL"}
{<Wildcard>}
<TagName> ::= {<ToolWord>} {"*"}
<ToolCode> ::= _CommandCode_
@@ -83,7 +85,7 @@ This section is not valid for a generated "As Built"
binary INF file.

#### Parameters

-**_Filename_**
+**_Filename_, _FileNameDependency_**

Paths listed in the filename elements of the `[Sources]` section must
be relative to the directory the INF file resides in. Use of "..",
"." and "../"
diff --git a/README.md b/README.md
index
60fba19fd67fd8d3dd33199de23f9bfe20aea7c9..4f771fc0f6e4ff5
16be95b1879d58329ab3bbecc 100644
--- a/README.md
+++ b/README.md
@@ -203,3 +203,4 @@ Copyright (c) 2007-2017, Intel Corporation. All
rights reserved.
| |
[#1162](https://bugzilla.tianocore.org/show_bug.cgi?id=11
62) Correct the item in Table 1 to align with 3.4 section
| |
| 1.28 |
[#1453](https://bugzilla.tianocore.org/show_bug.cgi?id=14
53) Update INF spec to remove EDK related contents
| Mar 2019 |
| 1.29 |
[#1952](https://bugzilla.tianocore.org/show_bug.cgi?id=19
52) Add new MODULE_TYPE HOST_APPLICATION
| July 2019 |
+| |
[#2646](https://bugzilla.tianocore.org/show_bug.cgi?id=26
46) Add file dependency to [Sources] syntax
| |
--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'






Re: [edk2-platforms][PATCH 1/2] RPi: rip out FdtDxe logic to use internal DTB

Pete Batard
 

On 2020.05.01 16:13, Ard Biesheuvel wrote:
On 5/1/20 5:11 PM, Pete Batard wrote:
On 2020.05.01 14:19, Ard Biesheuvel wrote:
On 4/30/20 11:16 PM, Andrei Warkentin wrote:
Initially, FdtDxe used an internal (embedded in UEFI) FDT,
because it was neither understood how to consume the
one loaded by the VideoCore firmware, nor understood just
how important it is to use the DTB provided by config.txt.

Embedding the DT was a bad idea, because:
- Permanently stale
- No overlays

Also, on devices like the Pi 4 you _have_ to have a DT
around for the start4 VPU firmware to pick up, otherwise
the board is left in an inconsistent state. So we're being
proscriptive now about DT use with config.txt, which means
this internal DT logic is deadc code.

Further FdtDxe cleanups are possible and will be handled
separately, specifically:
- probably no need to use a separate allocation for patched DT (optimize memory used)
- suspicious use of EfiBootServicesData (I filed https://github.com/ARM-software/ebbr/issues/45 to sort out the real requirements)

Testing: Booted Ubuntu 18.04 on Pi 2B (1.2).

Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
---
  Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c   | 206 ++++----------------
  Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.inf |   4 -
  Platform/RaspberryPi/RPi3/RPi3.fdf             |  11 --
  Platform/RaspberryPi/RPi4/RPi4.fdf             |   8 -
  Platform/RaspberryPi/RaspberryPi.dec           |   7 -
  5 files changed, 38 insertions(+), 198 deletions(-)

diff --git a/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c b/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c
index e7143f57..187b9566 100644
--- a/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c
+++ b/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c
@@ -335,90 +335,6 @@ CleanSimpleFramebuffer (
    return EFI_SUCCESS;
  }
-#define MAX_CMDLINE_SIZE    512
-
-STATIC
-EFI_STATUS
-UpdateBootArgs (
-  VOID
-  )
-{
-  INTN          Node;
-  INTN          Retval;
-  EFI_STATUS    Status;
-  CHAR8         *CommandLine;
-
-  //
-  // Locate the /chosen node
-  //
-  Node = fdt_path_offset (mFdtImage, "/chosen");
-  if (Node < 0) {
-    DEBUG ((DEBUG_ERROR, "%a: failed to locate /chosen node\n", __FUNCTION__));
-    return EFI_NOT_FOUND;
-  }
-
-  //
-  // If /chosen/bootargs already exists, we want to add a space character
-  // before adding the firmware supplied arguments. However, the RpiFirmware
-  // protocol expects a 32-bit aligned buffer. So let's allocate 4 bytes of
-  // slack, and skip the first 3 when passing this buffer into libfdt.
-  //
-  CommandLine = AllocatePool (MAX_CMDLINE_SIZE) + 4;
-  if (!CommandLine) {
-    DEBUG ((DEBUG_ERROR, "%a: failed to allocate memory\n", __FUNCTION__));
-    return EFI_OUT_OF_RESOURCES;
-  }
-
-  //
-  // Get the command line from the firmware
-  //
-  Status = mFwProtocol->GetCommandLine (MAX_CMDLINE_SIZE, CommandLine + 4);
-  if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: failed to retrieve command line\n", __FUNCTION__));
-    return Status;
-  }
-
-  if (AsciiStrLen (CommandLine + 4) == 0) {
-    DEBUG ((DEBUG_INFO, "%a: empty command line received\n", __FUNCTION__));
-    return EFI_SUCCESS;
-  }
-
-  CommandLine[3] = ' ';
-
-  Retval = fdt_appendprop_string (mFdtImage, Node, "bootargs", &CommandLine[3]);
-  if (Retval != 0) {
-    DEBUG ((DEBUG_ERROR, "%a: failed to set /chosen/bootargs property (%d)\n",
-      __FUNCTION__, Retval));
-  }
-
-  DEBUG_CODE_BEGIN ();
-    CONST CHAR8    *Prop;
-    INT32         Length;
-    INT32         Index;
-
-    Node = fdt_path_offset (mFdtImage, "/chosen");
-    ASSERT (Node >= 0);
-
-    Prop = fdt_getprop (mFdtImage, Node, "bootargs", &Length);
-    ASSERT (Prop != NULL);
-
-    DEBUG ((DEBUG_INFO, "Command line set from firmware (length %d):\n'", Length));
-
-    for (Index = 0; Index < Length; Index++, Prop++) {
-      if (*Prop == '\0') {
-        continue;
-      }
-      DEBUG ((DEBUG_INFO, "%c", *Prop));
-    }
-
-    DEBUG ((DEBUG_INFO, "'\n"));
-  DEBUG_CODE_END ();
-
-  FreePool (CommandLine - 4);
-  return EFI_SUCCESS;
-}
-
-
  /**
    @param  ImageHandle   of the loaded driver
    @param  SystemTable   Pointer to the System Table
@@ -435,13 +351,10 @@ FdtDxeInitialize (
    IN EFI_SYSTEM_TABLE   *SystemTable
    )
  {
+  INT32      Retval;
    EFI_STATUS Status;
-  EFI_GUID   *FdtGuid;
-  VOID       *FdtImage;
    UINTN      FdtSize;
-  INT32      Retval;
-  UINT32     BoardRevision;
-  BOOLEAN    Internal;
+  VOID       *FdtImage = NULL;
    if (PcdGet32 (PcdOptDeviceTree) == 0) {
      DEBUG ((DEBUG_INFO, "Device Tree disabled per user configuration\n"));
@@ -450,77 +363,28 @@ FdtDxeInitialize (
    Status = gBS->LocateProtocol (&gRaspberryPiFirmwareProtocolGuid, NULL,
                    (VOID**)&mFwProtocol);
-  ASSERT_EFI_ERROR (Status);
+  if (mFwProtocol == NULL) {
+    /*
+     * Impossible because of the depex...
+     */
+    ASSERT_EFI_ERROR (Status);
+    return EFI_NOT_FOUND;
+  }
Do we need this change?
Looking at what we are doing elsewhere, I thing we should go with:

   ASSERT_EFI_ERROR (Status);
   if (EFI_ERROR (Status)) {
     return Status;
   }

The ASSERT_EFI_ERROR () on its own was not enough for RELEASE, so we definitely want to return an error code here if needed, and I guess that, technically, we could consider that LocateProtocol () may succeed and return a NULL value for mFwProtocol, but I doubt that's a valid consideration.
But the DEPEX guarantees that the module will only be dispatched at a time when LocateProtocol() will succeed. This is a common pattern, so I wonder why it is being silently modified here.
Fair enough. Let's wait for Andrei to reply on this.

/Pete


Re: [edk2-platforms][PATCH 1/2] RPi: rip out FdtDxe logic to use internal DTB

Ard Biesheuvel
 

On 5/1/20 5:11 PM, Pete Batard wrote:
On 2020.05.01 14:19, Ard Biesheuvel wrote:
On 4/30/20 11:16 PM, Andrei Warkentin wrote:
Initially, FdtDxe used an internal (embedded in UEFI) FDT,
because it was neither understood how to consume the
one loaded by the VideoCore firmware, nor understood just
how important it is to use the DTB provided by config.txt.

Embedding the DT was a bad idea, because:
- Permanently stale
- No overlays

Also, on devices like the Pi 4 you _have_ to have a DT
around for the start4 VPU firmware to pick up, otherwise
the board is left in an inconsistent state. So we're being
proscriptive now about DT use with config.txt, which means
this internal DT logic is deadc code.

Further FdtDxe cleanups are possible and will be handled
separately, specifically:
- probably no need to use a separate allocation for patched DT (optimize memory used)
- suspicious use of EfiBootServicesData (I filed https://github.com/ARM-software/ebbr/issues/45 to sort out the real requirements)

Testing: Booted Ubuntu 18.04 on Pi 2B (1.2).

Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
---
  Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c   | 206 ++++----------------
  Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.inf |   4 -
  Platform/RaspberryPi/RPi3/RPi3.fdf             |  11 --
  Platform/RaspberryPi/RPi4/RPi4.fdf             |   8 -
  Platform/RaspberryPi/RaspberryPi.dec           |   7 -
  5 files changed, 38 insertions(+), 198 deletions(-)

diff --git a/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c b/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c
index e7143f57..187b9566 100644
--- a/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c
+++ b/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c
@@ -335,90 +335,6 @@ CleanSimpleFramebuffer (
    return EFI_SUCCESS;
  }
-#define MAX_CMDLINE_SIZE    512
-
-STATIC
-EFI_STATUS
-UpdateBootArgs (
-  VOID
-  )
-{
-  INTN          Node;
-  INTN          Retval;
-  EFI_STATUS    Status;
-  CHAR8         *CommandLine;
-
-  //
-  // Locate the /chosen node
-  //
-  Node = fdt_path_offset (mFdtImage, "/chosen");
-  if (Node < 0) {
-    DEBUG ((DEBUG_ERROR, "%a: failed to locate /chosen node\n", __FUNCTION__));
-    return EFI_NOT_FOUND;
-  }
-
-  //
-  // If /chosen/bootargs already exists, we want to add a space character
-  // before adding the firmware supplied arguments. However, the RpiFirmware
-  // protocol expects a 32-bit aligned buffer. So let's allocate 4 bytes of
-  // slack, and skip the first 3 when passing this buffer into libfdt.
-  //
-  CommandLine = AllocatePool (MAX_CMDLINE_SIZE) + 4;
-  if (!CommandLine) {
-    DEBUG ((DEBUG_ERROR, "%a: failed to allocate memory\n", __FUNCTION__));
-    return EFI_OUT_OF_RESOURCES;
-  }
-
-  //
-  // Get the command line from the firmware
-  //
-  Status = mFwProtocol->GetCommandLine (MAX_CMDLINE_SIZE, CommandLine + 4);
-  if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: failed to retrieve command line\n", __FUNCTION__));
-    return Status;
-  }
-
-  if (AsciiStrLen (CommandLine + 4) == 0) {
-    DEBUG ((DEBUG_INFO, "%a: empty command line received\n", __FUNCTION__));
-    return EFI_SUCCESS;
-  }
-
-  CommandLine[3] = ' ';
-
-  Retval = fdt_appendprop_string (mFdtImage, Node, "bootargs", &CommandLine[3]);
-  if (Retval != 0) {
-    DEBUG ((DEBUG_ERROR, "%a: failed to set /chosen/bootargs property (%d)\n",
-      __FUNCTION__, Retval));
-  }
-
-  DEBUG_CODE_BEGIN ();
-    CONST CHAR8    *Prop;
-    INT32         Length;
-    INT32         Index;
-
-    Node = fdt_path_offset (mFdtImage, "/chosen");
-    ASSERT (Node >= 0);
-
-    Prop = fdt_getprop (mFdtImage, Node, "bootargs", &Length);
-    ASSERT (Prop != NULL);
-
-    DEBUG ((DEBUG_INFO, "Command line set from firmware (length %d):\n'", Length));
-
-    for (Index = 0; Index < Length; Index++, Prop++) {
-      if (*Prop == '\0') {
-        continue;
-      }
-      DEBUG ((DEBUG_INFO, "%c", *Prop));
-    }
-
-    DEBUG ((DEBUG_INFO, "'\n"));
-  DEBUG_CODE_END ();
-
-  FreePool (CommandLine - 4);
-  return EFI_SUCCESS;
-}
-
-
  /**
    @param  ImageHandle   of the loaded driver
    @param  SystemTable   Pointer to the System Table
@@ -435,13 +351,10 @@ FdtDxeInitialize (
    IN EFI_SYSTEM_TABLE   *SystemTable
    )
  {
+  INT32      Retval;
    EFI_STATUS Status;
-  EFI_GUID   *FdtGuid;
-  VOID       *FdtImage;
    UINTN      FdtSize;
-  INT32      Retval;
-  UINT32     BoardRevision;
-  BOOLEAN    Internal;
+  VOID       *FdtImage = NULL;
    if (PcdGet32 (PcdOptDeviceTree) == 0) {
      DEBUG ((DEBUG_INFO, "Device Tree disabled per user configuration\n"));
@@ -450,77 +363,28 @@ FdtDxeInitialize (
    Status = gBS->LocateProtocol (&gRaspberryPiFirmwareProtocolGuid, NULL,
                    (VOID**)&mFwProtocol);
-  ASSERT_EFI_ERROR (Status);
+  if (mFwProtocol == NULL) {
+    /*
+     * Impossible because of the depex...
+     */
+    ASSERT_EFI_ERROR (Status);
+    return EFI_NOT_FOUND;
+  }
Do we need this change?
Looking at what we are doing elsewhere, I thing we should go with:
  ASSERT_EFI_ERROR (Status);
  if (EFI_ERROR (Status)) {
    return Status;
  }
The ASSERT_EFI_ERROR () on its own was not enough for RELEASE, so we definitely want to return an error code here if needed, and I guess that, technically, we could consider that LocateProtocol () may succeed and return a NULL value for mFwProtocol, but I doubt that's a valid consideration.
But the DEPEX guarantees that the module will only be dispatched at a time when LocateProtocol() will succeed. This is a common pattern, so I wonder why it is being silently modified here.


Re: [edk2-platforms][PATCH 1/2] RPi: rip out FdtDxe logic to use internal DTB

Pete Batard
 

On 2020.05.01 14:19, Ard Biesheuvel wrote:
On 4/30/20 11:16 PM, Andrei Warkentin wrote:
Initially, FdtDxe used an internal (embedded in UEFI) FDT,
because it was neither understood how to consume the
one loaded by the VideoCore firmware, nor understood just
how important it is to use the DTB provided by config.txt.

Embedding the DT was a bad idea, because:
- Permanently stale
- No overlays

Also, on devices like the Pi 4 you _have_ to have a DT
around for the start4 VPU firmware to pick up, otherwise
the board is left in an inconsistent state. So we're being
proscriptive now about DT use with config.txt, which means
this internal DT logic is deadc code.

Further FdtDxe cleanups are possible and will be handled
separately, specifically:
- probably no need to use a separate allocation for patched DT (optimize memory used)
- suspicious use of EfiBootServicesData (I filed https://github.com/ARM-software/ebbr/issues/45 to sort out the real requirements)

Testing: Booted Ubuntu 18.04 on Pi 2B (1.2).

Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
---
  Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c   | 206 ++++----------------
  Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.inf |   4 -
  Platform/RaspberryPi/RPi3/RPi3.fdf             |  11 --
  Platform/RaspberryPi/RPi4/RPi4.fdf             |   8 -
  Platform/RaspberryPi/RaspberryPi.dec           |   7 -
  5 files changed, 38 insertions(+), 198 deletions(-)

diff --git a/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c b/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c
index e7143f57..187b9566 100644
--- a/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c
+++ b/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c
@@ -335,90 +335,6 @@ CleanSimpleFramebuffer (
    return EFI_SUCCESS;
  }
-#define MAX_CMDLINE_SIZE    512
-
-STATIC
-EFI_STATUS
-UpdateBootArgs (
-  VOID
-  )
-{
-  INTN          Node;
-  INTN          Retval;
-  EFI_STATUS    Status;
-  CHAR8         *CommandLine;
-
-  //
-  // Locate the /chosen node
-  //
-  Node = fdt_path_offset (mFdtImage, "/chosen");
-  if (Node < 0) {
-    DEBUG ((DEBUG_ERROR, "%a: failed to locate /chosen node\n", __FUNCTION__));
-    return EFI_NOT_FOUND;
-  }
-
-  //
-  // If /chosen/bootargs already exists, we want to add a space character
-  // before adding the firmware supplied arguments. However, the RpiFirmware
-  // protocol expects a 32-bit aligned buffer. So let's allocate 4 bytes of
-  // slack, and skip the first 3 when passing this buffer into libfdt.
-  //
-  CommandLine = AllocatePool (MAX_CMDLINE_SIZE) + 4;
-  if (!CommandLine) {
-    DEBUG ((DEBUG_ERROR, "%a: failed to allocate memory\n", __FUNCTION__));
-    return EFI_OUT_OF_RESOURCES;
-  }
-
-  //
-  // Get the command line from the firmware
-  //
-  Status = mFwProtocol->GetCommandLine (MAX_CMDLINE_SIZE, CommandLine + 4);
-  if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: failed to retrieve command line\n", __FUNCTION__));
-    return Status;
-  }
-
-  if (AsciiStrLen (CommandLine + 4) == 0) {
-    DEBUG ((DEBUG_INFO, "%a: empty command line received\n", __FUNCTION__));
-    return EFI_SUCCESS;
-  }
-
-  CommandLine[3] = ' ';
-
-  Retval = fdt_appendprop_string (mFdtImage, Node, "bootargs", &CommandLine[3]);
-  if (Retval != 0) {
-    DEBUG ((DEBUG_ERROR, "%a: failed to set /chosen/bootargs property (%d)\n",
-      __FUNCTION__, Retval));
-  }
-
-  DEBUG_CODE_BEGIN ();
-    CONST CHAR8    *Prop;
-    INT32         Length;
-    INT32         Index;
-
-    Node = fdt_path_offset (mFdtImage, "/chosen");
-    ASSERT (Node >= 0);
-
-    Prop = fdt_getprop (mFdtImage, Node, "bootargs", &Length);
-    ASSERT (Prop != NULL);
-
-    DEBUG ((DEBUG_INFO, "Command line set from firmware (length %d):\n'", Length));
-
-    for (Index = 0; Index < Length; Index++, Prop++) {
-      if (*Prop == '\0') {
-        continue;
-      }
-      DEBUG ((DEBUG_INFO, "%c", *Prop));
-    }
-
-    DEBUG ((DEBUG_INFO, "'\n"));
-  DEBUG_CODE_END ();
-
-  FreePool (CommandLine - 4);
-  return EFI_SUCCESS;
-}
-
-
  /**
    @param  ImageHandle   of the loaded driver
    @param  SystemTable   Pointer to the System Table
@@ -435,13 +351,10 @@ FdtDxeInitialize (
    IN EFI_SYSTEM_TABLE   *SystemTable
    )
  {
+  INT32      Retval;
    EFI_STATUS Status;
-  EFI_GUID   *FdtGuid;
-  VOID       *FdtImage;
    UINTN      FdtSize;
-  INT32      Retval;
-  UINT32     BoardRevision;
-  BOOLEAN    Internal;
+  VOID       *FdtImage = NULL;
    if (PcdGet32 (PcdOptDeviceTree) == 0) {
      DEBUG ((DEBUG_INFO, "Device Tree disabled per user configuration\n"));
@@ -450,77 +363,28 @@ FdtDxeInitialize (
    Status = gBS->LocateProtocol (&gRaspberryPiFirmwareProtocolGuid, NULL,
                    (VOID**)&mFwProtocol);
-  ASSERT_EFI_ERROR (Status);
+  if (mFwProtocol == NULL) {
+    /*
+     * Impossible because of the depex...
+     */
+    ASSERT_EFI_ERROR (Status);
+    return EFI_NOT_FOUND;
+  }
Do we need this change?
Looking at what we are doing elsewhere, I thing we should go with:

ASSERT_EFI_ERROR (Status);
if (EFI_ERROR (Status)) {
return Status;
}

The ASSERT_EFI_ERROR () on its own was not enough for RELEASE, so we definitely want to return an error code here if needed, and I guess that, technically, we could consider that LocateProtocol () may succeed and return a NULL value for mFwProtocol, but I doubt that's a valid consideration.

Regards,

/Pete


-  Internal = FALSE;
    FdtImage = (VOID*)(UINTN)PcdGet32 (PcdFdtBaseAddress);
    Retval = fdt_check_header (FdtImage);
-  if (Retval == 0) {
-    /*
-     * Have FDT passed via config.txt.
-     */
-    FdtSize = fdt_totalsize (FdtImage);
-    DEBUG ((DEBUG_INFO, "Device Tree passed via config.txt (0x%lx bytes)\n", FdtSize));
-    Status = EFI_SUCCESS;
-  } else {
-    /*
-     * Use one of the embedded FDT's.
-     */
-    Internal = TRUE;
-    DEBUG ((DEBUG_INFO, "No/Bad Device Tree found at address 0x%p (%a), "
-      "looking up internal one...\n", FdtImage, fdt_strerror (Retval)));
+  if (Retval != 0) {
      /*
-     * Query the board revision to differentiate between models.
+     * Any one of:
+     * - Invalid config.txt device_tree_address (not PcdFdtBaseAddress)
+     * - Missing FDT for your Pi variant (if not overriding via device_tree=)
       */
-    Status = mFwProtocol->GetModelRevision (&BoardRevision);
-    if (EFI_ERROR (Status)) {
-      DEBUG ((DEBUG_ERROR, "Failed to get board type: %r\n", Status));
-      DEBUG ((DEBUG_INFO, "Using default internal Device Tree\n"));
-      FdtGuid = &gRaspberryPiDefaultFdtGuid;
-    } else {
-      // www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md
-      switch ((BoardRevision >> 4) & 0xFF) {
-      case 0x08:
-        DEBUG ((DEBUG_INFO, "Using Raspberry Pi 3 Model B internal Device Tree\n"));
-        FdtGuid = &gRaspberryPi3ModelBFdtGuid;
-        break;
-      case 0x0D:
-        DEBUG ((DEBUG_INFO, "Using Raspberry Pi 3 Model B+ internal Device Tree\n"));
-        FdtGuid = &gRaspberryPi3ModelBPlusFdtGuid;
-        break;
-      case 0x11:
-        DEBUG ((DEBUG_INFO, "Using Raspberry Pi 4 Model B internal Device Tree\n"));
-        FdtGuid = &gRaspberryPi4ModelBFdtGuid;
-        break;
-      default:
-        DEBUG ((DEBUG_INFO, "Using default internal Device Tree\n"));
-        FdtGuid = &gRaspberryPiDefaultFdtGuid;
-        break;
-      }
-    }
-    do {
-      Status = GetSectionFromAnyFv (FdtGuid, EFI_SECTION_RAW, 0, &FdtImage, &FdtSize);
-      if (Status == EFI_SUCCESS) {
-        if (fdt_check_header (FdtImage) != 0) {
-          Status = EFI_INCOMPATIBLE_VERSION;
-        }
-      }
-      // No retry needed if we are successful or are dealing with the default Fdt.
-      if ( (Status == EFI_SUCCESS) ||
-           (CompareGuid (FdtGuid, &gRaspberryPiDefaultFdtGuid)) )
-        break;
-      // Otherwise, try one more time with the default Fdt. An example of this
-      // is if we detected a non-default Fdt, that isn't included in the FDF.
-      DEBUG ((DEBUG_INFO, "Internal Device Tree was not found for this platform, "
-        "falling back to default...\n"));
-      FdtGuid = &gRaspberryPiDefaultFdtGuid;
-    } while (1);
+    DEBUG ((DEBUG_ERROR, "No devicetree passed via config.txt\n"));
+    return EFI_NOT_FOUND;
    }
-  if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "Failed to locate Device Tree: %r\n", Status));
-    return Status;
-  }
+  FdtSize = fdt_totalsize (FdtImage);
+  DEBUG ((DEBUG_INFO, "Devicetree passed via config.txt (0x%lx bytes)\n", FdtSize));
    /*
     * Probably overkill.
@@ -529,12 +393,19 @@ FdtDxeInitialize (
    Status = gBS->AllocatePages (AllocateAnyPages, EfiBootServicesData,
                    EFI_SIZE_TO_PAGES (FdtSize), (EFI_PHYSICAL_ADDRESS*)&mFdtImage);
    if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "Failed to allocate Device Tree: %r\n", Status));
-    return Status;
+    DEBUG ((DEBUG_ERROR, "Failed to allocate devicetree: %r\n", Status));
+    goto out;
    }
    Retval = fdt_open_into (FdtImage, mFdtImage, FdtSize);
-  ASSERT (Retval == 0);
+  if (Retval != 0) {
+     DEBUG ((DEBUG_ERROR, "fdt_open_into failed: %d\n", Retval));
+     goto out;
+  }
+
+  /*
+   * These are all best-effort.
+   */
    Status = SanitizePSCI ();
    if (EFI_ERROR (Status)) {
@@ -566,19 +437,18 @@ FdtDxeInitialize (
      Print (L"Failed to update USB compatible properties: %r\n", Status);
    }
-  if (Internal) {
-    /*
-     * A GPU-provided DTB already has the full command line.
-     */
-    Status = UpdateBootArgs ();
-    if (EFI_ERROR (Status)) {
-      Print (L"Failed to update boot arguments: %r\n", Status);
-    }
-  }
-
-  DEBUG ((DEBUG_INFO, "Installed Device Tree at address 0x%p\n", mFdtImage));
+  DEBUG ((DEBUG_INFO, "Installed devicetree at address %p\n", mFdtImage));
    Status = gBS->InstallConfigurationTable (&gFdtTableGuid, mFdtImage);
-  ASSERT_EFI_ERROR (Status);
+  if (EFI_ERROR (Status)) {
+     DEBUG ((DEBUG_ERROR, "Couldn't register devicetree: %r\n", Status));
+     goto out;
+  }
+out:
+  if (EFI_ERROR(Status)) {
+    if (mFdtImage != NULL) {
+      gBS->FreePages ((EFI_PHYSICAL_ADDRESS) mFdtImage, EFI_SIZE_TO_PAGES (FdtSize));
+    }
+  }
    return Status;
  }
diff --git a/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.inf b/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.inf
index fc37353f..49ba5ba1 100644
--- a/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.inf
+++ b/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.inf
@@ -35,10 +35,6 @@
  [Guids]
    gFdtTableGuid
-  gRaspberryPi3ModelBFdtGuid
-  gRaspberryPi3ModelBPlusFdtGuid
-  gRaspberryPi4ModelBFdtGuid
-  gRaspberryPiDefaultFdtGuid
  [Protocols]
    gRaspberryPiFirmwareProtocolGuid              ## CONSUMES
diff --git a/Platform/RaspberryPi/RPi3/RPi3.fdf b/Platform/RaspberryPi/RPi3/RPi3.fdf
index daedc443..e854cd21 100644
--- a/Platform/RaspberryPi/RPi3/RPi3.fdf
+++ b/Platform/RaspberryPi/RPi3/RPi3.fdf
@@ -303,17 +303,6 @@ READ_LOCK_STATUS   = TRUE
    #
    INF Platform/RaspberryPi/Drivers/LogoDxe/LogoDxe.inf
-  #
-  # Device Tree support (used by FdtDxe)
-  # GUIDs should match gRaspberryPi#####FdtGuid's from the .dec
-  #
-  FILE FREEFORM = DF5DA223-1D27-47C3-8D1B-9A41B55A18BC {
-    SECTION RAW = Platform/RaspberryPi/$(PLATFORM_NAME)/DeviceTree/bcm2710-rpi-3-b.dtb
-  }
-  FILE FREEFORM = 3D523012-73FE-40E5-892E-1A4DF60F3C0C {
-    SECTION RAW = Platform/RaspberryPi/$(PLATFORM_NAME)/DeviceTree/bcm2710-rpi-3-b-plus.dtb
-  }
-
  [FV.FVMAIN_COMPACT]
  FvAlignment        = 16
  ERASE_POLARITY     = 1
diff --git a/Platform/RaspberryPi/RPi4/RPi4.fdf b/Platform/RaspberryPi/RPi4/RPi4.fdf
index c3e9cfc4..b1f7aa23 100644
--- a/Platform/RaspberryPi/RPi4/RPi4.fdf
+++ b/Platform/RaspberryPi/RPi4/RPi4.fdf
@@ -307,14 +307,6 @@ READ_LOCK_STATUS   = TRUE
    #
    INF Platform/RaspberryPi/Drivers/LogoDxe/LogoDxe.inf
-  #
-  # Device Tree support (used by FdtDxe)
-  # GUIDs should match gRaspberryPi#####FdtGuid's from the .dec
-  #
- FILE FREEFORM = 80AB6833-CAE4-4CEE-B59D-EB2039B05551 {
-    SECTION RAW = Platform/RaspberryPi/$(PLATFORM_NAME)/DeviceTree/bcm2711-rpi-4-b.dtb
-  }
-
  [FV.FVMAIN_COMPACT]
  FvAlignment        = 16
  ERASE_POLARITY     = 1
diff --git a/Platform/RaspberryPi/RaspberryPi.dec b/Platform/RaspberryPi/RaspberryPi.dec
index b66322be..66ef6186 100644
--- a/Platform/RaspberryPi/RaspberryPi.dec
+++ b/Platform/RaspberryPi/RaspberryPi.dec
@@ -26,13 +26,6 @@
    gRaspberryPiTokenSpaceGuid = {0xCD7CC258, 0x31DB, 0x11E6, {0x9F, 0xD3, 0x63, 0xB0, 0xB8, 0xEE, 0xD6, 0xB5}}
    gRaspberryPiEventResetGuid = {0xCD7CC258, 0x31DB, 0x11E6, {0x9F, 0xD3, 0x63, 0xB4, 0xB4, 0xE4, 0xD4, 0xB4}}
    gConfigDxeFormSetGuid = {0xCD7CC258, 0x31DB, 0x22E6, {0x9F, 0x22, 0x63, 0xB0, 0xB8, 0xEE, 0xD6, 0xB5}}
-  # GUIDs used by FdtDxe to serve a Device Tree at runtime. Not all of these need to apply
-  # to the current platform or match an actual FDF binary, but they need to be defined.
-  gRaspberryPi3ModelBFdtGuid = { 0xDF5DA223, 0x1D27, 0x47C3, { 0x8D, 0x1B, 0x9A, 0x41, 0xB5, 0x5A, 0x18, 0xBC } }
-  gRaspberryPi3ModelBPlusFdtGuid = { 0x3D523012, 0x73FE, 0x40E5, { 0x89, 0x2E, 0x1A, 0x4D, 0xF6, 0x0F, 0x3C, 0x0C } }
-  gRaspberryPi4ModelBFdtGuid = { 0x80AB6833, 0xCAE4, 0x4CEE, { 0xB5, 0x9D, 0xEB, 0x20, 0x39, 0xB0, 0x55, 0x51 } }
-  # Default Fdt to serve if the hardware model can't be detected. Should match one of the above.
-  gRaspberryPiDefaultFdtGuid = {0xDF5DA223, 0x1D27, 0x47C3, { 0x8D, 0x1B, 0x9A, 0x41, 0xB5, 0x5A, 0x18, 0xBC}}
  [PcdsFixedAtBuild.common]
    #


Re: [edk2-platforms][PATCH 1/2] RPi: rip out FdtDxe logic to use internal DTB

Ard Biesheuvel
 

On 4/30/20 11:16 PM, Andrei Warkentin wrote:
Initially, FdtDxe used an internal (embedded in UEFI) FDT,
because it was neither understood how to consume the
one loaded by the VideoCore firmware, nor understood just
how important it is to use the DTB provided by config.txt.
Embedding the DT was a bad idea, because:
- Permanently stale
- No overlays
Also, on devices like the Pi 4 you _have_ to have a DT
around for the start4 VPU firmware to pick up, otherwise
the board is left in an inconsistent state. So we're being
proscriptive now about DT use with config.txt, which means
this internal DT logic is deadc code.
Further FdtDxe cleanups are possible and will be handled
separately, specifically:
- probably no need to use a separate allocation for patched DT (optimize memory used)
- suspicious use of EfiBootServicesData (I filed https://github.com/ARM-software/ebbr/issues/45 to sort out the real requirements)
Testing: Booted Ubuntu 18.04 on Pi 2B (1.2).
Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
---
Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c | 206 ++++----------------
Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.inf | 4 -
Platform/RaspberryPi/RPi3/RPi3.fdf | 11 --
Platform/RaspberryPi/RPi4/RPi4.fdf | 8 -
Platform/RaspberryPi/RaspberryPi.dec | 7 -
5 files changed, 38 insertions(+), 198 deletions(-)
diff --git a/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c b/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c
index e7143f57..187b9566 100644
--- a/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c
+++ b/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c
@@ -335,90 +335,6 @@ CleanSimpleFramebuffer (
return EFI_SUCCESS;
}
-#define MAX_CMDLINE_SIZE 512
-
-STATIC
-EFI_STATUS
-UpdateBootArgs (
- VOID
- )
-{
- INTN Node;
- INTN Retval;
- EFI_STATUS Status;
- CHAR8 *CommandLine;
-
- //
- // Locate the /chosen node
- //
- Node = fdt_path_offset (mFdtImage, "/chosen");
- if (Node < 0) {
- DEBUG ((DEBUG_ERROR, "%a: failed to locate /chosen node\n", __FUNCTION__));
- return EFI_NOT_FOUND;
- }
-
- //
- // If /chosen/bootargs already exists, we want to add a space character
- // before adding the firmware supplied arguments. However, the RpiFirmware
- // protocol expects a 32-bit aligned buffer. So let's allocate 4 bytes of
- // slack, and skip the first 3 when passing this buffer into libfdt.
- //
- CommandLine = AllocatePool (MAX_CMDLINE_SIZE) + 4;
- if (!CommandLine) {
- DEBUG ((DEBUG_ERROR, "%a: failed to allocate memory\n", __FUNCTION__));
- return EFI_OUT_OF_RESOURCES;
- }
-
- //
- // Get the command line from the firmware
- //
- Status = mFwProtocol->GetCommandLine (MAX_CMDLINE_SIZE, CommandLine + 4);
- if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: failed to retrieve command line\n", __FUNCTION__));
- return Status;
- }
-
- if (AsciiStrLen (CommandLine + 4) == 0) {
- DEBUG ((DEBUG_INFO, "%a: empty command line received\n", __FUNCTION__));
- return EFI_SUCCESS;
- }
-
- CommandLine[3] = ' ';
-
- Retval = fdt_appendprop_string (mFdtImage, Node, "bootargs", &CommandLine[3]);
- if (Retval != 0) {
- DEBUG ((DEBUG_ERROR, "%a: failed to set /chosen/bootargs property (%d)\n",
- __FUNCTION__, Retval));
- }
-
- DEBUG_CODE_BEGIN ();
- CONST CHAR8 *Prop;
- INT32 Length;
- INT32 Index;
-
- Node = fdt_path_offset (mFdtImage, "/chosen");
- ASSERT (Node >= 0);
-
- Prop = fdt_getprop (mFdtImage, Node, "bootargs", &Length);
- ASSERT (Prop != NULL);
-
- DEBUG ((DEBUG_INFO, "Command line set from firmware (length %d):\n'", Length));
-
- for (Index = 0; Index < Length; Index++, Prop++) {
- if (*Prop == '\0') {
- continue;
- }
- DEBUG ((DEBUG_INFO, "%c", *Prop));
- }
-
- DEBUG ((DEBUG_INFO, "'\n"));
- DEBUG_CODE_END ();
-
- FreePool (CommandLine - 4);
- return EFI_SUCCESS;
-}
-
-
/**
@param ImageHandle of the loaded driver
@param SystemTable Pointer to the System Table
@@ -435,13 +351,10 @@ FdtDxeInitialize (
IN EFI_SYSTEM_TABLE *SystemTable
)
{
+ INT32 Retval;
EFI_STATUS Status;
- EFI_GUID *FdtGuid;
- VOID *FdtImage;
UINTN FdtSize;
- INT32 Retval;
- UINT32 BoardRevision;
- BOOLEAN Internal;
+ VOID *FdtImage = NULL;
if (PcdGet32 (PcdOptDeviceTree) == 0) {
DEBUG ((DEBUG_INFO, "Device Tree disabled per user configuration\n"));
@@ -450,77 +363,28 @@ FdtDxeInitialize (
Status = gBS->LocateProtocol (&gRaspberryPiFirmwareProtocolGuid, NULL,
(VOID**)&mFwProtocol);
- ASSERT_EFI_ERROR (Status);
+ if (mFwProtocol == NULL) {
+ /*
+ * Impossible because of the depex...
+ */
+ ASSERT_EFI_ERROR (Status);
+ return EFI_NOT_FOUND;
+ }
Do we need this change?

- Internal = FALSE;
FdtImage = (VOID*)(UINTN)PcdGet32 (PcdFdtBaseAddress);
Retval = fdt_check_header (FdtImage);
- if (Retval == 0) {
- /*
- * Have FDT passed via config.txt.
- */
- FdtSize = fdt_totalsize (FdtImage);
- DEBUG ((DEBUG_INFO, "Device Tree passed via config.txt (0x%lx bytes)\n", FdtSize));
- Status = EFI_SUCCESS;
- } else {
- /*
- * Use one of the embedded FDT's.
- */
- Internal = TRUE;
- DEBUG ((DEBUG_INFO, "No/Bad Device Tree found at address 0x%p (%a), "
- "looking up internal one...\n", FdtImage, fdt_strerror (Retval)));
+ if (Retval != 0) {
/*
- * Query the board revision to differentiate between models.
+ * Any one of:
+ * - Invalid config.txt device_tree_address (not PcdFdtBaseAddress)
+ * - Missing FDT for your Pi variant (if not overriding via device_tree=)
*/
- Status = mFwProtocol->GetModelRevision (&BoardRevision);
- if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "Failed to get board type: %r\n", Status));
- DEBUG ((DEBUG_INFO, "Using default internal Device Tree\n"));
- FdtGuid = &gRaspberryPiDefaultFdtGuid;
- } else {
- // www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md
- switch ((BoardRevision >> 4) & 0xFF) {
- case 0x08:
- DEBUG ((DEBUG_INFO, "Using Raspberry Pi 3 Model B internal Device Tree\n"));
- FdtGuid = &gRaspberryPi3ModelBFdtGuid;
- break;
- case 0x0D:
- DEBUG ((DEBUG_INFO, "Using Raspberry Pi 3 Model B+ internal Device Tree\n"));
- FdtGuid = &gRaspberryPi3ModelBPlusFdtGuid;
- break;
- case 0x11:
- DEBUG ((DEBUG_INFO, "Using Raspberry Pi 4 Model B internal Device Tree\n"));
- FdtGuid = &gRaspberryPi4ModelBFdtGuid;
- break;
- default:
- DEBUG ((DEBUG_INFO, "Using default internal Device Tree\n"));
- FdtGuid = &gRaspberryPiDefaultFdtGuid;
- break;
- }
- }
- do {
- Status = GetSectionFromAnyFv (FdtGuid, EFI_SECTION_RAW, 0, &FdtImage, &FdtSize);
- if (Status == EFI_SUCCESS) {
- if (fdt_check_header (FdtImage) != 0) {
- Status = EFI_INCOMPATIBLE_VERSION;
- }
- }
- // No retry needed if we are successful or are dealing with the default Fdt.
- if ( (Status == EFI_SUCCESS) ||
- (CompareGuid (FdtGuid, &gRaspberryPiDefaultFdtGuid)) )
- break;
- // Otherwise, try one more time with the default Fdt. An example of this
- // is if we detected a non-default Fdt, that isn't included in the FDF.
- DEBUG ((DEBUG_INFO, "Internal Device Tree was not found for this platform, "
- "falling back to default...\n"));
- FdtGuid = &gRaspberryPiDefaultFdtGuid;
- } while (1);
+ DEBUG ((DEBUG_ERROR, "No devicetree passed via config.txt\n"));
+ return EFI_NOT_FOUND;
}
- if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "Failed to locate Device Tree: %r\n", Status));
- return Status;
- }
+ FdtSize = fdt_totalsize (FdtImage);
+ DEBUG ((DEBUG_INFO, "Devicetree passed via config.txt (0x%lx bytes)\n", FdtSize));
/*
* Probably overkill.
@@ -529,12 +393,19 @@ FdtDxeInitialize (
Status = gBS->AllocatePages (AllocateAnyPages, EfiBootServicesData,
EFI_SIZE_TO_PAGES (FdtSize), (EFI_PHYSICAL_ADDRESS*)&mFdtImage);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "Failed to allocate Device Tree: %r\n", Status));
- return Status;
+ DEBUG ((DEBUG_ERROR, "Failed to allocate devicetree: %r\n", Status));
+ goto out;
}
Retval = fdt_open_into (FdtImage, mFdtImage, FdtSize);
- ASSERT (Retval == 0);
+ if (Retval != 0) {
+ DEBUG ((DEBUG_ERROR, "fdt_open_into failed: %d\n", Retval));
+ goto out;
+ }
+
+ /*
+ * These are all best-effort.
+ */
Status = SanitizePSCI ();
if (EFI_ERROR (Status)) {
@@ -566,19 +437,18 @@ FdtDxeInitialize (
Print (L"Failed to update USB compatible properties: %r\n", Status);
}
- if (Internal) {
- /*
- * A GPU-provided DTB already has the full command line.
- */
- Status = UpdateBootArgs ();
- if (EFI_ERROR (Status)) {
- Print (L"Failed to update boot arguments: %r\n", Status);
- }
- }
-
- DEBUG ((DEBUG_INFO, "Installed Device Tree at address 0x%p\n", mFdtImage));
+ DEBUG ((DEBUG_INFO, "Installed devicetree at address %p\n", mFdtImage));
Status = gBS->InstallConfigurationTable (&gFdtTableGuid, mFdtImage);
- ASSERT_EFI_ERROR (Status);
+ if (EFI_ERROR (Status)) {
+ DEBUG ((DEBUG_ERROR, "Couldn't register devicetree: %r\n", Status));
+ goto out;
+ }
+out:
+ if (EFI_ERROR(Status)) {
+ if (mFdtImage != NULL) {
+ gBS->FreePages ((EFI_PHYSICAL_ADDRESS) mFdtImage, EFI_SIZE_TO_PAGES (FdtSize));
+ }
+ }
return Status;
}
diff --git a/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.inf b/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.inf
index fc37353f..49ba5ba1 100644
--- a/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.inf
+++ b/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.inf
@@ -35,10 +35,6 @@
[Guids]
gFdtTableGuid
- gRaspberryPi3ModelBFdtGuid
- gRaspberryPi3ModelBPlusFdtGuid
- gRaspberryPi4ModelBFdtGuid
- gRaspberryPiDefaultFdtGuid
[Protocols]
gRaspberryPiFirmwareProtocolGuid ## CONSUMES
diff --git a/Platform/RaspberryPi/RPi3/RPi3.fdf b/Platform/RaspberryPi/RPi3/RPi3.fdf
index daedc443..e854cd21 100644
--- a/Platform/RaspberryPi/RPi3/RPi3.fdf
+++ b/Platform/RaspberryPi/RPi3/RPi3.fdf
@@ -303,17 +303,6 @@ READ_LOCK_STATUS = TRUE
#
INF Platform/RaspberryPi/Drivers/LogoDxe/LogoDxe.inf
- #
- # Device Tree support (used by FdtDxe)
- # GUIDs should match gRaspberryPi#####FdtGuid's from the .dec
- #
- FILE FREEFORM = DF5DA223-1D27-47C3-8D1B-9A41B55A18BC {
- SECTION RAW = Platform/RaspberryPi/$(PLATFORM_NAME)/DeviceTree/bcm2710-rpi-3-b.dtb
- }
- FILE FREEFORM = 3D523012-73FE-40E5-892E-1A4DF60F3C0C {
- SECTION RAW = Platform/RaspberryPi/$(PLATFORM_NAME)/DeviceTree/bcm2710-rpi-3-b-plus.dtb
- }
-
[FV.FVMAIN_COMPACT]
FvAlignment = 16
ERASE_POLARITY = 1
diff --git a/Platform/RaspberryPi/RPi4/RPi4.fdf b/Platform/RaspberryPi/RPi4/RPi4.fdf
index c3e9cfc4..b1f7aa23 100644
--- a/Platform/RaspberryPi/RPi4/RPi4.fdf
+++ b/Platform/RaspberryPi/RPi4/RPi4.fdf
@@ -307,14 +307,6 @@ READ_LOCK_STATUS = TRUE
#
INF Platform/RaspberryPi/Drivers/LogoDxe/LogoDxe.inf
- #
- # Device Tree support (used by FdtDxe)
- # GUIDs should match gRaspberryPi#####FdtGuid's from the .dec
- #
- FILE FREEFORM = 80AB6833-CAE4-4CEE-B59D-EB2039B05551 {
- SECTION RAW = Platform/RaspberryPi/$(PLATFORM_NAME)/DeviceTree/bcm2711-rpi-4-b.dtb
- }
-
[FV.FVMAIN_COMPACT]
FvAlignment = 16
ERASE_POLARITY = 1
diff --git a/Platform/RaspberryPi/RaspberryPi.dec b/Platform/RaspberryPi/RaspberryPi.dec
index b66322be..66ef6186 100644
--- a/Platform/RaspberryPi/RaspberryPi.dec
+++ b/Platform/RaspberryPi/RaspberryPi.dec
@@ -26,13 +26,6 @@
gRaspberryPiTokenSpaceGuid = {0xCD7CC258, 0x31DB, 0x11E6, {0x9F, 0xD3, 0x63, 0xB0, 0xB8, 0xEE, 0xD6, 0xB5}}
gRaspberryPiEventResetGuid = {0xCD7CC258, 0x31DB, 0x11E6, {0x9F, 0xD3, 0x63, 0xB4, 0xB4, 0xE4, 0xD4, 0xB4}}
gConfigDxeFormSetGuid = {0xCD7CC258, 0x31DB, 0x22E6, {0x9F, 0x22, 0x63, 0xB0, 0xB8, 0xEE, 0xD6, 0xB5}}
- # GUIDs used by FdtDxe to serve a Device Tree at runtime. Not all of these need to apply
- # to the current platform or match an actual FDF binary, but they need to be defined.
- gRaspberryPi3ModelBFdtGuid = { 0xDF5DA223, 0x1D27, 0x47C3, { 0x8D, 0x1B, 0x9A, 0x41, 0xB5, 0x5A, 0x18, 0xBC } }
- gRaspberryPi3ModelBPlusFdtGuid = { 0x3D523012, 0x73FE, 0x40E5, { 0x89, 0x2E, 0x1A, 0x4D, 0xF6, 0x0F, 0x3C, 0x0C } }
- gRaspberryPi4ModelBFdtGuid = { 0x80AB6833, 0xCAE4, 0x4CEE, { 0xB5, 0x9D, 0xEB, 0x20, 0x39, 0xB0, 0x55, 0x51 } }
- # Default Fdt to serve if the hardware model can't be detected. Should match one of the above.
- gRaspberryPiDefaultFdtGuid = {0xDF5DA223, 0x1D27, 0x47C3, { 0x8D, 0x1B, 0x9A, 0x41, 0xB5, 0x5A, 0x18, 0xBC}}
[PcdsFixedAtBuild.common]
#


Re: [PATCH v1 0/3] Check if required ACPI tables are installed

Krzysztof Koch
 

Hi Zhichao,

Any idea when this patch set will get merged?

Kind regards,

Krzysztof

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Gao, Zhichao via groups.io
Sent: Friday, April 17, 2020 8:20
To: Krzysztof Koch <Krzysztof.Koch@arm.com>; devel@edk2.groups.io; Ni, Ray <ray.ni@intel.com>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; Matteo Carlini <Matteo.Carlini@arm.com>; Laura Moretta <Laura.Moretta@arm.com>; nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH v1 0/3] Check if required ACPI tables are installed

For the patch set:
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>

Thanks,
Zhichao

-----Original Message-----
From: Krzysztof Koch <Krzysztof.Koch@arm.com>
Sent: Tuesday, April 14, 2020 4:50 PM
To: devel@edk2.groups.io; Ni, Ray <ray.ni@intel.com>; Gao, Zhichao
<zhichao.gao@intel.com>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>; Matteo Carlini
<Matteo.Carlini@arm.com>; Laura Moretta <Laura.Moretta@arm.com>; nd
<nd@arm.com>
Subject: RE: [edk2-devel] [PATCH v1 0/3] Check if required ACPI tables
are installed

Hi,

Can I get a review for this patch series?

Thanks,

Krzysztof

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
Krzysztof Koch via Groups.Io
Sent: Wednesday, March 25, 2020 9:39
To: devel@edk2.groups.io
Cc: ray.ni@intel.com; zhichao.gao@intel.com; Sami Mujawar
<Sami.Mujawar@arm.com>; Matteo Carlini <Matteo.Carlini@arm.com>; Laura
Moretta <Laura.Moretta@arm.com>; nd <nd@arm.com>
Subject: [edk2-devel] [PATCH v1 0/3] Check if required ACPI tables are
installed

This patch series adds a new capability to the Acpiview UEFI shell tool.
Using the -r command line parameter, it is now possible to choose a
specification which lists mandatory ACPI tables. The parameter value
is then consumed by a library which validates ACPI tables identified
on the platform against these requirements.

The -r parameter is architecture agnostic. However, as of now, the
possible values for the parameter are only defined in the context of
the Arm architecture.

For Arm-based platforms, it is now possible to validate that Server
Base Boot Requirements (SBBR) mandatory ACPI tables are present on the platform.

Changes can be seen at:
https://github.com/KrzysztofKoch1/edk2/tree/617_sbbr_validate_acpi_tab
l
e_counts_v1

Krzysztof Koch (3):
ShellPkg: acpiview: Add -r parameter for table requirements validation
ShellPkg: acpiview: Add library for SBBR ACPI requirements validation
ShellPkg: acpiview: Check if SBBR mandatory ACPI tables are
installed

ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c |
16 ++
ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c | 104
++++++++-
ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.h | 44
+++-
ShellPkg/Library/UefiShellAcpiViewCommandLib/Arm/SbbrValidator.c
| 222 ++++++++++++++++++++
ShellPkg/Library/UefiShellAcpiViewCommandLib/Arm/SbbrValidator.h
| 91 ++++++++

ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewComman
dLib.inf | 6 +-

ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewComman
dLib.uni | 14 +-
7 files changed, 492 insertions(+), 5 deletions(-) create mode
100644
ShellPkg/Library/UefiShellAcpiViewCommandLib/Arm/SbbrValidator.c
create mode 100644
ShellPkg/Library/UefiShellAcpiViewCommandLib/Arm/SbbrValidator.h

--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'



Re: [edk2-non-osi][PATCH 1/1] RPi: delete device tree binaries

Pete Batard
 

On 2020.04.30 22:18, Andrei Warkentin wrote:
These are unnecessary, because we've ripped out FdtDxe logic
to use internal devicetree. We are mandating that devicetree
must come from the VideoCore firmware (driven by config.txt)
[ this must be applied only after the FdtDxe patch removing support
for embedding DTs in UEFI ]
Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
---
Platform/RaspberryPi/RPi3/DeviceTree/License.txt | 340 --------------------
Platform/RaspberryPi/RPi3/DeviceTree/Readme.md | 14 -
Platform/RaspberryPi/RPi3/DeviceTree/bcm2710-rpi-3-b-plus.dtb | Bin 27082 -> 0 bytes
Platform/RaspberryPi/RPi3/DeviceTree/bcm2710-rpi-3-b.dtb | Bin 26463 -> 0 bytes
Platform/RaspberryPi/RPi4/DeviceTree/License.txt | 340 --------------------
Platform/RaspberryPi/RPi4/DeviceTree/Readme.md | 13 -
Platform/RaspberryPi/RPi4/DeviceTree/bcm2711-rpi-4-b.dtb | Bin 40697 -> 0 bytes
7 files changed, 707 deletions(-)
diff --git a/Platform/RaspberryPi/RPi3/DeviceTree/License.txt b/Platform/RaspberryPi/RPi3/DeviceTree/License.txt
deleted file mode 100644
index 1603937..0000000
--- a/Platform/RaspberryPi/RPi3/DeviceTree/License.txt
+++ /dev/null
@@ -1,340 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/Platform/RaspberryPi/RPi3/DeviceTree/Readme.md b/Platform/RaspberryPi/RPi3/DeviceTree/Readme.md
deleted file mode 100644
index 708c2d1..0000000
--- a/Platform/RaspberryPi/RPi3/DeviceTree/Readme.md
+++ /dev/null
@@ -1,14 +0,0 @@
-Device Tree for Raspberry Pi 3
-==============================
-
-This directory contains a copy of the official Device Trees for the
-Raspberry Pi 3 as published by the Raspberry Pi Foundation at
-https://github.com/raspberrypi/firmware/tree/master/boot.
-
-Especially, the dtbs found in this directory are an exact copy of
-the ones updated by the Raspberry Pi Foundation on 2019.06.24 with
-commit `64b5649a41b69d09bfe0ed05448d28a66be3edfd`.
-
-As per [the Foundation's Readme](https://github.com/raspberrypi/firmware/blob/64b5649a41b69d09bfe0ed05448d28a66be3edfd/README.md),
-because the dtbs are built from Linux kernel sources, the license
-that applies to them is the GPLv2.
diff --git a/Platform/RaspberryPi/RPi3/DeviceTree/bcm2710-rpi-3-b-plus.dtb b/Platform/RaspberryPi/RPi3/DeviceTree/bcm2710-rpi-3-b-plus.dtb
deleted file mode 100644
index bdc7e43f05cfe1f2d4001627672783f06ed9a155..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 27082
zcmd5_eT*bWb?@2T+q*r-;jquxI0nz%9=^lA_Rh@i-t8G2HW18*F*(cy3<Tz8XL@(X
zHy`ck*^hIQ%_$L}NJN1s5D-MMNF)*|C;<@?DM-1<N&c`Dh=LMD5kmaKM}i`ehzKGA
z<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%-ZRG$Rq#TNzJtrnM}>l_U+jFG2={|{mJ
B18)ET
diff --git a/Platform/RaspberryPi/RPi3/DeviceTree/bcm2710-rpi-3-b.dtb b/Platform/RaspberryPi/RPi3/DeviceTree/bcm2710-rpi-3-b.dtb
deleted file mode 100644
index fb80a70a1847116d9ac7ac6a5cdb1716df19bb93..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 26463
zcmdU24~%3<S${o$c6Wfo<=EpEJYjZcxm}KZH{CrmyR#=JBmd-p)Ad;70HL?%_1l@g
z?LY7O^~~%ZxVMogCL#ee2m#}X2_zCVpgA!Rv*sWsMA3jTk{Bc=0tp&1!9OG*{(fK8
zSFhgd*WGh>c!@80{i?qD>Z|Yj>Z`Bn)vK!ho16aUUxQ$)5d^`jgW#?2#`6^JXW>4K
z8`r{@0e^)F>#t4HsCiawbQaGgh6l|w*^CE+t4aIxO4#kU;!e03Y!0IC>CLEHUtc*Z
zIf#EN?x)|U_>1S;iz|!wGQ;A_9L^j<<csAn597xR@tTcSnw@qtjZ;Jg_ZB?wUQYYb
zavBfX&CbTzxL#YUu2zYFi}Z-|$^uTcR;~ItPY2Gug45h-wfl&fyf@?ddJDf|iEBpE
zX1+HX+Wnng3o(;#9?!QDE|82?Q*c||CTLZwXB`uywS+sC^mcCu_3k9YFzWY)gMOzI
z4<y58-4;%K>h=M_-)jz|?N)yaIF!r7A^)l140<McRg*<G&q4Y_lHP5$JDYvVSgmfZ
zuUqA?oM+?yMZwuh+I=8^2_?dG>i1oep4CB7zvScBOgY_1NRSACxJZNPzcD5KLz3RE
zr;>kVB>!(29+I}C=j9~*kJ|jE{Iy(u%J6ZMf2<vm#_#)Oz|ed>G5u48^r#@?pGbOF
zbU+Dw9UMXa&uDs&6`o<Jj&4YLyG|L_Vdj2*mjC%&dR|7Re?iiB(oN()x1KNm0Mfs>
z+=*M#x=g(s0_@9@=h7yE&Sw5jV8iWr(6x;&U!OMt_p5@_ywXnM!6jzKMLAC3{`v?X
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YSdKbni_3%5~d(XNKxK9_6T7Z|l
zDt~GLw}fT*^+0wQ>ChqIW)N;P$X+ODCs;a<aY%0vXs60G(OiG5!)!CAHmf#eJnR<R
z;l!Z^m!R><!3%B<Ol2U7A25~dfW2g=&Yu-^O5k3cQLx);@f&S}!wrTpw3G1v0$$B(
AzW@LL
diff --git a/Platform/RaspberryPi/RPi4/DeviceTree/License.txt b/Platform/RaspberryPi/RPi4/DeviceTree/License.txt
deleted file mode 100644
index 1603937..0000000
--- a/Platform/RaspberryPi/RPi4/DeviceTree/License.txt
+++ /dev/null
@@ -1,340 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/Platform/RaspberryPi/RPi4/DeviceTree/Readme.md b/Platform/RaspberryPi/RPi4/DeviceTree/Readme.md
deleted file mode 100644
index 923dd1a..0000000
--- a/Platform/RaspberryPi/RPi4/DeviceTree/Readme.md
+++ /dev/null
@@ -1,13 +0,0 @@
-Device Tree for Raspberry Pi 4
-==============================
-
-This directory contains a copy of the official Device Tree for the
-Raspberry Pi 4 as published by the Raspberry Pi Foundation at
-https://github.com/raspberrypi/firmware/tree/master/boot.
-
-Especially, the dtb found in this directory is an exact copy of
-the one updated by the Raspberry Pi Foundation with commit
-`601d36df3aa541560e4cf9b571105d20db2b4b7c`.
-
-As per [the Foundation's Readme](https://github.com/raspberrypi/firmware/blob/master/README.md),
-the license that applies to these files is the GPLv2.
diff --git a/Platform/RaspberryPi/RPi4/DeviceTree/bcm2711-rpi-4-b.dtb b/Platform/RaspberryPi/RPi4/DeviceTree/bcm2711-rpi-4-b.dtb
deleted file mode 100644
index 8b7b1f58bf2ed4fcb12da5fcde6814927816764e..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 40697
zcmdUY3zS?}b>%B{OR_#K6iYbf7uu3+%UI>E>W|bi7}~@i405d41{=qwTwPUa73%u9
zs=8YuwxSRRoJk0VI2kkH&rBfXGXz3n4>J>!KoS;N44zrblgun<m|0n~V3<$Vn#oK^
z2%f#qz30C3K2_ba2_|o?S9R~X=k9yXx#xb~d-vV<)rs%?k0|=!x1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e5;A0e2N~qq@Bju8
zf3sLZhTA{L0Qqp>M&<h=5%S;7L&%qhkS_uukBX27!jxWHxPF^ZZ`V_GkISG3X3*bE
zXV4eIpf80%UyNLKczC%9j4KlPM@JJr%LD%lVZ7Xhk(Qq_p(958)Pa0r0QVY85q`=M
zch8Rbrz6>XnOpb9x7#9YdAsVo!25z!sp}V{mztp%v;2`L8UwmU>HMeJ>*0kj%+=aG
z>=hCACW>$yBx;=QvaWH-!97;wrbD=6fX~2HI@lwE|GezMiMa`fA{mb$es`tJpK1Qg
zM0`t{m)x8JRnUXrb+Z8{Hu8QOx*&P)%)RU5M|(&qV|s*T*j(Q(3%nV|Wu=5Mbudf6
F|3CdZd9wfj
For some reason, this patch doesn't apply cleanly on my repo...

But for the whole removal of Platform\RaspberryPi\RPi[3|4]\DeviceTree:
Reviewed-by: Pete Batard <pete@akeo.ie>


Re: [edk2-platforms][PATCH 2/2] RPi: remove any mention of an "internal DTB"

Pete Batard
 

On 2020.04.30 22:16, Andrei Warkentin wrote:
For Pi 3 and Pi 4, since the relevant functionality is gone from FdtDxe.
Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
---
Platform/RaspberryPi/RPi3/Readme.md | 3 +--
Platform/RaspberryPi/RPi4/Readme.md | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/Platform/RaspberryPi/RPi3/Readme.md b/Platform/RaspberryPi/RPi3/Readme.md
index f19d59d8..66f52bee 100644
--- a/Platform/RaspberryPi/RPi3/Readme.md
+++ b/Platform/RaspberryPi/RPi3/Readme.md
@@ -125,8 +125,7 @@ Note: the address range **must** be `[0x1f0000:0x200000]`. `dtoverlay` and `dtpa
This firmware will honor the command line passed by the GPU via `cmdline.txt`.
Note, that the ultimate contents of `/chosen/bootargs` are a combination of several pieces:
-- Original `/chosen/bootargs` if using the internal DTB. Seems to be completely discarded by GPU when booting with a custom device tree.
-- GPU-passed hardware configuration. This one is always present.
+- GPU-passed hardware configuration.
- Additional boot options passed via `cmdline.txt`.
# Limitations
diff --git a/Platform/RaspberryPi/RPi4/Readme.md b/Platform/RaspberryPi/RPi4/Readme.md
index 62a63c4c..03eb6c39 100644
--- a/Platform/RaspberryPi/RPi4/Readme.md
+++ b/Platform/RaspberryPi/RPi4/Readme.md
@@ -103,8 +103,7 @@ Note: the address range **must** be `[0x1f0000:0x200000]`. `dtoverlay` and `dtpa
This firmware will honor the command line passed by the GPU via `cmdline.txt`.
Note, that the ultimate contents of `/chosen/bootargs` are a combination of several pieces:
-- Original `/chosen/bootargs` if using the internal DTB. Seems to be completely discarded by GPU when booting with a custom device tree.
-- GPU-passed hardware configuration. This one is always present.
+- GPU-passed hardware configuration.
- Additional boot options passed via `cmdline.txt`.
# Limitations
Reviewed-by: Pete Batard <pete@akeo.ie>


Re: [edk2-platforms][PATCH 1/2] RPi: rip out FdtDxe logic to use internal DTB

Pete Batard
 

Two non-blocking minor remarks inline:

On 2020.04.30 22:16, Andrei Warkentin wrote:
Initially, FdtDxe used an internal (embedded in UEFI) FDT,
because it was neither understood how to consume the
one loaded by the VideoCore firmware, nor understood just
how important it is to use the DTB provided by config.txt.
Embedding the DT was a bad idea, because:
- Permanently stale
- No overlays
Also, on devices like the Pi 4 you _have_ to have a DT
around for the start4 VPU firmware to pick up, otherwise
the board is left in an inconsistent state. So we're being
proscriptive now about DT use with config.txt, which means
this internal DT logic is deadc code.
Further FdtDxe cleanups are possible and will be handled
separately, specifically:
- probably no need to use a separate allocation for patched DT (optimize memory used)
- suspicious use of EfiBootServicesData (I filed https://github.com/ARM-software/ebbr/issues/45 to sort out the real requirements)
Testing: Booted Ubuntu 18.04 on Pi 2B (1.2).
Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
---
Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c | 206 ++++----------------
Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.inf | 4 -
Platform/RaspberryPi/RPi3/RPi3.fdf | 11 --
Platform/RaspberryPi/RPi4/RPi4.fdf | 8 -
Platform/RaspberryPi/RaspberryPi.dec | 7 -
5 files changed, 38 insertions(+), 198 deletions(-)
diff --git a/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c b/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c
index e7143f57..187b9566 100644
--- a/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c
+++ b/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c
@@ -335,90 +335,6 @@ CleanSimpleFramebuffer (
return EFI_SUCCESS;
}
-#define MAX_CMDLINE_SIZE 512
-
-STATIC
-EFI_STATUS
-UpdateBootArgs (
- VOID
- )
-{
- INTN Node;
- INTN Retval;
- EFI_STATUS Status;
- CHAR8 *CommandLine;
-
- //
- // Locate the /chosen node
- //
- Node = fdt_path_offset (mFdtImage, "/chosen");
- if (Node < 0) {
- DEBUG ((DEBUG_ERROR, "%a: failed to locate /chosen node\n", __FUNCTION__));
- return EFI_NOT_FOUND;
- }
-
- //
- // If /chosen/bootargs already exists, we want to add a space character
- // before adding the firmware supplied arguments. However, the RpiFirmware
- // protocol expects a 32-bit aligned buffer. So let's allocate 4 bytes of
- // slack, and skip the first 3 when passing this buffer into libfdt.
- //
- CommandLine = AllocatePool (MAX_CMDLINE_SIZE) + 4;
- if (!CommandLine) {
- DEBUG ((DEBUG_ERROR, "%a: failed to allocate memory\n", __FUNCTION__));
- return EFI_OUT_OF_RESOURCES;
- }
-
- //
- // Get the command line from the firmware
- //
- Status = mFwProtocol->GetCommandLine (MAX_CMDLINE_SIZE, CommandLine + 4);
- if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: failed to retrieve command line\n", __FUNCTION__));
- return Status;
- }
-
- if (AsciiStrLen (CommandLine + 4) == 0) {
- DEBUG ((DEBUG_INFO, "%a: empty command line received\n", __FUNCTION__));
- return EFI_SUCCESS;
- }
-
- CommandLine[3] = ' ';
-
- Retval = fdt_appendprop_string (mFdtImage, Node, "bootargs", &CommandLine[3]);
- if (Retval != 0) {
- DEBUG ((DEBUG_ERROR, "%a: failed to set /chosen/bootargs property (%d)\n",
- __FUNCTION__, Retval));
- }
-
- DEBUG_CODE_BEGIN ();
- CONST CHAR8 *Prop;
- INT32 Length;
- INT32 Index;
-
- Node = fdt_path_offset (mFdtImage, "/chosen");
- ASSERT (Node >= 0);
-
- Prop = fdt_getprop (mFdtImage, Node, "bootargs", &Length);
- ASSERT (Prop != NULL);
-
- DEBUG ((DEBUG_INFO, "Command line set from firmware (length %d):\n'", Length));
-
- for (Index = 0; Index < Length; Index++, Prop++) {
- if (*Prop == '\0') {
- continue;
- }
- DEBUG ((DEBUG_INFO, "%c", *Prop));
- }
-
- DEBUG ((DEBUG_INFO, "'\n"));
- DEBUG_CODE_END ();
-
- FreePool (CommandLine - 4);
- return EFI_SUCCESS;
-}
-
-
/**
@param ImageHandle of the loaded driver
@param SystemTable Pointer to the System Table
@@ -435,13 +351,10 @@ FdtDxeInitialize (
IN EFI_SYSTEM_TABLE *SystemTable
)
{
+ INT32 Retval;
EFI_STATUS Status;
- EFI_GUID *FdtGuid;
- VOID *FdtImage;
UINTN FdtSize;
- INT32 Retval;
- UINT32 BoardRevision;
- BOOLEAN Internal;
+ VOID *FdtImage = NULL;
I don't believe the NULL assignation is needed...

if (PcdGet32 (PcdOptDeviceTree) == 0) {
DEBUG ((DEBUG_INFO, "Device Tree disabled per user configuration\n"));
@@ -450,77 +363,28 @@ FdtDxeInitialize (
Status = gBS->LocateProtocol (&gRaspberryPiFirmwareProtocolGuid, NULL,
(VOID**)&mFwProtocol);
- ASSERT_EFI_ERROR (Status);
+ if (mFwProtocol == NULL) {
+ /*
+ * Impossible because of the depex...
+ */
+ ASSERT_EFI_ERROR (Status);
+ return EFI_NOT_FOUND;
+ }
- Internal = FALSE;
FdtImage = (VOID*)(UINTN)PcdGet32 (PcdFdtBaseAddress);
...since no code actually uses that variable before we assign it here. But I don't see a problem keeping it.

Retval = fdt_check_header (FdtImage);
- if (Retval == 0) {
- /*
- * Have FDT passed via config.txt.
- */
- FdtSize = fdt_totalsize (FdtImage);
- DEBUG ((DEBUG_INFO, "Device Tree passed via config.txt (0x%lx bytes)\n", FdtSize));
- Status = EFI_SUCCESS;
- } else {
- /*
- * Use one of the embedded FDT's.
- */
- Internal = TRUE;
- DEBUG ((DEBUG_INFO, "No/Bad Device Tree found at address 0x%p (%a), "
- "looking up internal one...\n", FdtImage, fdt_strerror (Retval)));
+ if (Retval != 0) {
/*
- * Query the board revision to differentiate between models.
+ * Any one of:
+ * - Invalid config.txt device_tree_address (not PcdFdtBaseAddress)
+ * - Missing FDT for your Pi variant (if not overriding via device_tree=)
*/
- Status = mFwProtocol->GetModelRevision (&BoardRevision);
- if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "Failed to get board type: %r\n", Status));
- DEBUG ((DEBUG_INFO, "Using default internal Device Tree\n"));
- FdtGuid = &gRaspberryPiDefaultFdtGuid;
- } else {
- // www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md
- switch ((BoardRevision >> 4) & 0xFF) {
- case 0x08:
- DEBUG ((DEBUG_INFO, "Using Raspberry Pi 3 Model B internal Device Tree\n"));
- FdtGuid = &gRaspberryPi3ModelBFdtGuid;
- break;
- case 0x0D:
- DEBUG ((DEBUG_INFO, "Using Raspberry Pi 3 Model B+ internal Device Tree\n"));
- FdtGuid = &gRaspberryPi3ModelBPlusFdtGuid;
- break;
- case 0x11:
- DEBUG ((DEBUG_INFO, "Using Raspberry Pi 4 Model B internal Device Tree\n"));
- FdtGuid = &gRaspberryPi4ModelBFdtGuid;
- break;
- default:
- DEBUG ((DEBUG_INFO, "Using default internal Device Tree\n"));
- FdtGuid = &gRaspberryPiDefaultFdtGuid;
- break;
- }
- }
- do {
- Status = GetSectionFromAnyFv (FdtGuid, EFI_SECTION_RAW, 0, &FdtImage, &FdtSize);
- if (Status == EFI_SUCCESS) {
- if (fdt_check_header (FdtImage) != 0) {
- Status = EFI_INCOMPATIBLE_VERSION;
- }
- }
- // No retry needed if we are successful or are dealing with the default Fdt.
- if ( (Status == EFI_SUCCESS) ||
- (CompareGuid (FdtGuid, &gRaspberryPiDefaultFdtGuid)) )
- break;
- // Otherwise, try one more time with the default Fdt. An example of this
- // is if we detected a non-default Fdt, that isn't included in the FDF.
- DEBUG ((DEBUG_INFO, "Internal Device Tree was not found for this platform, "
- "falling back to default...\n"));
- FdtGuid = &gRaspberryPiDefaultFdtGuid;
- } while (1);
+ DEBUG ((DEBUG_ERROR, "No devicetree passed via config.txt\n"));
+ return EFI_NOT_FOUND;
}
- if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "Failed to locate Device Tree: %r\n", Status));
- return Status;
- }
+ FdtSize = fdt_totalsize (FdtImage);
+ DEBUG ((DEBUG_INFO, "Devicetree passed via config.txt (0x%lx bytes)\n", FdtSize));
If we're going to modify that line, maybe we want to switch to using '%ld' instead of '0x%lx' as hex sizes aren't enormously helpful when dealing with user-handled files.

But that's not something I want to respin this patch for, especially for debug output, so 0x%lx is fine too.

/*
* Probably overkill.
@@ -529,12 +393,19 @@ FdtDxeInitialize (
Status = gBS->AllocatePages (AllocateAnyPages, EfiBootServicesData,
EFI_SIZE_TO_PAGES (FdtSize), (EFI_PHYSICAL_ADDRESS*)&mFdtImage);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "Failed to allocate Device Tree: %r\n", Status));
- return Status;
+ DEBUG ((DEBUG_ERROR, "Failed to allocate devicetree: %r\n", Status));
+ goto out;
}
Retval = fdt_open_into (FdtImage, mFdtImage, FdtSize);
- ASSERT (Retval == 0);
+ if (Retval != 0) {
+ DEBUG ((DEBUG_ERROR, "fdt_open_into failed: %d\n", Retval));
+ goto out;
+ }
+
+ /*
+ * These are all best-effort.
+ */
Status = SanitizePSCI ();
if (EFI_ERROR (Status)) {
@@ -566,19 +437,18 @@ FdtDxeInitialize (
Print (L"Failed to update USB compatible properties: %r\n", Status);
}
- if (Internal) {
- /*
- * A GPU-provided DTB already has the full command line.
- */
- Status = UpdateBootArgs ();
- if (EFI_ERROR (Status)) {
- Print (L"Failed to update boot arguments: %r\n", Status);
- }
- }
-
- DEBUG ((DEBUG_INFO, "Installed Device Tree at address 0x%p\n", mFdtImage));
+ DEBUG ((DEBUG_INFO, "Installed devicetree at address %p\n", mFdtImage));
Status = gBS->InstallConfigurationTable (&gFdtTableGuid, mFdtImage);
- ASSERT_EFI_ERROR (Status);
+ if (EFI_ERROR (Status)) {
+ DEBUG ((DEBUG_ERROR, "Couldn't register devicetree: %r\n", Status));
+ goto out;
+ }
+out:
+ if (EFI_ERROR(Status)) {
+ if (mFdtImage != NULL) {
+ gBS->FreePages ((EFI_PHYSICAL_ADDRESS) mFdtImage, EFI_SIZE_TO_PAGES (FdtSize));
+ }
+ }
return Status;
}
diff --git a/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.inf b/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.inf
index fc37353f..49ba5ba1 100644
--- a/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.inf
+++ b/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.inf
@@ -35,10 +35,6 @@
[Guids]
gFdtTableGuid
- gRaspberryPi3ModelBFdtGuid
- gRaspberryPi3ModelBPlusFdtGuid
- gRaspberryPi4ModelBFdtGuid
- gRaspberryPiDefaultFdtGuid
[Protocols]
gRaspberryPiFirmwareProtocolGuid ## CONSUMES
diff --git a/Platform/RaspberryPi/RPi3/RPi3.fdf b/Platform/RaspberryPi/RPi3/RPi3.fdf
index daedc443..e854cd21 100644
--- a/Platform/RaspberryPi/RPi3/RPi3.fdf
+++ b/Platform/RaspberryPi/RPi3/RPi3.fdf
@@ -303,17 +303,6 @@ READ_LOCK_STATUS = TRUE
#
INF Platform/RaspberryPi/Drivers/LogoDxe/LogoDxe.inf
- #
- # Device Tree support (used by FdtDxe)
- # GUIDs should match gRaspberryPi#####FdtGuid's from the .dec
- #
- FILE FREEFORM = DF5DA223-1D27-47C3-8D1B-9A41B55A18BC {
- SECTION RAW = Platform/RaspberryPi/$(PLATFORM_NAME)/DeviceTree/bcm2710-rpi-3-b.dtb
- }
- FILE FREEFORM = 3D523012-73FE-40E5-892E-1A4DF60F3C0C {
- SECTION RAW = Platform/RaspberryPi/$(PLATFORM_NAME)/DeviceTree/bcm2710-rpi-3-b-plus.dtb
- }
-
[FV.FVMAIN_COMPACT]
FvAlignment = 16
ERASE_POLARITY = 1
diff --git a/Platform/RaspberryPi/RPi4/RPi4.fdf b/Platform/RaspberryPi/RPi4/RPi4.fdf
index c3e9cfc4..b1f7aa23 100644
--- a/Platform/RaspberryPi/RPi4/RPi4.fdf
+++ b/Platform/RaspberryPi/RPi4/RPi4.fdf
@@ -307,14 +307,6 @@ READ_LOCK_STATUS = TRUE
#
INF Platform/RaspberryPi/Drivers/LogoDxe/LogoDxe.inf
- #
- # Device Tree support (used by FdtDxe)
- # GUIDs should match gRaspberryPi#####FdtGuid's from the .dec
- #
- FILE FREEFORM = 80AB6833-CAE4-4CEE-B59D-EB2039B05551 {
- SECTION RAW = Platform/RaspberryPi/$(PLATFORM_NAME)/DeviceTree/bcm2711-rpi-4-b.dtb
- }
-
[FV.FVMAIN_COMPACT]
FvAlignment = 16
ERASE_POLARITY = 1
diff --git a/Platform/RaspberryPi/RaspberryPi.dec b/Platform/RaspberryPi/RaspberryPi.dec
index b66322be..66ef6186 100644
--- a/Platform/RaspberryPi/RaspberryPi.dec
+++ b/Platform/RaspberryPi/RaspberryPi.dec
@@ -26,13 +26,6 @@
gRaspberryPiTokenSpaceGuid = {0xCD7CC258, 0x31DB, 0x11E6, {0x9F, 0xD3, 0x63, 0xB0, 0xB8, 0xEE, 0xD6, 0xB5}}
gRaspberryPiEventResetGuid = {0xCD7CC258, 0x31DB, 0x11E6, {0x9F, 0xD3, 0x63, 0xB4, 0xB4, 0xE4, 0xD4, 0xB4}}
gConfigDxeFormSetGuid = {0xCD7CC258, 0x31DB, 0x22E6, {0x9F, 0x22, 0x63, 0xB0, 0xB8, 0xEE, 0xD6, 0xB5}}
- # GUIDs used by FdtDxe to serve a Device Tree at runtime. Not all of these need to apply
- # to the current platform or match an actual FDF binary, but they need to be defined.
- gRaspberryPi3ModelBFdtGuid = { 0xDF5DA223, 0x1D27, 0x47C3, { 0x8D, 0x1B, 0x9A, 0x41, 0xB5, 0x5A, 0x18, 0xBC } }
- gRaspberryPi3ModelBPlusFdtGuid = { 0x3D523012, 0x73FE, 0x40E5, { 0x89, 0x2E, 0x1A, 0x4D, 0xF6, 0x0F, 0x3C, 0x0C } }
- gRaspberryPi4ModelBFdtGuid = { 0x80AB6833, 0xCAE4, 0x4CEE, { 0xB5, 0x9D, 0xEB, 0x20, 0x39, 0xB0, 0x55, 0x51 } }
- # Default Fdt to serve if the hardware model can't be detected. Should match one of the above.
- gRaspberryPiDefaultFdtGuid = {0xDF5DA223, 0x1D27, 0x47C3, { 0x8D, 0x1B, 0x9A, 0x41, 0xB5, 0x5A, 0x18, 0xBC}}
[PcdsFixedAtBuild.common]
#
Reviewed-by: Pete Batard <pete@akeo.ie>
Tested-on: Pi 3B, Pi 3B+, Pi 4B, with and without a Device Tree provided


Re: [edk2-platforms][PATCH 1/1] RPi3: minor doc fix

Ard Biesheuvel
 

On 5/1/20 12:29 PM, Pete Batard wrote:
On 2020.05.01 11:27, Ard Biesheuvel wrote:
On 5/1/20 11:43 AM, Pete Batard wrote:
On 2020.04.30 20:24, Andrei Warkentin wrote:
Matches the new reality around FDT support (edk2-platform patches).

Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
---
  Platform/RaspberryPi/RPi3/TrustedFirmware/Readme.md | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Platform/RaspberryPi/RPi3/TrustedFirmware/Readme.md b/Platform/RaspberryPi/RPi3/TrustedFirmware/Readme.md
index 326f5f9..aafbbe9 100644
--- a/Platform/RaspberryPi/RPi3/TrustedFirmware/Readme.md
+++ b/Platform/RaspberryPi/RPi3/TrustedFirmware/Readme.md
@@ -20,13 +20,15 @@ which results in the following memory mapping:
      0x00000000 +-----------------+
                 |       ROM       | BL1
      0x00010000 +-----------------+
-               |       DTB       | (Loaded by the VideoCore)
+               |     Nothing     |
      0x00020000 +-----------------+
                 |       FIP       |
      0x00030000 +-----------------+
                 |                 |
                 |  UEFI PAYLOAD   |
                 |                 |
+    0x001f0000 +-----------------+
+               |       DTB       | (Loaded by the VideoCore)
      0x00200000 +-----------------+
                 |   Secure SRAM   | BL2, BL31
      0x00300000 +-----------------+
Reviewed-by: Pete Batard <pete@akeo.ie>
Thanks, but that file does not exist in edk2-platforms.
Apologies, that's a non-osi patch.
The [edk2-platforms] header should have been [edk2-non-osi].
Ah, that explains it

Pushed as 96ec764b947c..4703c83d7312

Thanks,


Re: [edk2-platforms][PATCH 0/2] Fixing FDT handling on Pi 3

Ard Biesheuvel
 

On 4/30/20 9:18 PM, Andrei Warkentin wrote:
Dear all,
This patch set finishes what I started with the Pi 4 fix for
the regression seen with newer VideoCore firmware, where a
device tree passed via config.txt would not be detected by UEFI.
This makes VPU-passed FDT work again on Pi 3 variants. This also
cleans up the docs around correctly using FDT, hopefully solving
some of the frustrations seem around using this correctly.
Andrei Warkentin (2):
RPi3/RPi4: fix RPi 3 VPU-passed FDT handling by unifying with RPi4
implementation
RPi: update Pi3 and Pi4 readmes with correct info on FDT handling
Pushed as 40f2f135eb7c..defef0562115 (with the typos fixed)

Thanks!