* [edk2-devel] [PATCH edk2-platforms 1/1] Platform/VExpress: Replace missing ArmGetCpuCountPerCluster()
@ 2024-08-27 17:28 Ard Biesheuvel via groups.io
2024-08-30 15:45 ` Sami Mujawar
0 siblings, 1 reply; 6+ messages in thread
From: Ard Biesheuvel via groups.io @ 2024-08-27 17:28 UTC (permalink / raw)
To: devel; +Cc: sami.mujawar, quic_llindhol, Ard Biesheuvel
From: Ard Biesheuvel <ardb@kernel.org>
Commit
8676e88233d4 ("Platform/ ARM AARCH64: Remove ArmPlatformLib MPCore boilerplate")
inadvertently removed the implementation of ArmGetCpuCountPerCluster(),
which was hiding in the RTSM ArmPlatformLib implementation, even though
it was not part of that library class interface.
Given that the implementation just returned PcdCoreCount, fix up the
code that got broken by using that value directly.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c b/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c
index 24275254815a..b564db2693be 100644
--- a/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c
+++ b/Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c
@@ -15,19 +15,6 @@
#include <ArmPlatform.h>
-/**
- Return the core per cluster. The method may differ per core type
-
- This function might be called from assembler before any stack is set.
-
- @return Return the core count per cluster
-
-**/
-UINTN
-ArmGetCpuCountPerCluster (
- VOID
- );
-
ARM_CORE_INFO mVersatileExpressMpCoreInfoTable[] = {
{
// Cluster 0, Core 0
@@ -156,7 +143,7 @@ PrePeiCoreGetMpCoreInfo (
ProcType = MmioRead32 (ARM_VE_SYS_PROCID0_REG) & ARM_VE_SYS_PROC_ID_MASK;
if ((ProcType == ARM_VE_SYS_PROC_ID_CORTEX_A9) || (ProcType == ARM_VE_SYS_PROC_ID_CORTEX_A15)) {
// Only support one cluster on all but ARMv8 FVP platform. FVP still uses CortexA9 ID.
- *CoreCount = ArmGetCpuCountPerCluster ();
+ *CoreCount = FixedPcdGet32 (PcdCoreCount);
*ArmCoreTable = mVersatileExpressMpCoreInfoTable;
return EFI_SUCCESS;
} else {
--
2.46.0.295.g3b9ea8a38a-goog
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#120418): https://edk2.groups.io/g/devel/message/120418
Mute This Topic: https://groups.io/mt/108128468/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [edk2-devel] [PATCH edk2-platforms 1/1] Platform/VExpress: Replace missing ArmGetCpuCountPerCluster()
2024-08-27 17:28 [edk2-devel] [PATCH edk2-platforms 1/1] Platform/VExpress: Replace missing ArmGetCpuCountPerCluster() Ard Biesheuvel via groups.io
@ 2024-08-30 15:45 ` Sami Mujawar
2024-08-30 15:57 ` Ard Biesheuvel via groups.io
2024-08-30 16:03 ` Sami Mujawar
0 siblings, 2 replies; 6+ messages in thread
From: Sami Mujawar @ 2024-08-30 15:45 UTC (permalink / raw)
To: Ard Biesheuvel, devel
[-- Attachment #1: Type: text/plain, Size: 2120 bytes --]
Hi Ard,
Thank you for this patch.
These changes look good to me.
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
In addition to this patch I required the following changes for the FVP to boot to the UEFI shell.
edk2 repo:
-----------
diff --git a/ArmPlatformPkg/PeilessSec/PeilessSec.inf b/ArmPlatformPkg/PeilessSec/PeilessSec.inf
index 7ceeb74f69f2..d652b72e46b9 100644
--- a/ArmPlatformPkg/PeilessSec/PeilessSec.inf
+++ b/ArmPlatformPkg/PeilessSec/PeilessSec.inf
@@ -43,6 +43,7 @@ [LibraryClasses]
DebugAgentLib
DebugLib
HobLib
+ LzmaDecompressLib
MemoryInitPeiLib
PerformanceLib
PlatformPeiLib
edk2-platforms repo:
---------------------
diff --git a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
index 931eff2355d4..a299d7ed559a 100644
--- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
+++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
@@ -194,6 +194,7 @@ [LibraryClasses.common.SEC]
!ifdef $(EDK2_SKIP_PEICORE)
PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf
ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf
+ LzmaDecompressLib|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf
HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf
PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf
Without the above change the "SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF" is not found, see https://github.com/tianocore/edk2-platforms/blob/master/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.fdf#L250
Regards,
Sami Mujawar
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#120448): https://edk2.groups.io/g/devel/message/120448
Mute This Topic: https://groups.io/mt/108128468/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
[-- Attachment #2: Type: text/html, Size: 3237 bytes --]
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [edk2-devel] [PATCH edk2-platforms 1/1] Platform/VExpress: Replace missing ArmGetCpuCountPerCluster()
2024-08-30 15:45 ` Sami Mujawar
@ 2024-08-30 15:57 ` Ard Biesheuvel via groups.io
2024-08-30 16:04 ` Sami Mujawar
2024-08-30 16:03 ` Sami Mujawar
1 sibling, 1 reply; 6+ messages in thread
From: Ard Biesheuvel via groups.io @ 2024-08-30 15:57 UTC (permalink / raw)
To: sami.mujawar; +Cc: Ard Biesheuvel, devel
On Fri, Aug 30, 2024 at 5:46 PM Sami Mujawar via Groups.Io
<sami.mujawar=arm.com@groups.io> wrote:
>
> Hi Ard,
>
> Thank you for this patch.
>
> These changes look good to me.
>
> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
>
Thanks
> In addition to this patch I required the following changes for the FVP to boot to the UEFI shell.
>
> edk2 repo:
> -----------
> diff --git a/ArmPlatformPkg/PeilessSec/PeilessSec.inf b/ArmPlatformPkg/PeilessSec/PeilessSec.inf
> index 7ceeb74f69f2..d652b72e46b9 100644
> --- a/ArmPlatformPkg/PeilessSec/PeilessSec.inf
> +++ b/ArmPlatformPkg/PeilessSec/PeilessSec.inf
> @@ -43,6 +43,7 @@ [LibraryClasses]
> DebugAgentLib
> DebugLib
> HobLib
> + LzmaDecompressLib
> MemoryInitPeiLib
> PerformanceLib
> PlatformPeiLib
>
>
> edk2-platforms repo:
> ---------------------
> diff --git a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
> index 931eff2355d4..a299d7ed559a 100644
> --- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
> +++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
> @@ -194,6 +194,7 @@ [LibraryClasses.common.SEC]
> !ifdef $(EDK2_SKIP_PEICORE)
> PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf
> ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf
> + LzmaDecompressLib|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
> MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf
> HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf
> PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf
>
> Without the above change the "SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF" is not found, see https://github.com/tianocore/edk2-platforms/blob/master/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.fdf#L250
>
My bad. Could you please check whether the below works as well?
--- a/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc
+++ b/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc
@@ -230,6 +230,7 @@ [Components.common]
# UEFI is placed in RAM by bootloader
ArmPlatformPkg/PeilessSec/PeilessSec.inf {
<LibraryClasses>
+ NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
ArmPlatformLib|Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLib.inf
}
!else
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#120449): https://edk2.groups.io/g/devel/message/120449
Mute This Topic: https://groups.io/mt/108128468/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [edk2-devel] [PATCH edk2-platforms 1/1] Platform/VExpress: Replace missing ArmGetCpuCountPerCluster()
2024-08-30 15:45 ` Sami Mujawar
2024-08-30 15:57 ` Ard Biesheuvel via groups.io
@ 2024-08-30 16:03 ` Sami Mujawar
1 sibling, 0 replies; 6+ messages in thread
From: Sami Mujawar @ 2024-08-30 16:03 UTC (permalink / raw)
To: Sami Mujawar, devel
[-- Attachment #1: Type: text/plain, Size: 1189 bytes --]
Hi Ard,
Actually we need a change similar to the one done for ArmVirtKvmTool.dsc.
The following change fixes the issue, and there is no need to update PeilessSec.inf
diff --git a/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc b/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc
index d57304699e83..f72620a62b78 100644
--- a/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc
+++ b/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc
@@ -231,6 +231,7 @@ [Components.common]
ArmPlatformPkg/PeilessSec/PeilessSec.inf {
<LibraryClasses>
ArmPlatformLib|Platform/ARM/VExpressPkg/Library/ArmVExpressLibRTSM/ArmVExpressLib.inf
+ NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
}
!else
# UEFI lives in FLASH and copies itself to RAM
Regards,
Sami Mujawar
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#120450): https://edk2.groups.io/g/devel/message/120450
Mute This Topic: https://groups.io/mt/108128468/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
[-- Attachment #2: Type: text/html, Size: 2519 bytes --]
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-08-30 17:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-27 17:28 [edk2-devel] [PATCH edk2-platforms 1/1] Platform/VExpress: Replace missing ArmGetCpuCountPerCluster() Ard Biesheuvel via groups.io
2024-08-30 15:45 ` Sami Mujawar
2024-08-30 15:57 ` Ard Biesheuvel via groups.io
2024-08-30 16:04 ` Sami Mujawar
2024-08-30 17:25 ` Ard Biesheuvel via groups.io
2024-08-30 16:03 ` Sami Mujawar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox