* [edk2-platforms PATCH v2 1/6] BeagleBoardPkg: Remove the configuration and image headers from flash
2021-09-28 19:33 [edk2-platforms PATCH v2 0/6] Some BeagleBoardPkg fixes Rebecca Cran
@ 2021-09-28 19:33 ` Rebecca Cran
2021-09-28 19:33 ` [edk2-platforms PATCH v2 2/6] BeagleBoardPkg: Remove PerformanceLib from build Rebecca Cran
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Rebecca Cran @ 2021-09-28 19:33 UTC (permalink / raw)
To: devel, Leif Lindholm, Ard Biesheuvel; +Cc: Rebecca Cran
Remove the configuration and image headers from the flash image.
This was likely intended for the UEFI firmware to be loaded by the ROM
code, but the BeagleBoard only has 64KB SRAM and so EDK2 needs to be
executed as a second stage loader.
Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
---
Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf b/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf
index a2cfeb3bc27b..dbae015ff382 100644
--- a/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf
+++ b/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf
@@ -23,7 +23,7 @@
[FD.BeagleBoard_EFI]
-BaseAddress = 0x80007DF8|gArmTokenSpaceGuid.PcdFdBaseAddress #The base address of the FLASH Device.
+BaseAddress = 0x80008000|gArmTokenSpaceGuid.PcdFdBaseAddress #The base address of the FLASH Device.
Size = 0x000B0000|gArmTokenSpaceGuid.PcdFdSize #The size in bytes of the FLASH Device
ErasePolarity = 1
BlockSize = 0x1
@@ -44,16 +44,7 @@ NumBlocks = 0xB0000
# RegionType <FV, DATA, or FILE>
#
################################################################################
-0x00000000|0x00000200
-FILE = Platform/BeagleBoard/BeagleBoardPkg/ConfigurationHeader.bin
-
-0x00000200|0x00000008
-DATA = {
- 0xF8, 0xFD, 0x0A, 0x00, # image size: 0xB0000 - 0x208 == 0xAFDF8
- 0x00, 0x80, 0x00, 0x80 # entry point: 0x80008000
-}
-
-0x00000208|0x000AFDF8
+0x00000000|0x000B0000
gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
FV = FVMAIN_COMPACT
--
2.31.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [edk2-platforms PATCH v2 2/6] BeagleBoardPkg: Remove PerformanceLib from build
2021-09-28 19:33 [edk2-platforms PATCH v2 0/6] Some BeagleBoardPkg fixes Rebecca Cran
2021-09-28 19:33 ` [edk2-platforms PATCH v2 1/6] BeagleBoardPkg: Remove the configuration and image headers from flash Rebecca Cran
@ 2021-09-28 19:33 ` Rebecca Cran
2021-09-28 19:33 ` [edk2-platforms PATCH v2 3/6] BeagleBoardPkg: Align PE sections to 4K Rebecca Cran
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Rebecca Cran @ 2021-09-28 19:33 UTC (permalink / raw)
To: devel, Leif Lindholm, Ard Biesheuvel; +Cc: Rebecca Cran
PerformanceLib is related to building the ACPI Firmware Performance
Data Table (FPDT). Since BeagleBoardPkg targets 32-bit ARM systems
where ACPI isn't relevant, remove it.
Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
---
Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc | 3 ---
1 file changed, 3 deletions(-)
diff --git a/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc b/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc
index 8a4b0ad8851e..596f1e09de05 100644
--- a/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc
+++ b/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc
@@ -169,9 +169,6 @@
# PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
PeCoffLib|Platform/BeagleBoard/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoffLib.inf
- PerformanceLib|MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.inf
-
-
[LibraryClasses.common.DXE_DRIVER]
DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
--
2.31.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [edk2-platforms PATCH v2 3/6] BeagleBoardPkg: Align PE sections to 4K
2021-09-28 19:33 [edk2-platforms PATCH v2 0/6] Some BeagleBoardPkg fixes Rebecca Cran
2021-09-28 19:33 ` [edk2-platforms PATCH v2 1/6] BeagleBoardPkg: Remove the configuration and image headers from flash Rebecca Cran
2021-09-28 19:33 ` [edk2-platforms PATCH v2 2/6] BeagleBoardPkg: Remove PerformanceLib from build Rebecca Cran
@ 2021-09-28 19:33 ` Rebecca Cran
2021-09-28 19:33 ` [edk2-platforms PATCH v2 4/6] Omap35xxPkg: InterruptDxe: add gEfiCpuArchProtocolGuid runtime dependency Rebecca Cran
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Rebecca Cran @ 2021-09-28 19:33 UTC (permalink / raw)
To: devel, Leif Lindholm, Ard Biesheuvel; +Cc: Rebecca Cran
Add build options to BeagleBoardPkg.dsc to align PE sections to 4K.
This avoids warnings during boot when loading drivers.
Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
---
Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc b/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc
index 596f1e09de05..7df306045d12 100644
--- a/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc
+++ b/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc
@@ -212,6 +212,10 @@
*_*_*_CC_FLAGS = -DDISABLE_NEW_DEPRECATED_INTERFACES
+[BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
+ GCC: *_*_*_DLINK_FLAGS = -z common-page-size=0x1000
+ MSFT: *_*_*_DLINK_FLAGS = /ALIGN:4096
+
################################################################################
#
# Pcd Section - list of all EDK II PCD Entries defined by this Platform
--
2.31.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [edk2-platforms PATCH v2 4/6] Omap35xxPkg: InterruptDxe: add gEfiCpuArchProtocolGuid runtime dependency
2021-09-28 19:33 [edk2-platforms PATCH v2 0/6] Some BeagleBoardPkg fixes Rebecca Cran
` (2 preceding siblings ...)
2021-09-28 19:33 ` [edk2-platforms PATCH v2 3/6] BeagleBoardPkg: Align PE sections to 4K Rebecca Cran
@ 2021-09-28 19:33 ` Rebecca Cran
2021-09-28 19:33 ` [edk2-platforms PATCH v2 5/6] Platform/BeagleBoard: bump Fv size to 768KB to fix NOOPT build Rebecca Cran
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Rebecca Cran @ 2021-09-28 19:33 UTC (permalink / raw)
To: devel, Leif Lindholm, Ard Biesheuvel; +Cc: Rebecca Cran
InterruptDxe requires gEfiCpuArchProtocolGuid: change the Depex line for
TexasInstruments/Omap35xxPkg/InterruptDxe so the driver that provides
gEfiCpuArchProtocolGuid is loaded before it.
Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
---
Silicon/TexasInstruments/Omap35xxPkg/InterruptDxe/InterruptDxe.inf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Silicon/TexasInstruments/Omap35xxPkg/InterruptDxe/InterruptDxe.inf b/Silicon/TexasInstruments/Omap35xxPkg/InterruptDxe/InterruptDxe.inf
index abc5b84c9375..3453ef1784d9 100644
--- a/Silicon/TexasInstruments/Omap35xxPkg/InterruptDxe/InterruptDxe.inf
+++ b/Silicon/TexasInstruments/Omap35xxPkg/InterruptDxe/InterruptDxe.inf
@@ -45,4 +45,4 @@
gEmbeddedTokenSpaceGuid.PcdInterruptBaseAddress
[Depex]
- TRUE
+ gEfiCpuArchProtocolGuid
--
2.31.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [edk2-platforms PATCH v2 5/6] Platform/BeagleBoard: bump Fv size to 768KB to fix NOOPT build
2021-09-28 19:33 [edk2-platforms PATCH v2 0/6] Some BeagleBoardPkg fixes Rebecca Cran
` (3 preceding siblings ...)
2021-09-28 19:33 ` [edk2-platforms PATCH v2 4/6] Omap35xxPkg: InterruptDxe: add gEfiCpuArchProtocolGuid runtime dependency Rebecca Cran
@ 2021-09-28 19:33 ` Rebecca Cran
2021-09-28 19:33 ` [edk2-platforms PATCH v2 6/6] Platform/BeagleBoard: Add Readme.rst Rebecca Cran
2021-09-30 13:57 ` [edk2-platforms PATCH v2 0/6] Some BeagleBoardPkg fixes Leif Lindholm
6 siblings, 0 replies; 8+ messages in thread
From: Rebecca Cran @ 2021-09-28 19:33 UTC (permalink / raw)
To: devel, Leif Lindholm, Ard Biesheuvel; +Cc: Rebecca Cran
The NOOPT build currently exceeds the Fv size of 704KB. Since we're
not restricted, bump it to 768KB.
Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
---
Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf b/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf
index dbae015ff382..74b1ce1d464f 100644
--- a/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf
+++ b/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf
@@ -24,10 +24,10 @@
[FD.BeagleBoard_EFI]
BaseAddress = 0x80008000|gArmTokenSpaceGuid.PcdFdBaseAddress #The base address of the FLASH Device.
-Size = 0x000B0000|gArmTokenSpaceGuid.PcdFdSize #The size in bytes of the FLASH Device
+Size = 0x000C0000|gArmTokenSpaceGuid.PcdFdSize #The size in bytes of the FLASH Device
ErasePolarity = 1
BlockSize = 0x1
-NumBlocks = 0xB0000
+NumBlocks = 0xC0000
################################################################################
#
@@ -44,7 +44,7 @@ NumBlocks = 0xB0000
# RegionType <FV, DATA, or FILE>
#
################################################################################
-0x00000000|0x000B0000
+0x00000000|0x000C0000
gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
FV = FVMAIN_COMPACT
--
2.31.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [edk2-platforms PATCH v2 6/6] Platform/BeagleBoard: Add Readme.rst
2021-09-28 19:33 [edk2-platforms PATCH v2 0/6] Some BeagleBoardPkg fixes Rebecca Cran
` (4 preceding siblings ...)
2021-09-28 19:33 ` [edk2-platforms PATCH v2 5/6] Platform/BeagleBoard: bump Fv size to 768KB to fix NOOPT build Rebecca Cran
@ 2021-09-28 19:33 ` Rebecca Cran
2021-09-30 13:57 ` [edk2-platforms PATCH v2 0/6] Some BeagleBoardPkg fixes Leif Lindholm
6 siblings, 0 replies; 8+ messages in thread
From: Rebecca Cran @ 2021-09-28 19:33 UTC (permalink / raw)
To: devel, Leif Lindholm, Ard Biesheuvel; +Cc: Rebecca Cran
Add a Readme.rst file to explain what this package is for, link to
additional information etc.
Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
---
Platform/BeagleBoard/BeagleBoardPkg/Readme.rst | 28 ++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/Platform/BeagleBoard/BeagleBoardPkg/Readme.rst b/Platform/BeagleBoard/BeagleBoardPkg/Readme.rst
new file mode 100644
index 000000000000..b97eb02eea66
--- /dev/null
+++ b/Platform/BeagleBoard/BeagleBoardPkg/Readme.rst
@@ -0,0 +1,28 @@
+==============
+BeagleBoardPkg
+==============
+
+This package provides support for the original OMAP3530-based BeagleBoard
+(https://beagleboard.org/beagleboard).
+
+Resources
+---------
+
+- BeagleBoard.org Support Page: https://elinux.org/Beagleboard:Main_Page#BeagleBoard
+- BeagleBoard Main Page: https://elinux.org/Beagleboard:BeagleBoard
+- BeagleBoard Community Page: https://elinux.org/BeagleBoard_Community
+- System Reference Manual: https://github.com/beagleboard/BeagleBoard/blob/master/BeagleBoard_revC5_SRM.pdf
+- OMAP35x Technical Reference Manual: https://www.ti.com/lit/ug/spruf98y/spruf98y.pdf
+- Schematics, BOM etc.: https://github.com/beagleboard/beagleboard
+
+Running
+-------
+
+Since the BeagleBoard only has 64KB SRAM and the ROM bootloader can load
+a maximum 128KB file, we use the `MLO` loader to load EDK2.
+BEAGLEBOARD_EFI.fd must be renamed to `u-boot.bin`.
+
+The programs in the Tools directory are for adding the Configuration Header
+that's needed for code to run via the ROM bootloader. They're kept for reference
+and are unused.
+
--
2.31.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [edk2-platforms PATCH v2 0/6] Some BeagleBoardPkg fixes
2021-09-28 19:33 [edk2-platforms PATCH v2 0/6] Some BeagleBoardPkg fixes Rebecca Cran
` (5 preceding siblings ...)
2021-09-28 19:33 ` [edk2-platforms PATCH v2 6/6] Platform/BeagleBoard: Add Readme.rst Rebecca Cran
@ 2021-09-30 13:57 ` Leif Lindholm
6 siblings, 0 replies; 8+ messages in thread
From: Leif Lindholm @ 2021-09-30 13:57 UTC (permalink / raw)
To: Rebecca Cran; +Cc: devel, Ard Biesheuvel
On Tue, Sep 28, 2021 at 13:33:14 -0600, Rebecca Cran wrote:
> Since we still have quite a lot of 32-bit ARM code in the tree, it
> would be nice to have a physical platform to verify that it still works
> correctly. I recently got one of the original BeagleBoard boards and
> have been working to get EDK2 booting on it again. These patches let it
> get further, though there are still problems to fix.
>
> Patch 3/4 isn't required, I just got irritated with the messages
> complaining about misaligned sections and decided to fix it.
>
> Changes from v1 to v2:
>
> Added patch to increase Fv size to 768KB, which allows the NOOPT build
> to succeed.
>
> Added patch to add Readme.rst which explains the ROM loader limitations
> and provides links to the SRM, TRM etc.
For the two new patches:
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
I dropped a trailing blank line in the Readme.rst and pushed the set
(with R-b:s for v1 added) as be67e47cc589..4f8730e6851a.
Thanks!
/
Leif
> Rebecca Cran (6):
> BeagleBoardPkg: Remove the configuration and image headers from flash
> BeagleBoardPkg: Remove PerformanceLib from build
> BeagleBoardPkg: Align PE sections to 4K
> Omap35xxPkg: InterruptDxe: add gEfiCpuArchProtocolGuid runtime
> dependency
> Platform/BeagleBoard: bump Fv size to 768KB to fix NOOPT build
> Platform/BeagleBoard: Add Readme.rst
>
> Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc | 7 ++---
> Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf | 17 +++---------
> Platform/BeagleBoard/BeagleBoardPkg/Readme.rst | 28 ++++++++++++++++++++
> Silicon/TexasInstruments/Omap35xxPkg/InterruptDxe/InterruptDxe.inf | 2 +-
> 4 files changed, 37 insertions(+), 17 deletions(-)
> create mode 100644 Platform/BeagleBoard/BeagleBoardPkg/Readme.rst
>
> --
> 2.31.1
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread