[edk2-devel] [PATCH v1 1/1] MdeModulePkg: Avoid efi memory allocation for SP type

2024-06-10 Thread Dhaval Sharma
Most of the times it is desirable not to use special purpose
memory for regular edk2 usages. That memory (HBm/CXL) are
either meant for special purposes or are less reliable to
be used. So avoid using them as long as possible. We could
also introduce PCD for this control.

Cc: Liming Gao 
Signed-off-by: Dhaval Sharma 
---
 MdeModulePkg/Core/Dxe/Mem/Page.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/MdeModulePkg/Core/Dxe/Mem/Page.c b/MdeModulePkg/Core/Dxe/Mem/Page.c
index 5a51d9df1a29..e4daa741b971 100644
--- a/MdeModulePkg/Core/Dxe/Mem/Page.c
+++ b/MdeModulePkg/Core/Dxe/Mem/Page.c
@@ -1183,6 +1183,13 @@ CoreFindFreePagesI (
   continue;
 }
 
+//
+// Don't allocate out of Special-Purpose memory.
+//
+if ((Entry->Attribute & EFI_MEMORY_SP) != 0) {
+  continue;
+}
+
 DescStart = Entry->Start;
 DescEnd   = Entry->End;
 
-- 
2.40.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119545): https://edk2.groups.io/g/devel/message/119545
Mute This Topic: https://groups.io/mt/106607739/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v1 0/1] Avoid EFI memory alloc from SP_MEMORY

2024-06-10 Thread Dhaval Sharma
Most of the times it is desirable not to use special purpose
memory for regular edk2 usages. That memory (HBm/CXL) are
either meant for special purposes or are less reliable to
be used. So avoid using them as long as possible. We could
also introduce PCD for this control.

https://github.com/tianocore/edk2/pull/5760

Dhaval (1):
  MdeModulePkg: Avoid efi memory allocation for SP type

 MdeModulePkg/Core/Dxe/Mem/Page.c | 7 +++
 1 file changed, 7 insertions(+)

-- 
2.40.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119544): https://edk2.groups.io/g/devel/message/119544
Mute This Topic: https://groups.io/mt/106607737/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] Now: Tools, CI, Code base construction meeting series - Monday, June 10, 2024 #cal-notice

2024-06-10 Thread Group Notification
*Tools, CI, Code base construction meeting series*

*When:*
Monday, June 10, 2024
4:30pm to 5:30pm
(UTC-07:00) America/Los Angeles

*Where:*
https://teams.microsoft.com/l/meetup-join/19%3ameeting_ZDI2ZDg4NmMtMjI1My00MzI5LWFmYjAtMGQyNjUzNTBjZGYw%40thread.v2/0?context=%7b%22Tid%22%3a%2272f988bf-86f1-41af-91ab-2d7cd011db47%22%2c%22Oid%22%3a%2223af6561-6e1c-450d-b917-d9d674eb3cb6%22%7d

View Event ( https://edk2.groups.io/g/devel/viewevent?eventid=2159809 )

*Description:*

TianoCore community,

Microsoft and Intel will be hosting a series of open meetings to discuss build, 
CI, tools, and other related topics. If you are interested, have ideas/opinions 
please join us. These meetings will be Monday 4:30pm Pacific Time on Microsoft 
Teams.

MS Teams Link in following discussion: * 
https://github.com/tianocore/edk2/discussions/2614

Anyone is welcome to join.

* tianocore/edk2: EDK II (github.com)
* tianocore/edk2-basetools: EDK II BaseTools Python tools as a PIP module 
(github.com) https://github.com/tianocore/edk2-basetools
* tianocore/edk2-pytool-extensions: Extensions to the edk2 build system 
allowing for a more robust and plugin based build system and tool execution 
environment (github.com) https://github.com/tianocore/edk2-pytool-extensions
* tianocore/edk2-pytool-library: Python library package that supports UEFI 
development (github.com) https://github.com/tianocore/edk2-pytool-library

MS Teams Browser Clients * 
https://docs.microsoft.com/en-us/microsoftteams/get-clients?tabs=Windows#browser-client


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119543): https://edk2.groups.io/g/devel/message/119543
Mute This Topic: https://groups.io/mt/106604275/21656
Mute #cal-notice:https://edk2.groups.io/g/devel/mutehashtag/cal-notice
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] Event: Tools, CI, Code base construction meeting series - Monday, June 10, 2024 #cal-reminder

2024-06-10 Thread Group Notification
*Reminder: Tools, CI, Code base construction meeting series*

*When:*
Monday, June 10, 2024
4:30pm to 5:30pm
(UTC-07:00) America/Los Angeles

*Where:*
https://teams.microsoft.com/l/meetup-join/19%3ameeting_ZDI2ZDg4NmMtMjI1My00MzI5LWFmYjAtMGQyNjUzNTBjZGYw%40thread.v2/0?context=%7b%22Tid%22%3a%2272f988bf-86f1-41af-91ab-2d7cd011db47%22%2c%22Oid%22%3a%2223af6561-6e1c-450d-b917-d9d674eb3cb6%22%7d

View Event ( https://edk2.groups.io/g/devel/viewevent?eventid=2159809 )

*Description:*

TianoCore community,

Microsoft and Intel will be hosting a series of open meetings to discuss build, 
CI, tools, and other related topics. If you are interested, have ideas/opinions 
please join us. These meetings will be Monday 4:30pm Pacific Time on Microsoft 
Teams.

MS Teams Link in following discussion: * 
https://github.com/tianocore/edk2/discussions/2614

Anyone is welcome to join.

* tianocore/edk2: EDK II (github.com)
* tianocore/edk2-basetools: EDK II BaseTools Python tools as a PIP module 
(github.com) https://github.com/tianocore/edk2-basetools
* tianocore/edk2-pytool-extensions: Extensions to the edk2 build system 
allowing for a more robust and plugin based build system and tool execution 
environment (github.com) https://github.com/tianocore/edk2-pytool-extensions
* tianocore/edk2-pytool-library: Python library package that supports UEFI 
development (github.com) https://github.com/tianocore/edk2-pytool-library

MS Teams Browser Clients * 
https://docs.microsoft.com/en-us/microsoftteams/get-clients?tabs=Windows#browser-client


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119542): https://edk2.groups.io/g/devel/message/119542
Mute This Topic: https://groups.io/mt/106584090/21656
Mute #cal-reminder:https://edk2.groups.io/g/devel/mutehashtag/cal-reminder
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] INF defines section "SPEC" option - Build failure

2024-06-10 Thread ashwin.veeraiah via groups.io
I have verified that the EDK2 basetools does not process `SPEC` under the 
`DEFINES` section as mentioned in the documentation and it does not work.
I went through the commit history of basetools around this, it looks like this 
has not worked pretty much ever, (I went only as far as GitHub would allow me.)

There are multiple points of failures,

*Failure 1: Suggested example format*
SPEC USB_SPECIFICATION_VERSION = 2.0 *
* This example is wrong, as this format will cause build failure, as the 
basetools do larger processing based on the `=` sign.

.OrderedDict({'INF_VERSION': '0x00010005', 'BASE_NAME': 'ExampleCode', 
'FILE_GUID': '51C7D5B0-4E8F-4F3E-80C9-E6CCEAAE1EC1', 'MODULE_TYPE': 
'DXE_SMM_DRIVER',
*'SPEC                           USB_SPECIFICATION_VERSION ': '2.0'* , 
'VERSION_STRING': '1.0'})
The surrounding infrastructure cannot process this format.

*Failure 2 : GenMake.py*
It adds it to the Makefile, which is not necessary.
*module_extra_defines"      : ["%s = %s" % (k, v) for k, v in 
MyAgo.Module.Defines.items()]*
We can skip loading of SPEC here, solves the issue around the `=` sign also.

*Failure 3 :  GenC.py*
According to the documentation, it is supposed to add it to the header file 
(Autogen.h). There is no code support for it.
You can manipulate the *`Info.Module._Defs`* object  and add it to the 
generated file.

*Failure 4 : Documentation Information*
https://github.com/tianocore-docs/edk2-InfSpecification/blob/master/3_edk_ii_inf_file_format/34_%5Bdefines%5D_section.md
Shows this format for SPEC
[ < TS > "SPEC" < MTS > < Spec > < EOL > ] * The `*` at the end means you can 
have multiple SPEC declarations, this is not true, the current basetools code 
just replaces to use the last one.
< Spec > :: = < Identifier > < Eq > < DecimalVersion > The 
`DecimalVersion` format is idetified as below,
     ::= {"0"} {(0-9) (0-9)*} ["." (0-9)+]
The curly braces format suggests that you can have a blank string as input,
This should be
 ::= "0" (0-9)* ["." (0-9)+]

Will make a bugzilla on this and maybe a PR with my version of the solution.
Ashwin


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119541): https://edk2.groups.io/g/devel/message/119541
Mute This Topic: https://groups.io/mt/105184345/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v2 0/2] ArmPkg/MdePkg: Move Chipset/* files to MdePkg

2024-06-10 Thread Leif Lindholm

On 2024-03-14 20:21, PierreGondois wrote:

v2:
- Move files to MdePkg/Include/Register/ instead of  MdePkg/Include/

This patch relies on [1].

Following the RFC v1: ArmPkg,MdePkg: move ArmLib.h to MdePkg [1],
move the Chipset/* files to the MdePkg as the Armlib.h relies on
them.

These patches span over multiple packages as these Chipset/* files
are relocated to a new directory and include paths must be updated.

[1] https://edk2.groups.io/g/devel/message/111566


For my part, for the series:
Reviewed-by: Leif Lindholm 


Cc: Ard Biesheuvel 
Cc: Gerd Hoffmann 
Cc: Jiewen Yao 
Cc: Leif Lindholm 
Cc: Liming Gao 
Cc: Michael D Kinney 
Cc: Pierre Gondois 
Cc: Sami Mujawar 
Cc: Zhiguang Liu 

Pierre Gondois (2):
   ArmPkg,MdePkg: Move ArmPkg/Chipset/AArch64[|Mmu].h to MdePkg
   ArmPkg,MdePkg: Move ArmPkg/Chipset/ArmV7[|Mmu].h to MdePkg

  ArmPkg/Library/ArmExceptionLib/AArch64/AArch64Exception.c | 2 +-
  ArmPkg/Library/ArmExceptionLib/AArch64/ExceptionSupport.S | 2 +-
  ArmPkg/Library/ArmExceptionLib/Arm/ArmException.c | 2 +-
  ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c| 2 +-
  ArmPkg/Library/ArmLib/AArch64/AArch64Support.S| 2 +-
  ArmPkg/Library/ArmLib/Arm/ArmV7Lib.c  | 2 +-
  ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c  | 2 +-
  ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibConvert.c   | 2 +-
  ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibCore.c  | 2 +-
  ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibUpdate.c| 2 +-
  ArmPlatformPkg/PrePeiCore/AArch64/Exception.S | 2 +-
  ArmPlatformPkg/PrePeiCore/AArch64/Helper.S| 2 +-
  ArmPlatformPkg/PrePi/AArch64/ArchPrePi.c  | 2 +-
  ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.S   | 2 +-
  ArmVirtPkg/PrePi/AArch64/ArchPrePi.c  | 2 +-
  MdePkg/Include/Library/ArmLib.h   | 4 ++--
  .../Chipset => MdePkg/Include/Register/AArch64}/AArch64.h | 2 +-
  .../Chipset => MdePkg/Include/Register/AArch64}/AArch64Mmu.h  | 0
  .../Chipset/ArmV7.h => MdePkg/Include/Register/Arm/AArch32.h  | 2 +-
  .../ArmV7Mmu.h => MdePkg/Include/Register/Arm/AArch32Mmu.h| 0
  20 files changed, 19 insertions(+), 19 deletions(-)
  rename {ArmPkg/Include/Chipset => MdePkg/Include/Register/AArch64}/AArch64.h 
(94%)
  rename {ArmPkg/Include/Chipset => 
MdePkg/Include/Register/AArch64}/AArch64Mmu.h (100%)
  rename ArmPkg/Include/Chipset/ArmV7.h => 
MdePkg/Include/Register/Arm/AArch32.h (94%)
  rename ArmPkg/Include/Chipset/ArmV7Mmu.h => 
MdePkg/Include/Register/Arm/AArch32Mmu.h (100%)





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119540): https://edk2.groups.io/g/devel/message/119540
Mute This Topic: https://groups.io/mt/104927819/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v1 1/1] UefiPayloadPkg: Enable UPL FIT build config from cmdline

2024-06-10 Thread Guo, Gua
parser.add_argument('-c', '--DscPath', type=str, required=True, help='Path to 
the DSC file')
> required should be False

Default should be UefiPayloadPkg.dsc, --DscPath can give customized dsc path. I 
will be better for backward compatibility.

Thanks,
Gua

-Original Message-
From: Dhaval  
Sent: Monday, June 10, 2024 11:45 PM
To: devel@edk2.groups.io
Cc: Guo, Gua ; Dong, Guo ; Lu, James 
; Rhodes, Sean 
Subject: [PATCH v1 1/1] UefiPayloadPkg: Enable UPL FIT build config from cmdline

Provide commandline configuration to select proper platform file.

Cc: Gua Guo 
Cc: Guo Dong 
Cc: James Lu 
Cc: Sean Rhodes 

Signed-off-by: Dhaval Sharma 
---
 UefiPayloadPkg/UniversalPayloadBuild.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/UefiPayloadPkg/UniversalPayloadBuild.py 
b/UefiPayloadPkg/UniversalPayloadBuild.py
index 0423e6da17ff..e2d2e3ffbd1f 100644
--- a/UefiPayloadPkg/UniversalPayloadBuild.py
+++ b/UefiPayloadPkg/UniversalPayloadBuild.py
@@ -112,6 +112,7 @@ def RunCommand(cmd):
 raise Exception("ERROR: when run command: %s"%cmd)

 

 def BuildUniversalPayload(Args):

+DscPath = os.path.normpath(Args.DscPath)

 BuildTarget = Args.Target

 ToolChain = Args.ToolChain

 Quiet = "--quiet"  if Args.Quiet else ""

@@ -140,7 +141,6 @@ def BuildUniversalPayload(Args):
 

 EntryOutputDir = os.path.join(BuildDir, "{}_{}".format (BuildTarget, 
PayloadEntryToolChain), 
os.path.normpath("{}/UefiPayloadPkg/UefiPayloadEntry/{}/DEBUG/{}.dll".format 
(Args.Arch, UpldEntryFile, UpldEntryFile)))

 EntryModuleInf = 
os.path.normpath("UefiPayloadPkg/UefiPayloadEntry/{}.inf".format 
(UpldEntryFile))

-DscPath = os.path.normpath("UefiPayloadPkg/UefiPayloadPkg.dsc")

 DxeFvOutputDir = os.path.join(BuildDir, "{}_{}".format (BuildTarget, 
ToolChain), os.path.normpath("FV/DXEFV.Fv"))

 BdsFvOutputDir = os.path.join(BuildDir, "{}_{}".format (BuildTarget, 
ToolChain), os.path.normpath("FV/BDSFV.Fv"))

 NetworkFvOutputDir = os.path.join(BuildDir, "{}_{}".format (BuildTarget, 
ToolChain), os.path.normpath("FV/NETWORKFV.Fv"))

@@ -321,6 +321,7 @@ def main():
 parser.add_argument("-af", "--AddFv", type=ValidateAddFv, action='append', 
help='Add or replace specific FV into payload, Ex: uefi_fv=XXX.fv')

 parser.add_argument("-f", "--Fit", action='store_true', help='Build 
UniversalPayload file as UniversalPayload.fit', default=False)

 parser.add_argument('-l', "--LoadAddress", type=int, help='Specify payload 
load address', default =0x00080)

+parser.add_argument('-c', '--DscPath', type=str, required=True, help='Path 
to the DSC file')

 

 args = parser.parse_args()

 

-- 
2.40.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119539): https://edk2.groups.io/g/devel/message/119539
Mute This Topic: https://groups.io/mt/106595353/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v1 1/1] UefiPayloadPkg: Enable UPL FIT build config from cmdline

2024-06-10 Thread Dhaval Sharma
Provide commandline configuration to select proper platform file.

Cc: Gua Guo 
Cc: Guo Dong 
Cc: James Lu 
Cc: Sean Rhodes 

Signed-off-by: Dhaval Sharma 
---
 UefiPayloadPkg/UniversalPayloadBuild.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/UefiPayloadPkg/UniversalPayloadBuild.py 
b/UefiPayloadPkg/UniversalPayloadBuild.py
index 0423e6da17ff..e2d2e3ffbd1f 100644
--- a/UefiPayloadPkg/UniversalPayloadBuild.py
+++ b/UefiPayloadPkg/UniversalPayloadBuild.py
@@ -112,6 +112,7 @@ def RunCommand(cmd):
 raise Exception("ERROR: when run command: %s"%cmd)
 
 def BuildUniversalPayload(Args):
+DscPath = os.path.normpath(Args.DscPath)
 BuildTarget = Args.Target
 ToolChain = Args.ToolChain
 Quiet = "--quiet"  if Args.Quiet else ""
@@ -140,7 +141,6 @@ def BuildUniversalPayload(Args):
 
 EntryOutputDir = os.path.join(BuildDir, "{}_{}".format (BuildTarget, 
PayloadEntryToolChain), 
os.path.normpath("{}/UefiPayloadPkg/UefiPayloadEntry/{}/DEBUG/{}.dll".format 
(Args.Arch, UpldEntryFile, UpldEntryFile)))
 EntryModuleInf = 
os.path.normpath("UefiPayloadPkg/UefiPayloadEntry/{}.inf".format 
(UpldEntryFile))
-DscPath = os.path.normpath("UefiPayloadPkg/UefiPayloadPkg.dsc")
 DxeFvOutputDir = os.path.join(BuildDir, "{}_{}".format (BuildTarget, 
ToolChain), os.path.normpath("FV/DXEFV.Fv"))
 BdsFvOutputDir = os.path.join(BuildDir, "{}_{}".format (BuildTarget, 
ToolChain), os.path.normpath("FV/BDSFV.Fv"))
 NetworkFvOutputDir = os.path.join(BuildDir, "{}_{}".format (BuildTarget, 
ToolChain), os.path.normpath("FV/NETWORKFV.Fv"))
@@ -321,6 +321,7 @@ def main():
 parser.add_argument("-af", "--AddFv", type=ValidateAddFv, action='append', 
help='Add or replace specific FV into payload, Ex: uefi_fv=XXX.fv')
 parser.add_argument("-f", "--Fit", action='store_true', help='Build 
UniversalPayload file as UniversalPayload.fit', default=False)
 parser.add_argument('-l', "--LoadAddress", type=int, help='Specify payload 
load address', default =0x00080)
+parser.add_argument('-c', '--DscPath', type=str, required=True, help='Path 
to the DSC file')
 
 args = parser.parse_args()
 
-- 
2.40.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119538): https://edk2.groups.io/g/devel/message/119538
Mute This Topic: https://groups.io/mt/106595353/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH] UefiPayloadPkg: Fix LoadDxeCore for payload size > 16MB

2024-06-10 Thread Guo, Gua
I’ve added push label, it will be merged tomorrow.

From: Lean Sheng Tan 
Sent: Monday, June 10, 2024 11:28 PM
To: Witt, Sebastian 
Cc: Guo, Gua ; devel@edk2.groups.io; Rhodes, Sean 
; Lu, James ; Dong, Guo 

Subject: Re: [edk2-devel] [PATCH] UefiPayloadPkg: Fix LoadDxeCore for payload 
size > 16MB

Hi Gua/ Dong Guo,
Do you know how to proceed?
https://github.com/tianocore/edk2/pull/5732
Does the patch submitter have to actively rebase its patch?

Best Regards,
Lean Sheng Tan

[http://static.9elements.com/logo-signature.png]
9elements GmbH, Kortumstraße 19-21, 44787 Bochum, Germany
Email: sheng@9elements.com
Phone: +49 234 68 94 188
Mobile: +49 176 76 113842

Registered office: Bochum
Commercial register: Amtsgericht Bochum, HRB 17519
Management: Sebastian German, Eray Bazaar

Data protection information according to Art. 13 
GDPR


On Thu, 6 Jun 2024 at 15:38, Witt, Sebastian 
mailto:sebastian.w...@siemens.com>> wrote:
Done here: https://github.com/tianocore/edk2/pull/5732

Regards,
Sebastian

From: Guo, Gua mailto:gua@intel.com>>
Sent: Wednesday, 5 June 2024 16:22
To: Tan, Lean Sheng mailto:sheng@9elements.com>>; 
devel@edk2.groups.io; Witt, Sebastian (DI FA CTR 
IPC PRC2) mailto:sebastian.w...@siemens.com>>; 
Rhodes, Sean mailto:sean@starlabs.systems>>; Lu, James 
mailto:james...@intel.com>>; Dong, Guo 
mailto:guo.d...@intel.com>>
Subject: Re: [edk2-devel] [PATCH] UefiPayloadPkg: Fix LoadDxeCore for payload 
size > 16MB

Please send PR also.

From: Lean Sheng Tan mailto:sheng@9elements.com>>
Sent: Wednesday, June 5, 2024 10:18:27 PM
To: devel@edk2.groups.io 
mailto:devel@edk2.groups.io>>; Witt, Sebastian 
mailto:sebastian.w...@siemens.com>>; Guo, Gua 
mailto:gua@intel.com>>; Rhodes, Sean 
mailto:sean@starlabs.systems>>; Lu, James 
mailto:james...@intel.com>>; Dong, Guo 
mailto:guo.d...@intel.com>>
Subject: Re: [edk2-devel] [PATCH] UefiPayloadPkg: Fix LoadDxeCore for payload 
size > 16MB

+ edk2 payload maintainers

Best Regards,
Lean Sheng Tan

[Image removed by sender.]
9elements GmbH, Kortumstraße 19-21, 44787 Bochum, Germany
Email: sheng@9elements.com
Phone: +49 234 68 94 188
Mobile: +49 176 76 113842

Registered office: Bochum
Commercial register: Amtsgericht Bochum, HRB 17519
Management: Sebastian German, Eray Bazaar

Data protection information according to Art. 13 
GDPR


On Mon, 3 Jun 2024 at 23:20, Witt, Sebastian via groups.io 
mailto:siemens@groups.io>> wrote:

Fix calculation of first section in FileFindSection for FILE2 headers in 
UefiPayloadEntry module.

Signed-of-by: Sebastian Witt 
mailto:sebastian.w...@siemens.com>>
---
 UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c 
b/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c
index 898d610951..9cb6edefcf 100644
--- a/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c
+++ b/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c
@@ -211,13 +211,14 @@ FileFindSection (

   if (IS_FFS_FILE2 (FileHeader)) {
 FileSize = FFS_FILE2_SIZE (FileHeader);
+Section = (EFI_COMMON_SECTION_HEADER *)(((EFI_FFS_FILE_HEADER2 
*)FileHeader) + 1);
   } else {
 FileSize = FFS_FILE_SIZE (FileHeader);
+Section = (EFI_COMMON_SECTION_HEADER *)(FileHeader + 1);
   }

   FileSize -= sizeof (EFI_FFS_FILE_HEADER);

-  Section = (EFI_COMMON_SECTION_HEADER *)(FileHeader + 1);
   Index   = 0;
   while (Index < FileSize) {
 if (Section->Type == SectionType) {
--
2.39.2






-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119537): https://edk2.groups.io/g/devel/message/119537
Mute This Topic: https://groups.io/mt/106471262/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH] UefiPayloadPkg: Fix LoadDxeCore for payload size > 16MB

2024-06-10 Thread Lean Sheng Tan via groups.io
Hi Gua/ Dong Guo,
Do you know how to proceed?
https://github.com/tianocore/edk2/pull/5732
Does the patch submitter have to actively rebase its patch?

Best Regards,
*Lean Sheng Tan*



9elements GmbH, Kortumstraße 19-21, 44787 Bochum, Germany
Email: sheng@9elements.com
Phone: *+49 234 68 94 188 <+492346894188>*
Mobile: *+49 176 76 113842 <+4917676113842>*

Registered office: Bochum
Commercial register: Amtsgericht Bochum, HRB 17519
Management: Sebastian German, Eray Bazaar

Data protection information according to Art. 13 GDPR



On Thu, 6 Jun 2024 at 15:38, Witt, Sebastian 
wrote:

> Done here: https://github.com/tianocore/edk2/pull/5732
>
>
>
> Regards,
>
> Sebastian
>
>
>
> *From:* Guo, Gua 
> *Sent:* Wednesday, 5 June 2024 16:22
> *To:* Tan, Lean Sheng ; devel@edk2.groups.io;
> Witt, Sebastian (DI FA CTR IPC PRC2) ;
> Rhodes, Sean ; Lu, James ;
> Dong, Guo 
> *Subject:* Re: [edk2-devel] [PATCH] UefiPayloadPkg: Fix LoadDxeCore for
> payload size > 16MB
>
>
>
> Please send PR also.
> --
>
> *From:* Lean Sheng Tan 
> *Sent:* Wednesday, June 5, 2024 10:18:27 PM
> *To:* devel@edk2.groups.io ; Witt, Sebastian <
> sebastian.w...@siemens.com>; Guo, Gua ; Rhodes, Sean
> ; Lu, James ; Dong, Guo <
> guo.d...@intel.com>
> *Subject:* Re: [edk2-devel] [PATCH] UefiPayloadPkg: Fix LoadDxeCore for
> payload size > 16MB
>
>
>
> + edk2 payload maintainers
>
>
> Best Regards,
>
> *Lean Sheng Tan*
>
>
> [image: Image removed by sender.]
>
> 9elements GmbH, Kortumstraße 19-21, 44787 Bochum, Germany
>
> Email: sheng@9elements.com
>
> Phone: *+49 234 68 94 188 <+492346894188>*
>
> Mobile: *+49 176 76 113842 <+4917676113842>*
>
>
>
> Registered office: Bochum
>
> Commercial register: Amtsgericht Bochum, HRB 17519
>
> Management: Sebastian German, Eray Bazaar
>
>
> Data protection information according to Art. 13 GDPR
> 
>
>
>
>
>
> On Mon, 3 Jun 2024 at 23:20, Witt, Sebastian via groups.io
>  wrote:
>
>
> Fix calculation of first section in FileFindSection for FILE2 headers in
> UefiPayloadEntry module.
>
> Signed-of-by: Sebastian Witt 
> ---
>  UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c
> b/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c
> index 898d610951..9cb6edefcf 100644
> --- a/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c
> +++ b/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c
> @@ -211,13 +211,14 @@ FileFindSection (
>
>if (IS_FFS_FILE2 (FileHeader)) {
>  FileSize = FFS_FILE2_SIZE (FileHeader);
> +Section = (EFI_COMMON_SECTION_HEADER *)(((EFI_FFS_FILE_HEADER2
> *)FileHeader) + 1);
>} else {
>  FileSize = FFS_FILE_SIZE (FileHeader);
> +Section = (EFI_COMMON_SECTION_HEADER *)(FileHeader + 1);
>}
>
>FileSize -= sizeof (EFI_FFS_FILE_HEADER);
>
> -  Section = (EFI_COMMON_SECTION_HEADER *)(FileHeader + 1);
>Index   = 0;
>while (Index < FileSize) {
>  if (Section->Type == SectionType) {
> --
> 2.39.2
>
>
>
> 
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119536): https://edk2.groups.io/g/devel/message/119536
Mute This Topic: https://groups.io/mt/106471262/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [platforms/devel-dynamictables-reorg PATCH 14/14] Platform/NXP: Move Pci Config Space info to Arch Common

2024-06-10 Thread PierreGondois
From: Pierre Gondois 

Some DynamicTables objects have been moved from the Arm namespace
to a new Arch Common namespace. Reflect this change by
renaming/moving the relevant object.

This patch modifies the ConfigurationManager of the NXP
platforms for the following Arch Common object Id:
- EArchCommonObjPciConfigSpaceInfo

Signed-off-by: Pierre Gondois 
---
 .../ConfigurationManager.c| 26 +--
 .../ConfigurationManager.h|  2 +-
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git 
a/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/ConfigurationManager.c
 
b/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/ConfigurationManager.c
index d1e02cacafa7..dc872c765d88 100644
--- 
a/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/ConfigurationManager.c
+++ 
b/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/ConfigurationManager.c
@@ -528,6 +528,19 @@ GetArchCommonNameSpaceObject (
  );
   break;
 
+case EArchCommonObjPciConfigSpaceInfo:
+  Status = HandleCmObjectRefByToken (
+ This,
+ CmObjectId,
+ PlatformRepo->PciConfigInfo,
+ sizeof (PlatformRepo->PciConfigInfo),
+ ARRAY_SIZE (PlatformRepo->PciConfigInfo),
+ Token,
+ GetPciConfigInfo,
+ CmObject
+ );
+  break;
+
   default: {
   Status = EFI_NOT_FOUND;
   DEBUG ((
@@ -673,19 +686,6 @@ GetArmNameSpaceObject (
  );
   break;
 
-case EArmObjPciConfigSpaceInfo:
-  Status = HandleCmObjectRefByToken (
- This,
- CmObjectId,
- PlatformRepo->PciConfigInfo,
- sizeof (PlatformRepo->PciConfigInfo),
- ARRAY_SIZE (PlatformRepo->PciConfigInfo),
- Token,
- GetPciConfigInfo,
- CmObject
- );
-  break;
-
 default: {
   Status = EFI_NOT_FOUND;
   DEBUG ((
diff --git 
a/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/ConfigurationManager.h
 
b/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/ConfigurationManager.h
index 494adbc775da..88a26879f766 100644
--- 
a/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/ConfigurationManager.h
+++ 
b/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/ConfigurationManager.h
@@ -108,7 +108,7 @@ typedef struct PlatformRepositoryInfo {
   CM_ARM_GIC_ITS_INFO   GicItsInfo;
 
   /// PCI configuration space information
-  CM_ARM_PCI_CONFIG_SPACE_INFO  
PciConfigInfo[PLAT_PCI_CONFG_COUNT];
+  CM_ARCH_COMMON_PCI_CONFIG_SPACE_INFO  
PciConfigInfo[PLAT_PCI_CONFG_COUNT];
 
   /// Serial port information for serial port console redirection port
   CM_ARCH_COMMON_SERIAL_PORT_INFO   SpcrSerialPort;
-- 
2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119534): https://edk2.groups.io/g/devel/message/119534
Mute This Topic: https://groups.io/mt/106589352/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [platforms/devel-dynamictables-reorg PATCH 11/14] Platform/NXP: Add Arch Common objects handler

2024-06-10 Thread PierreGondois
From: Pierre Gondois 

Some DynamicTables objects have been moved from the Arm namespace
to a new Arch Common namespace. Prepare the handling of these objects
in the ConfigurationManagers by adding a function handler for these
objects.

This patch modifies the ConfigurationManager of the NXP
platforms.

Signed-off-by: Pierre Gondois 
---
 .../ConfigurationManager.c| 54 +++
 1 file changed, 54 insertions(+)

diff --git 
a/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/ConfigurationManager.c
 
b/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/ConfigurationManager.c
index 80ce8412c47a..b5ad69cc9632 100644
--- 
a/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/ConfigurationManager.c
+++ 
b/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/ConfigurationManager.c
@@ -3,6 +3,7 @@
 
   Copyright 2020 NXP
   Copyright 2020 Puresoftware Ltd
+  Copyright (c) 2024, Arm Limited. All rights reserved.
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -472,6 +473,56 @@ GetStandardNameSpaceObject (
   return Status;
 }
 
+/** Return an Arch Common namespace object.
+
+  @param [in]  ThisPointer to the Configuration Manager Protocol.
+  @param [in]  CmObjectId  The Configuration Manager Object ID.
+  @param [in]  Token   An optional token identifying the object. If
+   unused this must be CM_NULL_TOKEN.
+  @param [in, out] CmObjectPointer to the Configuration Manager Object
+   descriptor describing the requested Object.
+
+  @retval EFI_SUCCESS   Success.
+  @retval EFI_INVALID_PARAMETER A parameter is invalid.
+  @retval EFI_NOT_FOUND The required object information is not found.
+**/
+EFI_STATUS
+EFIAPI
+GetArchCommonNameSpaceObject (
+  IN  CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL  * CONST This,
+  IN  CONST CM_OBJECT_ID  CmObjectId,
+  IN  CONST CM_OBJECT_TOKEN   Token OPTIONAL,
+  IN  OUT   CM_OBJ_DESCRIPTOR * CONST CmObject
+  )
+{
+  EFI_STATUSStatus;
+  EDKII_PLATFORM_REPOSITORY_INFO  * PlatformRepo;
+
+  if ((This == NULL) || (CmObject == NULL)) {
+ASSERT (This != NULL);
+ASSERT (CmObject != NULL);
+return EFI_INVALID_PARAMETER;
+  }
+
+  Status = EFI_NOT_FOUND;
+  PlatformRepo = This->PlatRepoInfo;
+
+  switch (GET_CM_OBJECT_ID (CmObjectId)) {
+default: {
+  Status = EFI_NOT_FOUND;
+  DEBUG ((
+DEBUG_INFO,
+"INFO: Object 0x%x. Status = %r\n",
+CmObjectId,
+Status
+));
+  break;
+}
+  } //switch
+
+  return Status;
+}
+
 /** Return an ARM namespace object.
 
   @param [in]  ThisPointer to the Configuration Manager Protocol.
@@ -733,6 +784,9 @@ FslPlatformGetObject (
 case EObjNameSpaceStandard:
   Status = GetStandardNameSpaceObject (This, CmObjectId, Token, CmObject);
   break;
+case EObjNameSpaceArchCommon:
+  Status = GetArchCommonNameSpaceObject (This, CmObjectId, Token, 
CmObject);
+  break;
 case EObjNameSpaceArm:
   Status = GetArmNameSpaceObject (This, CmObjectId, Token, CmObject);
   break;
-- 
2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119531): https://edk2.groups.io/g/devel/message/119531
Mute This Topic: https://groups.io/mt/106589349/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [platforms/devel-dynamictables-reorg PATCH 10/14] Platform/ARM: N1Sdp: Move Memory Affinity info to Arch Common

2024-06-10 Thread PierreGondois
From: Pierre Gondois 

Some DynamicTables objects have been moved from the Arm namespace
to a new Arch Common namespace. Reflect this change by
renaming/moving the relevant object.

This patch modifies the ConfigurationManager of the following
platforms:
- N1Sdp
for the following Arch Common object Id:
- EArmObjMemoryAffinityInfo

Signed-off-by: Pierre Gondois 
---
 .../ConfigurationManager.c| 20 +--
 .../ConfigurationManager.h|  2 +-
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
index d90d81bffa9f..20aa3bcec217 100644
--- 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
+++ 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
@@ -1803,6 +1803,16 @@ GetArchCommonNameSpaceObject (
  );
   break;
 
+case EArchCommonObjMemoryAffinityInfo:
+  Status = HandleCmObject (
+ CmObjectId,
+ PlatformRepo->MemAffInfo,
+ sizeof (PlatformRepo->MemAffInfo),
+ ARRAY_SIZE (PlatformRepo->MemAffInfo),
+ CmObject
+ );
+  break;
+
   default: {
   Status = EFI_NOT_FOUND;
   DEBUG ((
@@ -2037,16 +2047,6 @@ GetArmNameSpaceObject (
  );
   break;
 
-case EArmObjMemoryAffinityInfo:
-  Status = HandleCmObject (
- CmObjectId,
- PlatformRepo->MemAffInfo,
- sizeof (PlatformRepo->MemAffInfo),
- ARRAY_SIZE (PlatformRepo->MemAffInfo),
- CmObject
- );
-  break;
-
 default: {
   Status = EFI_NOT_FOUND;
   DEBUG ((
diff --git 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
index 8a8e6e6c99a1..6713e9211fb3 100644
--- 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
+++ 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
@@ -300,7 +300,7 @@ typedef struct PlatformRepositoryInfo {
   CM_ARCH_COMMON_PCI_CONFIG_SPACE_INFO  PciConfigInfo[Root_pcie_max];
 
   /// Memory Affinity Info
-  CM_ARM_MEMORY_AFFINITY_INFO   MemAffInfo[DDR_REGION_COUNT];
+  CM_ARCH_COMMON_MEMORY_AFFINITY_INFO   MemAffInfo[DDR_REGION_COUNT];
 
   /// N1Sdp Platform Info
   NEOVERSEN1SOC_PLAT_INFO   *PlatInfo;
-- 
2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119530): https://edk2.groups.io/g/devel/message/119530
Mute This Topic: https://groups.io/mt/106589348/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [platforms/devel-dynamictables-reorg PATCH 13/14] Platform/NXP: Move Serial Port info to Arch Common

2024-06-10 Thread PierreGondois
From: Pierre Gondois 

Some DynamicTables objects have been moved from the Arm namespace
to a new Arch Common namespace. Reflect this change by
renaming/moving the relevant object.

This patch modifies the ConfigurationManager of the NXP
platforms for the following Arch Common object Id:
- EArchCommonObjConsolePortInfo
- EArchCommonObjSerialDebugPortInfo

Signed-off-by: Pierre Gondois 
Signed-off-by: Pierre Gondois 
---
 .../ConfigurationManager.c| 20 +--
 .../ConfigurationManager.h|  2 +-
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git 
a/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/ConfigurationManager.c
 
b/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/ConfigurationManager.c
index 6de0c768e880..d1e02cacafa7 100644
--- 
a/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/ConfigurationManager.c
+++ 
b/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/ConfigurationManager.c
@@ -518,6 +518,16 @@ GetArchCommonNameSpaceObject (
  );
   break;
 
+case EArchCommonObjConsolePortInfo:
+  Status = HandleCmObject (
+ CmObjectId,
+ >SpcrSerialPort,
+ sizeof (PlatformRepo->SpcrSerialPort),
+ 1,
+ CmObject
+ );
+  break;
+
   default: {
   Status = EFI_NOT_FOUND;
   DEBUG ((
@@ -663,16 +673,6 @@ GetArmNameSpaceObject (
  );
   break;
 
-case EArmObjSerialConsolePortInfo:
-  Status = HandleCmObject (
- CmObjectId,
- >SpcrSerialPort,
- sizeof (PlatformRepo->SpcrSerialPort),
- 1,
- CmObject
- );
-  break;
-
 case EArmObjPciConfigSpaceInfo:
   Status = HandleCmObjectRefByToken (
  This,
diff --git 
a/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/ConfigurationManager.h
 
b/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/ConfigurationManager.h
index c276ba048999..494adbc775da 100644
--- 
a/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/ConfigurationManager.h
+++ 
b/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/ConfigurationManager.h
@@ -111,7 +111,7 @@ typedef struct PlatformRepositoryInfo {
   CM_ARM_PCI_CONFIG_SPACE_INFO  
PciConfigInfo[PLAT_PCI_CONFG_COUNT];
 
   /// Serial port information for serial port console redirection port
-  CM_ARM_SERIAL_PORT_INFO   SpcrSerialPort;
+  CM_ARCH_COMMON_SERIAL_PORT_INFO   SpcrSerialPort;
 
   /// Fsl Board Revision
   UINT32FslBoardRevision;
-- 
2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119533): https://edk2.groups.io/g/devel/message/119533
Mute This Topic: https://groups.io/mt/106589351/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [platforms/devel-dynamictables-reorg PATCH 12/14] Platform/NXP: Move Power Mgmt Profile info to Arch Common

2024-06-10 Thread PierreGondois
From: Pierre Gondois 

Some DynamicTables objects have been moved from the Arm namespace
to a new Arch Common namespace. Reflect this change by
renaming/moving the relevant object.

This patch modifies the ConfigurationManager of the NXP
platforms for the following Arch Common object Id:
- EArchCommonObjPowerManagementProfileInfo

Signed-off-by: Pierre Gondois 
---
 .../ConfigurationManager.c| 22 +--
 .../ConfigurationManager.h|  3 ++-
 2 files changed, 13 insertions(+), 12 deletions(-)

diff --git 
a/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/ConfigurationManager.c
 
b/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/ConfigurationManager.c
index b5ad69cc9632..6de0c768e880 100644
--- 
a/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/ConfigurationManager.c
+++ 
b/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/ConfigurationManager.c
@@ -508,7 +508,17 @@ GetArchCommonNameSpaceObject (
   PlatformRepo = This->PlatRepoInfo;
 
   switch (GET_CM_OBJECT_ID (CmObjectId)) {
-default: {
+case EArchCommonObjPowerManagementProfileInfo:
+  Status = HandleCmObject (
+ CmObjectId,
+ >PmProfileInfo,
+ sizeof (PlatformRepo->PmProfileInfo),
+ 1,
+ CmObject
+ );
+  break;
+
+  default: {
   Status = EFI_NOT_FOUND;
   DEBUG ((
 DEBUG_INFO,
@@ -567,16 +577,6 @@ GetArmNameSpaceObject (
  );
   break;
 
-case EArmObjPowerManagementProfileInfo:
-  Status = HandleCmObject (
- CmObjectId,
- >PmProfileInfo,
- sizeof (PlatformRepo->PmProfileInfo),
- 1,
- CmObject
- );
-  break;
-
 case EArmObjGenericTimerInfo:
   Status = HandleCmObject (
  CmObjectId,
diff --git 
a/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/ConfigurationManager.h
 
b/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/ConfigurationManager.h
index 0c7dd411f44c..c276ba048999 100644
--- 
a/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/ConfigurationManager.h
+++ 
b/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/ConfigurationManager.h
@@ -3,6 +3,7 @@
 
   Copyright 2020 NXP
   Copyright 2020 Puresoftware Ltd
+  Copyright (c) 2024, Arm Limited. All rights reserved.
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -80,7 +81,7 @@ typedef struct PlatformRepositoryInfo {
   CM_ARM_BOOT_ARCH_INFO BootArchInfo;
 
   /// Power management profile information
-  CM_ARM_POWER_MANAGEMENT_PROFILE_INFO  PmProfileInfo;
+  CM_ARCH_COMMON_POWER_MANAGEMENT_PROFILE_INFO  PmProfileInfo;
 
   /// Generic timer information
   CM_ARM_GENERIC_TIMER_INFO GenericTimerInfo;
-- 
2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119532): https://edk2.groups.io/g/devel/message/119532
Mute This Topic: https://groups.io/mt/106589350/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [platforms/devel-dynamictables-reorg PATCH 06/14] Platform/ARM: Morello,N1Sdp: Move Pci Config Space info to Arch Common

2024-06-10 Thread PierreGondois
From: Pierre Gondois 

Some DynamicTables objects have been moved from the Arm namespace
to a new Arch Common namespace. Reflect this change by
renaming/moving the relevant object.

This patch modifies the ConfigurationManager of the following
platforms:
- Morello
- N1Sdp
for the following Arch Common object Id:
- EArchCommonObjPciConfigSpaceInfo

Signed-off-by: Pierre Gondois 
---
 .../ConfigurationManagerFvp.c | 20 ++---
 .../ConfigurationManagerFvp.h |  2 +-
 .../ConfigurationManager.c| 30 +++
 .../ConfigurationManager.h|  2 +-
 4 files changed, 29 insertions(+), 25 deletions(-)

diff --git 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerFvp.c
 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerFvp.c
index 32cf5e830fed..8d0973ddd8ed 100644
--- 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerFvp.c
+++ 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerFvp.c
@@ -463,6 +463,16 @@ GetArchCommonNameSpaceObjectPlat (
   PlatformRepo = This->PlatRepoInfo->FvpPlatRepoInfo;
 
   switch (GET_CM_OBJECT_ID (CmObjectId)) {
+case EArchCommonObjPciConfigSpaceInfo:
+  Status = HandleCmObject (
+ CmObjectId,
+ PlatformRepo->PciConfigInfo,
+ sizeof (PlatformRepo->PciConfigInfo),
+ 1,
+ CmObject
+ );
+  break;
+
   default:
 break;
   }
@@ -573,16 +583,6 @@ GetArmNameSpaceObjectPlat (
  );
   break;
 
-case EArmObjPciConfigSpaceInfo:
-  Status = HandleCmObject (
- CmObjectId,
- PlatformRepo->PciConfigInfo,
- sizeof (PlatformRepo->PciConfigInfo),
- 1,
- CmObject
- );
-  break;
-
 default: {
   break;
 }
diff --git 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerFvp.h
 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerFvp.h
index 4628b7a879aa..744b6095c16c 100644
--- 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerFvp.h
+++ 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerFvp.h
@@ -56,7 +56,7 @@ typedef struct FvpPlatformRepositoryInfo {
   CM_ARM_ID_MAPPING DeviceIdMapping[2][2];
 
   /// PCI configuration space information
-  CM_ARM_PCI_CONFIG_SPACE_INFO  PciConfigInfo[1];
+  CM_ARCH_COMMON_PCI_CONFIG_SPACE_INFO  PciConfigInfo[1];
 
 } EDKII_FVP_PLATFORM_REPOSITORY_INFO;
 
diff --git 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
index 85d5ccfbe85c..5713bb578029 100644
--- 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
+++ 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
@@ -1702,6 +1702,7 @@ GetArchCommonNameSpaceObject (
 {
   EFI_STATUSStatus;
   EDKII_PLATFORM_REPOSITORY_INFO  * PlatformRepo;
+  UINT32PciConfigInfoCount;
 
   if ((This == NULL) || (CmObject == NULL)) {
 ASSERT (This != NULL);
@@ -1712,6 +1713,12 @@ GetArchCommonNameSpaceObject (
   Status = EFI_NOT_FOUND;
   PlatformRepo = This->PlatRepoInfo;
 
+  if (PlatformRepo->PlatInfo->MultichipMode == 1) {
+PciConfigInfoCount = Root_pcie_max;
+  } else {
+PciConfigInfoCount = Root_pcie_master_chip_max;
+  }
+
   switch (GET_CM_OBJECT_ID (CmObjectId)) {
 case EArchCommonObjPowerManagementProfileInfo:
   Status = HandleCmObject (
@@ -1763,6 +1770,16 @@ GetArchCommonNameSpaceObject (
  );
   break;
 
+case EArchCommonObjPciConfigSpaceInfo:
+  Status = HandleCmObject (
+ CmObjectId,
+ PlatformRepo->PciConfigInfo,
+ sizeof (PlatformRepo->PciConfigInfo),
+ PciConfigInfoCount,
+ CmObject
+ );
+  break;
+
   default: {
   Status = EFI_NOT_FOUND;
   DEBUG ((
@@ -1811,7 +1828,6 @@ GetArmNameSpaceObject (
   UINT32SmmuV3InfoCount;
   UINT32DeviceIdMappingCount;
   UINT32RootComplexInfoCount;
-  UINT32PciConfigInfoCount;
 
   if ((This == NULL) || (CmObject == NULL)) {
 ASSERT (This != NULL);
@@ -1833,7 +1849,6 @@ GetArmNameSpaceObject (
 SmmuV3InfoCount = Smmuv3info_max;
 DeviceIdMappingCount = Devicemapping_max;
 RootComplexInfoCount = Root_pcie_max;
-PciConfigInfoCount = Root_pcie_max;
   } else {
 GicRedistCount = 1;
 

[edk2-devel] [platforms/devel-dynamictables-reorg PATCH 07/14] Platform/ARM: Morello,N1Sdp: Rename GicCToken

2024-06-10 Thread PierreGondois
From: Pierre Gondois 

Some DynamicTables objects have been moved from the Arm namespace
to a new Arch Common namespace. The following field:
  (struct CmArchCommonProcHierarchyInfo).GicCToken
was renamed to 'AcpiIdObjectToken'. Reflect this change in the
edk2-platforms repository.

This patch modifies the ConfigurationManager of the following
platforms:
- Morello
- N1Sdp

Signed-off-by: Pierre Gondois 
---
 .../ConfigurationManager.c| 14 +-
 .../ConfigurationManager.c| 28 +--
 2 files changed, 21 insertions(+), 21 deletions(-)

diff --git 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
index 7b6acd854fd3..640fdde96e2a 100644
--- 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
+++ 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
@@ -172,7 +172,7 @@ EDKII_COMMON_PLATFORM_REPOSITORY_INFO CommonPlatformInfo = {
   ),
   // CM_OBJECT_TOKEN  ParentToken
   CM_NULL_TOKEN,
-  // CM_OBJECT_TOKEN  GicCToken
+  // CM_OBJECT_TOKEN  AcpiIdObjectToken
   CM_NULL_TOKEN,
   // UINT32  NoOfPrivateResources
   SOC_RESOURCE_COUNT,
@@ -194,7 +194,7 @@ EDKII_COMMON_PLATFORM_REPOSITORY_INFO CommonPlatformInfo = {
   ),
   // CM_OBJECT_TOKEN  ParentToken
   REFERENCE_TOKEN (ProcHierarchyInfo[0]), // -> Package
-  // CM_OBJECT_TOKEN  GicCToken
+  // CM_OBJECT_TOKEN  AcpiIdObjectToken
   CM_NULL_TOKEN,
   // UINT32  NoOfPrivateResources
   CLUSTER_RESOURCE_COUNT,
@@ -215,7 +215,7 @@ EDKII_COMMON_PLATFORM_REPOSITORY_INFO CommonPlatformInfo = {
   ),
   // CM_OBJECT_TOKEN  ParentToken
   REFERENCE_TOKEN (ProcHierarchyInfo[0]), // -> Package
-  // CM_OBJECT_TOKEN  GicCToken
+  // CM_OBJECT_TOKEN  AcpiIdObjectToken
   CM_NULL_TOKEN,
   // UINT32  NoOfPrivateResources
   CLUSTER_RESOURCE_COUNT,
@@ -236,7 +236,7 @@ EDKII_COMMON_PLATFORM_REPOSITORY_INFO CommonPlatformInfo = {
   ),
   // CM_OBJECT_TOKEN  ParentToken
   REFERENCE_TOKEN (ProcHierarchyInfo[1]), // -> 'cluster in Cluster0
-  // CM_OBJECT_TOKEN  GicCToken
+  // CM_OBJECT_TOKEN  AcpiIdObjectToken
   REFERENCE_TOKEN (GicCInfo[0]),
   // UINT32  NoOfPrivateResources
   CORE_RESOURCE_COUNT,
@@ -257,7 +257,7 @@ EDKII_COMMON_PLATFORM_REPOSITORY_INFO CommonPlatformInfo = {
   ),
   // CM_OBJECT_TOKEN  ParentToken
   REFERENCE_TOKEN (ProcHierarchyInfo[1]), // -> 'cluster in Cluster0
-  // CM_OBJECT_TOKEN  GicCToken
+  // CM_OBJECT_TOKEN  AcpiIdObjectToken
   REFERENCE_TOKEN (GicCInfo[1]),
   // UINT32  NoOfPrivateResources
   CORE_RESOURCE_COUNT,
@@ -278,7 +278,7 @@ EDKII_COMMON_PLATFORM_REPOSITORY_INFO CommonPlatformInfo = {
   ),
   // CM_OBJECT_TOKEN  ParentToken
   REFERENCE_TOKEN (ProcHierarchyInfo[2]), // -> 'cluster in Cluster1
-  // CM_OBJECT_TOKEN  GicCToken
+  // CM_OBJECT_TOKEN  AcpiIdObjectToken
   REFERENCE_TOKEN (GicCInfo[2]),
   // UINT32  NoOfPrivateResources
   CORE_RESOURCE_COUNT,
@@ -300,7 +300,7 @@ EDKII_COMMON_PLATFORM_REPOSITORY_INFO CommonPlatformInfo = {
   ),
   // CM_OBJECT_TOKEN  ParentToken
   REFERENCE_TOKEN (ProcHierarchyInfo[2]), // -> 'cluster in Cluster1
-  // CM_OBJECT_TOKEN  GicCToken
+  // CM_OBJECT_TOKEN  AcpiIdObjectToken
   REFERENCE_TOKEN (GicCInfo[3]),
   // UINT32  NoOfPrivateResources
   CORE_RESOURCE_COUNT,
diff --git 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
index 5713bb578029..c23fa78038fa 100644
--- 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
+++ 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
@@ -341,7 +341,7 @@ EDKII_PLATFORM_REPOSITORY_INFO N1sdpRepositoryInfo = {
   ),
   // CM_OBJECT_TOKEN  ParentToken
   CM_NULL_TOKEN,
-  // CM_OBJECT_TOKEN  GicCToken
+  // CM_OBJECT_TOKEN  AcpiIdObjectToken
   CM_NULL_TOKEN,
   // UINT32  NoOfPrivateResources
   SOC_RESOURCE_COUNT,
@@ -362,7 +362,7 @@ EDKII_PLATFORM_REPOSITORY_INFO N1sdpRepositoryInfo = {
   ),
   // CM_OBJECT_TOKEN  ParentToken
   REFERENCE_TOKEN (ProcHierarchyInfo[0]), // -> Package
-  // CM_OBJECT_TOKEN  GicCToken
+  // CM_OBJECT_TOKEN  AcpiIdObjectToken
   CM_NULL_TOKEN,
   // UINT32  NoOfPrivateResources
   CLUSTER_RESOURCE_COUNT,
@@ -383,7 +383,7 @@ EDKII_PLATFORM_REPOSITORY_INFO N1sdpRepositoryInfo = {
   ),
   // CM_OBJECT_TOKEN  ParentToken
   REFERENCE_TOKEN (ProcHierarchyInfo[0]), // -> Package
-  // CM_OBJECT_TOKEN  GicCToken
+  // CM_OBJECT_TOKEN  

[edk2-devel] [platforms/devel-dynamictables-reorg PATCH 09/14] Platform/ARM: Morello,N1Sdp: Move Cache info to Arch Common

2024-06-10 Thread PierreGondois
From: Pierre Gondois 

Some DynamicTables objects have been moved from the Arm namespace
to a new Arch Common namespace. Reflect this change by
renaming/moving the relevant object.

This patch modifies the ConfigurationManager of the following
platforms:
- Morello
- N1Sdp
for the following Arch Common object Id:
- EArchCommonObjCacheInfo

Signed-off-by: Pierre Gondois 
---
 .../ConfigurationManager.c| 20 +--
 .../ConfigurationManager.h|  2 +-
 .../ConfigurationManager.c| 20 +--
 .../ConfigurationManager.h|  2 +-
 4 files changed, 22 insertions(+), 22 deletions(-)

diff --git 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
index 21e5a742345a..d3624462aa8a 100644
--- 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
+++ 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
@@ -863,6 +863,16 @@ GetArchCommonNameSpaceObject (
);
   break;
 
+  case EArchCommonObjCacheInfo:
+Status = HandleCmObject (
+   CmObjectId,
+   CommonPlatRepo->CacheInfo,
+   sizeof (CommonPlatRepo->CacheInfo),
+   ARRAY_SIZE (CommonPlatRepo->CacheInfo),
+   CmObject
+   );
+  break;
+
   default: {
   Status = EFI_NOT_FOUND;
   DEBUG ((
@@ -1002,16 +1012,6 @@ GetArmNameSpaceObject (
);
   break;
 
-  case EArmObjCacheInfo:
-Status = HandleCmObject (
-   CmObjectId,
-   CommonPlatRepo->CacheInfo,
-   sizeof (CommonPlatRepo->CacheInfo),
-   ARRAY_SIZE (CommonPlatRepo->CacheInfo),
-   CmObject
-   );
-  break;
-
   default: {
 Status = EFI_NOT_FOUND;
 DEBUG ((
diff --git 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
index df50b860c9a2..7b219083bcca 100644
--- 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
+++ 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
@@ -264,7 +264,7 @@ typedef struct CommonPlatformRepositoryInfo {
   CM_ARCH_COMMON_PROC_HIERARCHY_INFO
ProcHierarchyInfo[PLAT_PROC_HIERARCHY_NODE_COUNT];
 
   // Cache information
-  CM_ARM_CACHE_INFO CacheInfo[PLAT_CACHE_COUNT];
+  CM_ARCH_COMMON_CACHE_INFO CacheInfo[PLAT_CACHE_COUNT];
 
   // Cluster private resources
   CM_ARCH_COMMON_OBJ_REF
ClusterResources[CLUSTER_RESOURCE_COUNT];
diff --git 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
index 5c7a65afb43c..d90d81bffa9f 100644
--- 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
+++ 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
@@ -1793,6 +1793,16 @@ GetArchCommonNameSpaceObject (
  );
   break;
 
+case EArchCommonObjCacheInfo:
+  Status = HandleCmObject (
+ CmObjectId,
+ PlatformRepo->CacheInfo,
+ sizeof (PlatformRepo->CacheInfo),
+ ARRAY_SIZE (PlatformRepo->CacheInfo),
+ CmObject
+ );
+  break;
+
   default: {
   Status = EFI_NOT_FOUND;
   DEBUG ((
@@ -2027,16 +2037,6 @@ GetArmNameSpaceObject (
  );
   break;
 
-case EArmObjCacheInfo:
-  Status = HandleCmObject (
- CmObjectId,
- PlatformRepo->CacheInfo,
- sizeof (PlatformRepo->CacheInfo),
- ARRAY_SIZE (PlatformRepo->CacheInfo),
- CmObject
- );
-  break;
-
 case EArmObjMemoryAffinityInfo:
   Status = HandleCmObject (
  CmObjectId,
diff --git 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
index 54b0483d43ec..8a8e6e6c99a1 100644
--- 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
+++ 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
@@ -270,7 +270,7 @@ typedef struct PlatformRepositoryInfo {
   CM_ARCH_COMMON_PROC_HIERARCHY_INFO
ProcHierarchyInfo[PLAT_PROC_HIERARCHY_NODE_COUNT * 2];
 
   // Cache information
-  CM_ARM_CACHE_INFO 

[edk2-devel] [platforms/devel-dynamictables-reorg PATCH 08/14] Platform/ARM: Morello,N1Sdp: Move Proc Hierarchy info to Arch Common

2024-06-10 Thread PierreGondois
From: Pierre Gondois 

Some DynamicTables objects have been moved from the Arm namespace
to a new Arch Common namespace. Reflect this change by
renaming/moving the relevant object.

This patch modifies the ConfigurationManager of the following
platforms:
- Morello
- N1Sdp
for the following Arch Common object Id:
- EArchCommonObjProcHierarchyInfo

Signed-off-by: Pierre Gondois 
---
 .../ConfigurationManager.c| 20 +++---
 .../ConfigurationManager.h|  2 +-
 .../ConfigurationManager.c| 26 +--
 .../ConfigurationManager.h|  2 +-
 4 files changed, 25 insertions(+), 25 deletions(-)

diff --git 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
index 640fdde96e2a..21e5a742345a 100644
--- 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
+++ 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
@@ -853,6 +853,16 @@ GetArchCommonNameSpaceObject (
);
   break;
 
+  case EArchCommonObjProcHierarchyInfo:
+Status = HandleCmObject (
+   CmObjectId,
+   CommonPlatRepo->ProcHierarchyInfo,
+   sizeof (CommonPlatRepo->ProcHierarchyInfo),
+   PLAT_PROC_HIERARCHY_NODE_COUNT,
+   CmObject
+   );
+  break;
+
   default: {
   Status = EFI_NOT_FOUND;
   DEBUG ((
@@ -992,16 +1002,6 @@ GetArmNameSpaceObject (
);
   break;
 
-  case EArmObjProcHierarchyInfo:
-Status = HandleCmObject (
-   CmObjectId,
-   CommonPlatRepo->ProcHierarchyInfo,
-   sizeof (CommonPlatRepo->ProcHierarchyInfo),
-   PLAT_PROC_HIERARCHY_NODE_COUNT,
-   CmObject
-   );
-  break;
-
   case EArmObjCacheInfo:
 Status = HandleCmObject (
CmObjectId,
diff --git 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
index 96767e3fe888..df50b860c9a2 100644
--- 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
+++ 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
@@ -261,7 +261,7 @@ typedef struct CommonPlatformRepositoryInfo {
   CM_ARCH_COMMON_SERIAL_PORT_INFO   DbgSerialPort;
 
   // Processor topology information
-  CM_ARM_PROC_HIERARCHY_INFO
ProcHierarchyInfo[PLAT_PROC_HIERARCHY_NODE_COUNT];
+  CM_ARCH_COMMON_PROC_HIERARCHY_INFO
ProcHierarchyInfo[PLAT_PROC_HIERARCHY_NODE_COUNT];
 
   // Cache information
   CM_ARM_CACHE_INFO CacheInfo[PLAT_CACHE_COUNT];
diff --git 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
index c23fa78038fa..5c7a65afb43c 100644
--- 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
+++ 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
@@ -1703,6 +1703,7 @@ GetArchCommonNameSpaceObject (
   EFI_STATUSStatus;
   EDKII_PLATFORM_REPOSITORY_INFO  * PlatformRepo;
   UINT32PciConfigInfoCount;
+  UINT32ProcHierarchyInfoCount;
 
   if ((This == NULL) || (CmObject == NULL)) {
 ASSERT (This != NULL);
@@ -1715,8 +1716,10 @@ GetArchCommonNameSpaceObject (
 
   if (PlatformRepo->PlatInfo->MultichipMode == 1) {
 PciConfigInfoCount = Root_pcie_max;
+ProcHierarchyInfoCount = PLAT_PROC_HIERARCHY_NODE_COUNT * 2;
   } else {
 PciConfigInfoCount = Root_pcie_master_chip_max;
+ProcHierarchyInfoCount = PLAT_PROC_HIERARCHY_NODE_COUNT;
   }
 
   switch (GET_CM_OBJECT_ID (CmObjectId)) {
@@ -1780,6 +1783,16 @@ GetArchCommonNameSpaceObject (
  );
   break;
 
+case EArchCommonObjProcHierarchyInfo:
+  Status = HandleCmObject (
+ CmObjectId,
+ PlatformRepo->ProcHierarchyInfo,
+ sizeof (PlatformRepo->ProcHierarchyInfo),
+ ProcHierarchyInfoCount,
+ CmObject
+ );
+  break;
+
   default: {
   Status = EFI_NOT_FOUND;
   DEBUG ((
@@ -1821,7 +1834,6 @@ GetArmNameSpaceObject (
   EDKII_PLATFORM_REPOSITORY_INFO  * PlatformRepo;
   UINT32GicRedistCount;
   UINT32GicCpuCount;
-  UINT32ProcHierarchyInfoCount;
   UINT32GicItsInfoCount;
   UINT32

[edk2-devel] [platforms/devel-dynamictables-reorg PATCH 05/14] Platform/ARM: Morello,N1Sdp: Move CmRef info to Arch Common

2024-06-10 Thread PierreGondois
From: Pierre Gondois 

Some DynamicTables objects have been moved from the Arm namespace
to a new Arch Common namespace. Reflect this change by
renaming/moving the relevant object.

This patch modifies the ConfigurationManager of the following
platforms:
- Morello
- N1Sdp
for the following Arch Common object Id:
- EArchCommonObjCmRef

Signed-off-by: Pierre Gondois 
---
 .../ConfigurationManager.c| 22 +--
 .../ConfigurationManager.h|  6 ++---
 .../ConfigurationManager.c| 22 +--
 .../ConfigurationManager.h|  6 ++---
 4 files changed, 28 insertions(+), 28 deletions(-)

diff --git 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
index 0eef9ede01cb..7b6acd854fd3 100644
--- 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
+++ 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
@@ -650,7 +650,7 @@ GetGicCInfo (
   @param [in]  This   Pointer to the Configuration Manager 
Protocol.
   @param [in]  CmObjectId The Object ID of the CM object requested
   @param [in]  SearchTokenA unique token for identifying the requested
-  CM_ARM_OBJ_REF list.
+  CM_ARCH_COMMON_OBJ_REF list.
   @param [in, out] CmObject   Pointer to the Configuration Manager Object
   descriptor describing the requested Object.
 
@@ -843,6 +843,16 @@ GetArchCommonNameSpaceObject (
   break;
 #endif
 
+  case EArchCommonObjCmRef:
+Status = HandleCmObjectSearchPlatformRepo (
+   This,
+   CmObjectId,
+   Token,
+   GetCmObjRefs,
+   CmObject
+   );
+  break;
+
   default: {
   Status = EFI_NOT_FOUND;
   DEBUG ((
@@ -1002,16 +1012,6 @@ GetArmNameSpaceObject (
);
   break;
 
-  case EArmObjCmRef:
-Status = HandleCmObjectSearchPlatformRepo (
-   This,
-   CmObjectId,
-   Token,
-   GetCmObjRefs,
-   CmObject
-   );
-  break;
-
   default: {
 Status = EFI_NOT_FOUND;
 DEBUG ((
diff --git 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
index c2a34102b584..96767e3fe888 100644
--- 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
+++ 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
@@ -267,13 +267,13 @@ typedef struct CommonPlatformRepositoryInfo {
   CM_ARM_CACHE_INFO CacheInfo[PLAT_CACHE_COUNT];
 
   // Cluster private resources
-  CM_ARM_OBJ_REF
ClusterResources[CLUSTER_RESOURCE_COUNT];
+  CM_ARCH_COMMON_OBJ_REF
ClusterResources[CLUSTER_RESOURCE_COUNT];
 
   // Core private resources
-  CM_ARM_OBJ_REFCoreResources[CORE_RESOURCE_COUNT];
+  CM_ARCH_COMMON_OBJ_REFCoreResources[CORE_RESOURCE_COUNT];
 
   // SoC Resources
-  CM_ARM_OBJ_REFSocResources[SOC_RESOURCE_COUNT];
+  CM_ARCH_COMMON_OBJ_REFSocResources[SOC_RESOURCE_COUNT];
 
 } EDKII_COMMON_PLATFORM_REPOSITORY_INFO;
 
diff --git 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
index 20a0f276a164..85d5ccfbe85c 100644
--- 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
+++ 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
@@ -1557,7 +1557,7 @@ GetGicCInfo (
   @param [in]ThisPointer to the Configuration Manager Protocol.
   @param [in]CmObjectId  The Object ID of the CM object requested
   @param [in]SearchToken A unique token for identifying the requested
- CM_ARM_OBJ_REF list.
+ CM_ARCH_COMMON_OBJ_REF list.
   @param [in, out]   CmObjectPointer to the Configuration Manager Object
  descriptor describing the requested Object.
 
@@ -1753,6 +1753,16 @@ GetArchCommonNameSpaceObject (
  );
   break;
 
+case EArchCommonObjCmRef:
+  Status = HandleCmObjectSearchPlatformRepo (
+ This,
+ CmObjectId,
+ Token,
+ GetCmObjRefs,
+ CmObject
+ );
+  break;
+
   

[edk2-devel] [platforms/devel-dynamictables-reorg PATCH 04/14] Platform/ARM: Morello,N1Sdp: Move Fixed Feat Flags info to Arch Common

2024-06-10 Thread PierreGondois
From: Pierre Gondois 

Some DynamicTables objects have been moved from the Arm namespace
to a new Arch Common namespace. Reflect this change by
renaming/moving the relevant object.

This patch modifies the ConfigurationManager of the following
platforms:
- Morello
- N1Sdp
for the following Arch Common object Id:
- EArchCommonObjFixedFeatureFlags

Signed-off-by: Pierre Gondois 
---
 .../ConfigurationManager.c| 24 +--
 .../ConfigurationManager.h|  2 +-
 .../ConfigurationManager.c| 20 
 .../ConfigurationManager.h|  2 +-
 4 files changed, 24 insertions(+), 24 deletions(-)

diff --git 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
index b4c0af1307b1..0eef9ede01cb 100644
--- 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
+++ 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
@@ -831,6 +831,18 @@ GetArchCommonNameSpaceObject (
);
   break;
 
+#ifdef HEADLESS_PLATFORM
+  case EArchCommonObjFixedFeatureFlags:
+Status = HandleCmObject (
+   CmObjectId,
+   >FixedFeatureFlags,
+   sizeof (CommonPlatRepo->FixedFeatureFlags),
+   1,
+   CmObject
+   );
+  break;
+#endif
+
   default: {
   Status = EFI_NOT_FOUND;
   DEBUG ((
@@ -894,18 +906,6 @@ GetArmNameSpaceObject (
);
   break;
 
-#ifdef HEADLESS_PLATFORM
-  case EArmObjFixedFeatureFlags:
-Status = HandleCmObject (
-   CmObjectId,
-   >FixedFeatureFlags,
-   sizeof (CommonPlatRepo->FixedFeatureFlags),
-   1,
-   CmObject
-   );
-  break;
-#endif
-
   case EArmObjGenericTimerInfo:
 Status = HandleCmObject (
CmObjectId,
diff --git 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
index 2a35494bcc81..c2a34102b584 100644
--- 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
+++ 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
@@ -225,7 +225,7 @@ typedef struct CommonPlatformRepositoryInfo {
 
 #ifdef HEADLESS_PLATFORM
   /// Fixed feature flag information
-  CM_ARM_FIXED_FEATURE_FLAGSFixedFeatureFlags;
+  CM_ARCH_COMMON_FIXED_FEATURE_FLAGSFixedFeatureFlags;
 #endif
 
   /// Power management profile information
diff --git 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
index 21180e8f2d51..20a0f276a164 100644
--- 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
+++ 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
@@ -1743,6 +1743,16 @@ GetArchCommonNameSpaceObject (
  );
   break;
 
+case EArchCommonObjFixedFeatureFlags:
+  Status = HandleCmObject (
+ CmObjectId,
+ >FixedFeatureFlags,
+ sizeof (PlatformRepo->FixedFeatureFlags),
+ 1,
+ CmObject
+ );
+  break;
+
   default: {
   Status = EFI_NOT_FOUND;
   DEBUG ((
@@ -1838,16 +1848,6 @@ GetArmNameSpaceObject (
  );
   break;
 
-case EArmObjFixedFeatureFlags:
-  Status = HandleCmObject (
- CmObjectId,
- >FixedFeatureFlags,
- sizeof (PlatformRepo->FixedFeatureFlags),
- 1,
- CmObject
- );
-  break;
-
 case EArmObjGenericTimerInfo:
   Status = HandleCmObject (
  CmObjectId,
diff --git 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
index cb87b58a68ff..0c0e2b5aa43b 100644
--- 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
+++ 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
@@ -229,7 +229,7 @@ typedef struct PlatformRepositoryInfo {
   CM_ARM_BOOT_ARCH_INFO BootArchInfo;
 
   /// Fixed feature flag information
-  CM_ARM_FIXED_FEATURE_FLAGSFixedFeatureFlags;
+  CM_ARCH_COMMON_FIXED_FEATURE_FLAGSFixedFeatureFlags;
 
   /// Power management profile information
   CM_ARCH_COMMON_POWER_MANAGEMENT_PROFILE_INFO  

[edk2-devel] [platforms/devel-dynamictables-reorg PATCH 03/14] Platform/ARM: Morello,N1Sdp: Move Serial Port info to Arch Common

2024-06-10 Thread PierreGondois
From: Pierre Gondois 

Some DynamicTables objects have been moved from the Arm namespace
to a new Arch Common namespace. Reflect this change by
renaming/moving the relevant object.

This patch modifies the ConfigurationManager of the following
platforms:
- Morello
- N1Sdp
for the following Arch Common object Id:
- EArchCommonObjConsolePortInfo
- EArchCommonObjSerialDebugPortInfo

Signed-off-by: Pierre Gondois 
---
 .../ConfigurationManager.c| 40 +--
 .../ConfigurationManager.h|  4 +-
 .../ConfigurationManager.c| 40 +--
 .../ConfigurationManager.h|  4 +-
 4 files changed, 44 insertions(+), 44 deletions(-)

diff --git 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
index 098199bbaa58..b4c0af1307b1 100644
--- 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
+++ 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
@@ -811,6 +811,26 @@ GetArchCommonNameSpaceObject (
);
   break;
 
+  case EArchCommonObjConsolePortInfo:
+Status = HandleCmObject (
+   CmObjectId,
+   >SpcrSerialPort,
+   sizeof (CommonPlatRepo->SpcrSerialPort),
+   1,
+   CmObject
+   );
+  break;
+
+  case EArchCommonObjSerialDebugPortInfo:
+Status = HandleCmObject (
+   CmObjectId,
+   >DbgSerialPort,
+   sizeof (CommonPlatRepo->DbgSerialPort),
+   1,
+   CmObject
+   );
+  break;
+
   default: {
   Status = EFI_NOT_FOUND;
   DEBUG ((
@@ -962,26 +982,6 @@ GetArmNameSpaceObject (
);
   break;
 
-  case EArmObjSerialConsolePortInfo:
-Status = HandleCmObject (
-   CmObjectId,
-   >SpcrSerialPort,
-   sizeof (CommonPlatRepo->SpcrSerialPort),
-   1,
-   CmObject
-   );
-  break;
-
-  case EArmObjSerialDebugPortInfo:
-Status = HandleCmObject (
-   CmObjectId,
-   >DbgSerialPort,
-   sizeof (CommonPlatRepo->DbgSerialPort),
-   1,
-   CmObject
-   );
-  break;
-
   case EArmObjProcHierarchyInfo:
 Status = HandleCmObject (
CmObjectId,
diff --git 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
index 2881ed871bd6..2a35494bcc81 100644
--- 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
+++ 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
@@ -255,10 +255,10 @@ typedef struct CommonPlatformRepositoryInfo {
   /** Serial port information for the
   serial port console redirection port
   */
