[edk2] [PATCH edk2-platforms v3 0/2] Platform/ARM/Sgi: Enable Dynamic Configuration feature

Chandni Cherukuri posted 2 patches 5 years, 10 months ago
Failed in applying to current master (apply log)
Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c         |  30 +++++-
Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf       |   2 +
Platform/ARM/SgiPkg/Include/Ppi/SgiPlatformId.h               |  23 ++++
Platform/ARM/SgiPkg/Include/SgiPlatform.h                     |  13 +++
Platform/ARM/SgiPkg/Library/PlatformLib/AArch64/Helper.S      |  13 ++-
Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.c         |  10 ++
Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf       |   3 +
Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPei.inf |  40 +++++++
Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c  | 112 ++++++++++++++++++++
Platform/ARM/SgiPkg/SgiPlatform.dec                           |   5 +
Platform/ARM/SgiPkg/SgiPlatform.dsc                           |   1 +
Platform/ARM/SgiPkg/SgiPlatform.fdf                           |   1 +
12 files changed, 245 insertions(+), 8 deletions(-)
create mode 100644 Platform/ARM/SgiPkg/Include/Ppi/SgiPlatformId.h
create mode 100644 Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPei.inf
create mode 100644 Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c
[edk2] [PATCH edk2-platforms v3 0/2] Platform/ARM/Sgi: Enable Dynamic Configuration feature
Posted by Chandni Cherukuri 5 years, 10 months ago
Changes since v2:
- Addressed comments from Ard
- Depex on gHwConfigDtInfoPpiGuid 
- Use address of DT instead of pointer to the address of DT

Changes since v1:
- Addressed comments from Ard and Leif
- move definition of HwConfigDtBlob to PlatformLib.c
- use adr instead of ldr assembly instruction
- declare PPI in a PPI specific header file
- invert if conditional expression
- remove changes unrelated to the patch
- rename PEI files as per the standard

On SGI platforms, the trusted firmware executes prior to the SEC
phase. It supplies to the SEC phase, a pointer to a HW CONFIG fdt
in the x1 which contains platform specific information such as part
number and config number of the SGI platform. 

The HW CONFIG FDT would look as,
/dts-v1/;
/ {
        /* compatible string */
        compatible = "arm,sgi-isys3";

	/* platform ID node */
	system-id {
	     platform-id = <0x03000783>;
	}
};

In the very first step of the assembly code which executes in SEC phase
the fdt pointer is stored in a global variable from the register. A PPI 
is created during the SEC phase which stores the global variable.

During PEI phase, a Platform ID PEIM is installed which accessess the PPI
and retrieves the platform information using FDT helper functions and a
PlatformId HOB is created and populated with the information.
 
During DXE phase the drivers can access the Platform ID HOB to get the
platform information and perform platform specific functions based on the
platform.

Chandni Cherukuri (2):
  Platform/ARM/Sgi: Install a Platform ID HOB
  Platform/ARM/Sgi: Pick ACPI tables to install based on platform ID

 Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c         |  30 +++++-
 Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf       |   2 +
 Platform/ARM/SgiPkg/Include/Ppi/SgiPlatformId.h               |  23 ++++
 Platform/ARM/SgiPkg/Include/SgiPlatform.h                     |  13 +++
 Platform/ARM/SgiPkg/Library/PlatformLib/AArch64/Helper.S      |  13 ++-
 Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.c         |  10 ++
 Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf       |   3 +
 Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPei.inf |  40 +++++++
 Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c  | 112 ++++++++++++++++++++
 Platform/ARM/SgiPkg/SgiPlatform.dec                           |   5 +
 Platform/ARM/SgiPkg/SgiPlatform.dsc                           |   1 +
 Platform/ARM/SgiPkg/SgiPlatform.fdf                           |   1 +
 12 files changed, 245 insertions(+), 8 deletions(-)
 create mode 100644 Platform/ARM/SgiPkg/Include/Ppi/SgiPlatformId.h
 create mode 100644 Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPei.inf
 create mode 100644 Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c

-- 
2.7.4

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-platforms v3 0/2] Platform/ARM/Sgi: Enable Dynamic Configuration feature
Posted by Ard Biesheuvel 5 years, 10 months ago
On 18 June 2018 at 07:28, Chandni Cherukuri <chandni.cherukuri@arm.com> wrote:
> Changes since v2:
> - Addressed comments from Ard
> - Depex on gHwConfigDtInfoPpiGuid
> - Use address of DT instead of pointer to the address of DT
>
> Changes since v1:
> - Addressed comments from Ard and Leif
> - move definition of HwConfigDtBlob to PlatformLib.c
> - use adr instead of ldr assembly instruction
> - declare PPI in a PPI specific header file
> - invert if conditional expression
> - remove changes unrelated to the patch
> - rename PEI files as per the standard
>
> On SGI platforms, the trusted firmware executes prior to the SEC
> phase. It supplies to the SEC phase, a pointer to a HW CONFIG fdt
> in the x1 which contains platform specific information such as part
> number and config number of the SGI platform.
>
> The HW CONFIG FDT would look as,
> /dts-v1/;
> / {
>         /* compatible string */
>         compatible = "arm,sgi-isys3";
>
>         /* platform ID node */
>         system-id {
>              platform-id = <0x03000783>;
>         }
> };
>
> In the very first step of the assembly code which executes in SEC phase
> the fdt pointer is stored in a global variable from the register. A PPI
> is created during the SEC phase which stores the global variable.
>
> During PEI phase, a Platform ID PEIM is installed which accessess the PPI
> and retrieves the platform information using FDT helper functions and a
> PlatformId HOB is created and populated with the information.
>
> During DXE phase the drivers can access the Platform ID HOB to get the
> platform information and perform platform specific functions based on the
> platform.
>
> Chandni Cherukuri (2):
>   Platform/ARM/Sgi: Install a Platform ID HOB
>   Platform/ARM/Sgi: Pick ACPI tables to install based on platform ID
>

Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Pushed as f65939a9d98b..e93b4c776420

