EmbeddedPkg/FdtPlatformDxe: Add 'setfdt' EFI Shell command

The 'setfdt' EFI Shell command allows to define a new FDT
as the prefered one for development purposes. It allows to
trigger the run of the FDT installation process as well.

Please refer to the README.txt file for more comprehensive
description.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ronald Cron <Ronald.Cron@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>




git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16934 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Ronald Cron
2015-02-25 19:34:07 +00:00
committed by oliviermartin
parent 158497a094
commit 3c1e53ce8f
5 changed files with 139 additions and 6 deletions

View File

@@ -15,7 +15,7 @@
The purpose of the FdtPlatformDxe UEFI driver is to install the Flat Device
Tree (FDT) of the platform the UEFI frimware is running on into the UEFI
Configuration Table. The FDT is identified within the UEFI Configuration
Table by the "gFdtTableGuid" GUID defined in EmbeddedPkg.dec.
Table by the "gFdtTableGuid" GUID defined in "EmbeddedPkg.dec".
Once installed, an UEFI application or OS boot loader can get from the UEFI
Configuration Table the FDT of the platform from the "gFdtTableGuid" GUID.
@@ -48,3 +48,25 @@ driver tries to install it using the device path defined by the UEFI variable
"Fdt". If the variable does not exist or the installation using the device path
defined by the UEFI variable fails then the installation proceeds as described
above.
Furthermore and again for development purposes only, if the feature PCD
"PcdOverridePlatformFdt" is equal to TRUE, the current driver provides the EFI
Shell command "setfdt" to define the location of the FDT by the mean of an EFI
Shell file path (like "fs2:\boot\fdt.dtb") or a device path.
If the path passed in to the command is a valid EFI Shell file path, the
command translates it into the corresponding device path and stores that
device path in the "Fdt" UEFI variable asking for the variable to be non
volatile.
If the path passed in to the command is not recognised as a valid EFI
Shell device path, the command handles it as device path and stored
in the "Fdt" UEFI variable as it is.
Finally, the "-i" option of the "setfdt" command allows to trigger the FDT
installation process. The installation process is completed when the command
returns. The command can be invoked with the "-i" option only and in that
case the "Fdt" UEFI variable is not updated and the command just runs the
FDT installation process. If the command is invoked with the "-i" option and
an EFI Shell file path then first the "Fdt" UEFI variable is updated accordingly
and then the FDT installation process is run.