-  CM_ARM_SERIAL_PORT_INFO   SpcrSerialPort;
+  CM_ARCH_COMMON_SERIAL_PORT_INFO   SpcrSerialPort;
 
   /// Serial port information for the DBG2 UART port
-  CM_ARM_SERIAL_PORT_INFO   DbgSerialPort;
+  CM_ARCH_COMMON_SERIAL_PORT_INFO   DbgSerialPort;
 
   // Processor topology information
   CM_ARM_PROC_HIERARCHY_INFO
ProcHierarchyInfo[PLAT_PROC_HIERARCHY_NODE_COUNT];
diff --git 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
index 3b72d7705703..21180e8f2d51 100644
--- 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
+++ 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
@@ -1723,6 +1723,26 @@ GetArchCommonNameSpaceObject (
  );
   break;
 
+case EArchCommonObjConsolePortInfo:
+  Status = HandleCmObject (
+ CmObjectId,
+ >SpcrSerialPort,
+ sizeof (PlatformRepo->SpcrSerialPort),
+ 1,
+ CmObject
+ );
+  break;
+
+case  EArchCommonObjSerialDebugPortInfo:
+  Status = HandleCmObject (
+ CmObjectId,
+ >DbgSerialPort,
+ sizeof (PlatformRepo->DbgSerialPort),
+ 1,
+ CmObject
+ );
+  break;
+
   default: {
   Status = EFI_NOT_FOUND;
   DEBUG ((
@@ -1904,26 +1924,6 @@ GetArmNameSpaceObject (
  );
   break;
 
-case EArmObjSerialConsolePortInfo:
-  Status = HandleCmObject (
-   

[edk2-devel] [platforms/devel-dynamictables-reorg PATCH 02/14] Platform/ARM: Morello,N1Sdp: Move Power Mgmt Profile info to Arch Common

2024-06-10 Thread PierreGondois
From: Pierre Gondois 

Some DynamicTables objects have been moved from the Arm namespace
to a new Arch Common namespace. Reflect this change by
renaming/moving the relevant object.

This patch modifies the ConfigurationManager of the following
platforms:
- Morello
- N1Sdp
for the following Arch Common object Id:
- EArchCommonObjPowerManagementProfileInfo

Signed-off-by: Pierre Gondois 
---
 .../ConfigurationManager.c| 21 +-
 .../ConfigurationManager.h|  4 ++--
 .../ConfigurationManager.c| 22 +--
 .../ConfigurationManager.h|  4 ++--
 4 files changed, 26 insertions(+), 25 deletions(-)

diff --git 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
index 95fbb997483b..098199bbaa58 100644
--- 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
+++ 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
@@ -801,7 +801,17 @@ GetArchCommonNameSpaceObject (
   CommonPlatRepo = This->PlatRepoInfo->CommonPlatRepoInfo;
 
   switch (GET_CM_OBJECT_ID (CmObjectId)) {
-default: {
+  case EArchCommonObjPowerManagementProfileInfo:
+Status = HandleCmObject (
+   CmObjectId,
+   >PmProfileInfo,
+   sizeof (CommonPlatRepo->PmProfileInfo),
+   1,
+   CmObject
+   );
+  break;
+
+  default: {
   Status = EFI_NOT_FOUND;
   DEBUG ((
 DEBUG_INFO,
@@ -875,15 +885,6 @@ GetArmNameSpaceObject (
);
   break;
 #endif
-  case EArmObjPowerManagementProfileInfo:
-Status = HandleCmObject (
-   CmObjectId,
-   >PmProfileInfo,
-   sizeof (CommonPlatRepo->PmProfileInfo),
-   1,
-   CmObject
-   );
-  break;
 
   case EArmObjGenericTimerInfo:
 Status = HandleCmObject (
diff --git 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
index 09ebc9a84274..2881ed871bd6 100644
--- 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
+++ 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
@@ -1,6 +1,6 @@
 /** @file
 
-  Copyright (c) 2021, ARM Limited. All rights reserved.
+  Copyright (c) 2021 - 2024, ARM Limited. All rights reserved.
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -229,7 +229,7 @@ typedef struct CommonPlatformRepositoryInfo {
 #endif
 
   /// Power management profile information
-  CM_ARM_POWER_MANAGEMENT_PROFILE_INFO  PmProfileInfo;
+  CM_ARCH_COMMON_POWER_MANAGEMENT_PROFILE_INFO  PmProfileInfo;
 
   /// GIC CPU interface information
   CM_ARM_GICC_INFO  GicCInfo[PLAT_CPU_COUNT];
diff --git 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
index 99c01297944c..3b72d7705703 100644
--- 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
+++ 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
@@ -1713,7 +1713,17 @@ GetArchCommonNameSpaceObject (
   PlatformRepo = This->PlatRepoInfo;
 
   switch (GET_CM_OBJECT_ID (CmObjectId)) {
-default: {
+case EArchCommonObjPowerManagementProfileInfo:
+  Status = HandleCmObject (
+ CmObjectId,
+ >PmProfileInfo,
+ sizeof (PlatformRepo->PmProfileInfo),
+ 1,
+ CmObject
+ );
+  break;
+
+  default: {
   Status = EFI_NOT_FOUND;
   DEBUG ((
 DEBUG_INFO,
@@ -1818,16 +1828,6 @@ GetArmNameSpaceObject (
  );
   break;
 
-case EArmObjPowerManagementProfileInfo:
-  Status = HandleCmObject (
- CmObjectId,
- >PmProfileInfo,
- sizeof (PlatformRepo->PmProfileInfo),
- 1,
- CmObject
- );
-  break;
-
 case EArmObjGenericTimerInfo:
   Status = HandleCmObject (
  CmObjectId,
diff --git 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
index ea9cb20ba752..dc15f17eb626 100644
--- 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
+++ 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
@@ -1,6 +1,6 @@
 /** 

[edk2-devel] [platforms/devel-dynamictables-reorg PATCH 00/14] Platform: N1Sdp,Morello,NXP: Move DynamicTablesPkg obj to Arch Common

2024-06-10 Thread PierreGondois
From: Pierre Gondois 

Patches for the DynamicTablesPkg reorg branches are still sent
through the mailing list for now. A branch with the patches is
available at:
https://github.com/pierregondois/edk2-platforms/pull/new/pg/Morello_N1Sdp_NXP_plat_reorg
 

References:
- edk2 reorg branch:
  https://github.com/tianocore/edk2-staging/tree/dynamictables-reorg
- edk2-platforms reorg branch:
  https://github.com/tianocore/edk2-platforms/tree/devel-dynamictables-reorg
- Previous serie for FVP, Juno platforms:
  https://edk2.groups.io/g/devel/message/117001

Other architectures than Arm aim to leverage the DynamicTablesPkg.
The package uses namespaces/domains to split objects IDs. Currently
most of the objects are part of the Arm namespace. Some objects are
generic enough to be re-used by other architectures.

Update the following platforms which use the DynamicTablesPkg
framework/objects:
- Platform/ARM/N1Sdp
- Platform/ARM/Morello
- Platform/NXP/ConfigurationManagerPkg
now that the following platforms have already been updated:
- Juno
- VExpress

Cc: Sami Mujawar 
Cc: Pierre Gondois 
Cc: Yeo Reum Yun 
Cc: Sunil V L 
Cc: AbdulLateef Attar 
Cc: Jeshua Smith 
Cc: Jeff Brasen 
Cc: Girish Mahadevan 
Cc: Leif Lindholm 
Cc: Meenakshi Aggarwal 

Pierre Gondois (14):
  Platform/ARM: Morello,N1Sdp: Add Arch Common objects handler
  Platform/ARM: Morello,N1Sdp: Move Power Mgmt Profile info to Arch
Common
  Platform/ARM: Morello,N1Sdp: Move Serial Port info to Arch Common
  Platform/ARM: Morello,N1Sdp: Move Fixed Feat Flags info to Arch Common
  Platform/ARM: Morello,N1Sdp: Move CmRef info to Arch Common
  Platform/ARM: Morello,N1Sdp: Move Pci Config Space info to Arch Common
  Platform/ARM: Morello,N1Sdp: Rename GicCToken
  Platform/ARM: Morello,N1Sdp: Move Proc Hierarchy info to Arch Common
  Platform/ARM: Morello,N1Sdp: Move Cache info to Arch Common
  Platform/ARM: N1Sdp: Move Memory Affinity info to Arch Common
  Platform/NXP: Add Arch Common objects handler
  Platform/NXP: Move Power Mgmt Profile info to Arch Common
  Platform/NXP: Move Serial Port info to Arch Common
  Platform/NXP: Move Pci Config Space info to Arch Common

 .../ConfigurationManager.c| 216 +-
 .../ConfigurationManager.h|  20 +-
 .../ConfigurationManagerFvp.c |  65 +++-
 .../ConfigurationManagerFvp.h |   2 +-
 .../ConfigurationManager.c| 281 +++---
 .../ConfigurationManager.h|  24 +-
 .../ConfigurationManager.c| 120 ++--
 .../ConfigurationManager.h|   7 +-
 8 files changed, 473 insertions(+), 262 deletions(-)

-- 
2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119520): https://edk2.groups.io/g/devel/message/119520
Mute This Topic: https://groups.io/mt/106589338/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [platforms/devel-dynamictables-reorg PATCH 01/14] Platform/ARM: Morello,N1Sdp: Add Arch Common objects handler

2024-06-10 Thread PierreGondois
From: Pierre Gondois 

Some DynamicTables objects have been moved from the Arm namespace
to a new Arch Common namespace. Prepare the handling of these objects
in the ConfigurationManagers by adding a function handler for these
objects.

This patch modifies the ConfigurationManager of the following
platforms:
- Morello
- N1Sdp

Signed-off-by: Pierre Gondois 
---
 .../ConfigurationManager.c| 57 ++-
 .../ConfigurationManagerFvp.c | 45 ++-
 .../ConfigurationManager.c| 55 +-
 3 files changed, 154 insertions(+), 3 deletions(-)

diff --git 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
index 7c949812ecef..95fbb997483b 100644
--- 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
+++ 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
@@ -1,7 +1,7 @@
 /** @file
   Configuration Manager Dxe
 
-  Copyright (c) 2021, ARM Limited. All rights reserved.
+  Copyright (c) 2021 - 2024, Arm Limited. All rights reserved.
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -764,6 +764,58 @@ GetStandardNameSpaceObject (
   return Status;
 }
 
+/** Return an Arch Common namespace object.
+
+  @param [in]  ThisPointer to the Configuration Manager Protocol.
+  @param [in]  CmObjectId  The Configuration Manager Object ID.
+  @param [in]  Token   An optional token identifying the object. If
+   unused this must be CM_NULL_TOKEN.
+  @param [in, out] CmObjectPointer to the Configuration Manager Object
+   descriptor describing the requested Object.
+
+  @retval EFI_SUCCESS   Success.
+  @retval EFI_INVALID_PARAMETER A parameter is invalid.
+  @retval EFI_NOT_FOUND The required object information is not found.
+**/
+EFI_STATUS
+EFIAPI
+GetArchCommonNameSpaceObject (
+  IN  CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL  * CONST This,
+  IN  CONST CM_OBJECT_ID  CmObjectId,
+  IN  CONST CM_OBJECT_TOKEN   Token OPTIONAL,
+  IN  OUT   CM_OBJ_DESCRIPTOR * CONST CmObject
+  )
+{
+  EFI_STATUS Status;
+  EDKII_PLATFORM_REPOSITORY_INFO *PlatformRepo;
+  EDKII_COMMON_PLATFORM_REPOSITORY_INFO  *CommonPlatRepo;
+
+  if ((This == NULL) || (CmObject == NULL)) {
+ASSERT (This != NULL);
+ASSERT (CmObject != NULL);
+return EFI_INVALID_PARAMETER;
+  }
+
+  Status = EFI_NOT_FOUND;
+  PlatformRepo = This->PlatRepoInfo;
+  CommonPlatRepo = This->PlatRepoInfo->CommonPlatRepoInfo;
+
+  switch (GET_CM_OBJECT_ID (CmObjectId)) {
+default: {
+  Status = EFI_NOT_FOUND;
+  DEBUG ((
+DEBUG_INFO,
+"INFO: Object 0x%x. Status = %r\n",
+CmObjectId,
+Status
+));
+  break;
+}
+  } //switch
+
+  return Status;
+}
+
 /** Return an ARM namespace object.
 
   @param [in]  ThisPointer to the Configuration Manager Protocol.
@@ -1057,6 +1109,9 @@ MorelloPlatformGetObject (
 case EObjNameSpaceStandard:
   Status = GetStandardNameSpaceObject (This, CmObjectId, Token, CmObject);
   break;
+case EObjNameSpaceArchCommon:
+  Status = GetArchCommonNameSpaceObject (This, CmObjectId, Token, 
CmObject);
+  break;
 case EObjNameSpaceArm:
   Status = GetArmNameSpaceObject (This, CmObjectId, Token, CmObject);
   break;
diff --git 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerFvp.c
 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerFvp.c
index 85b0d390598f..32cf5e830fed 100644
--- 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerFvp.c
+++ 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerFvp.c
@@ -1,7 +1,7 @@
 /** @file
   Configuration Manager Dxe
 
-  Copyright (c) 2021, ARM Limited. All rights reserved.
+  Copyright (c) 2021 - 2024, Arm Limited. All rights reserved.
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -427,6 +427,49 @@ GetItsGroupInfo (
   return EFI_NOT_FOUND;
 }
 
+
+/** Return platform specific arch common namespace object.
+
+  @param [in]  ThisPointer to the Configuration Manager Protocol.
+  @param [in]  CmObjectId  The Configuration Manager Object ID.
+  @param [in]  Token   An optional token identifying the object. If
+   unused this must be CM_NULL_TOKEN.
+  @param [in, out] CmObjectPointer to the Configuration Manager Object
+   descriptor describing the requested Object.
+
+  @retval EFI_SUCCESS   Success.
+  @retval EFI_INVALID_PARAMETER A parameter is invalid.
+