I did notice that there is a typo in the identifier 'gSgi575AcpiTablesiFileGuid'
Could you please send a patch to fix up all occurrences?

Thanks,
Ard.


>  Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c         |  30 +++++-
>  Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf       |   2 +
>  Platform/ARM/SgiPkg/Include/Ppi/SgiPlatformId.h               |  23 ++++
>  Platform/ARM/SgiPkg/Include/SgiPlatform.h                     |  13 +++
>  Platform/ARM/SgiPkg/Library/PlatformLib/AArch64/Helper.S      |  13 ++-
>  Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.c         |  10 ++
>  Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf       |   3 +
>  Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPei.inf |  40 +++++++
>  Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c  | 112 ++++++++++++++++++++
>  Platform/ARM/SgiPkg/SgiPlatform.dec                           |   5 +
>  Platform/ARM/SgiPkg/SgiPlatform.dsc                           |   1 +
>  Platform/ARM/SgiPkg/SgiPlatform.fdf                           |   1 +
>  12 files changed, 245 insertions(+), 8 deletions(-)
>  create mode 100644 Platform/ARM/SgiPkg/Include/Ppi/SgiPlatformId.h
>  create mode 100644 Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPei.inf
>  create mode 100644 Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c
>
> --
> 2.7.4
>
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-platforms v3 0/2] Platform/ARM/Sgi: Enable Dynamic Configuration feature
Posted by chandni cherukuri 5 years, 10 months ago
On Mon, Jun 18, 2018 at 3:14 PM, Ard Biesheuvel
<ard.biesheuvel@linaro.org> wrote:
> On 18 June 2018 at 07:28, Chandni Cherukuri <chandni.cherukuri@arm.com> wrote:
>> Changes since v2:
>> - Addressed comments from Ard
>> - Depex on gHwConfigDtInfoPpiGuid
>> - Use address of DT instead of pointer to the address of DT
>>
>> Changes since v1:
>> - Addressed comments from Ard and Leif
>> - move definition of HwConfigDtBlob to PlatformLib.c
>> - use adr instead of ldr assembly instruction
>> - declare PPI in a PPI specific header file
>> - invert if conditional expression
>> - remove changes unrelated to the patch
>> - rename PEI files as per the standard
>>
>> On SGI platforms, the trusted firmware executes prior to the SEC
>> phase. It supplies to the SEC phase, a pointer to a HW CONFIG fdt
>> in the x1 which contains platform specific information such as part
>> number and config number of the SGI platform.
>>
>> The HW CONFIG FDT would look as,
>> /dts-v1/;
>> / {
>>         /* compatible string */
>>         compatible = "arm,sgi-isys3";
>>
>>         /* platform ID node */
>>         system-id {
>>              platform-id = <0x03000783>;
>>         }
>> };
>>
>> In the very first step of the assembly code which executes in SEC phase
>> the fdt pointer is stored in a global variable from the register. A PPI
>> is created during the SEC phase which stores the global variable.
>>
>> During PEI phase, a Platform ID PEIM is installed which accessess the PPI
>> and retrieves the platform information using FDT helper functions and a
>> PlatformId HOB is created and populated with the information.
>>
>> During DXE phase the drivers can access the Platform ID HOB to get the
>> platform information and perform platform specific functions based on the
>> platform.
>>
>> Chandni Cherukuri (2):
>>   Platform/ARM/Sgi: Install a Platform ID HOB
>>   Platform/ARM/Sgi: Pick ACPI tables to install based on platform ID
>>
>
> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>
> Pushed as f65939a9d98b..e93b4c776420
>
> I did notice that there is a typo in the identifier 'gSgi575AcpiTablesiFileGuid'
> Could you please send a patch to fix up all occurrences?
>
> Thanks,
> Ard.
>

Thanks Ard for reviewing the patches. The typo has been fixed and a patch has
been sent for your review.

Thanks,
Chandni
>
>>  Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c         |  30 +++++-
>>  Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf       |   2 +
>>  Platform/ARM/SgiPkg/Include/Ppi/SgiPlatformId.h               |  23 ++++
>>  Platform/ARM/SgiPkg/Include/SgiPlatform.h                     |  13 +++
>>  Platform/ARM/SgiPkg/Library/PlatformLib/AArch64/Helper.S      |  13 ++-
>>  Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.c         |  10 ++
>>  Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf       |   3 +
>>  Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPei.inf |  40 +++++++
>>  Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c  | 112 ++++++++++++++++++++
>>  Platform/ARM/SgiPkg/SgiPlatform.dec                           |   5 +
>>  Platform/ARM/SgiPkg/SgiPlatform.dsc                           |   1 +
>>  Platform/ARM/SgiPkg/SgiPlatform.fdf                           |   1 +
>>  12 files changed, 245 insertions(+), 8 deletions(-)
>>  create mode 100644 Platform/ARM/SgiPkg/Include/Ppi/SgiPlatformId.h
>>  create mode 100644 Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPei.inf
>>  create mode 100644 Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c
>>
>> --
>> 2.7.4
>>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel