public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] ACPI table generators and ConfigurationManagerProtocol
@ 2023-10-08 17:25 Marcin Juszkiewicz
  0 siblings, 0 replies; 5+ messages in thread
From: Marcin Juszkiewicz @ 2023-10-08 17:25 UTC (permalink / raw)
  To: devel

Can someone point me to documentation on how to use ACPI table 
generators and ConfigurationManagerProtocol? And tell which of platforms 
is a good example of using those?

 From first look it seems like using ACPI table generators may allow to 
simplify code by not creating tables by hand (or in ASL). I would like 
to do some changes around SBSA Reference Platform without rewriting ASL 
into C again.

I am aware that moving platform to use configuration manager may require 
even more work.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109401): https://edk2.groups.io/g/devel/message/109401
Mute This Topic: https://groups.io/mt/101836886/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] ACPI table generators and ConfigurationManagerProtocol
       [not found] <178C31CFE9B284CD.5378@groups.io>
@ 2024-04-12 12:43 ` Marcin Juszkiewicz
  2024-04-12 14:08   ` Gerd Hoffmann
       [not found] ` <17C588EF15E93250.19773@groups.io>
  1 sibling, 1 reply; 5+ messages in thread
From: Marcin Juszkiewicz @ 2024-04-12 12:43 UTC (permalink / raw)
  To: devel; +Cc: Sami Mujawar, Evan Lloyd

W dniu 8.10.2023 o 19:25, Marcin Juszkiewicz via groups.io pisze:

I hate replying to myself after half a year of not seeing any answer. So 
added some people from repo to Cc:

> Can someone point me to documentation on how to use ACPI table 
> generators and ConfigurationManagerProtocol?

https://github.com/tianocore/edk2/blob/master/DynamicTablesPkg/Readme.md 
tells the story and points to presentation from 2018 with some pictures 
in it.

Looks like the only documentation is the code itself. Is checkout of 
some old tree and looking change by change how it was done on some 
platform the easiest way to find out how to use it?

> And tell which of platforms is a good example of using those?

Juno, FVP, Morello, N1SDP, one NXP platform and ArmVirt use them. 
Probably the last one would be best to look at but who knows...

> From first look it seems like using ACPI table generators may allow 
> to simplify code by not creating tables by hand (or in ASL). I would
> like to do some changes around SBSA Reference Platform without 
> rewriting ASL into C again.

In meantime I rewrote some ASL into C. Again. Now need a way to generate 
DSDT for PCIe buses. Can write something in C again. But do I really 
need to?

> I am aware that moving platform to use configuration manager may 
> require even more work.

The more I look at */ConfigurationManager.[ch] the more I do not like 
the amount of static structures there. All those 
EDKII_PLATFORM_REPOSITORY_INFO covering 1000 lines looks like "how the 
hell I will find what to change in other piece of code".

Any doc pointers? Recommendations (other than "change your job")?


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117666): https://edk2.groups.io/g/devel/message/117666
Mute This Topic: https://groups.io/mt/105481311/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] ACPI table generators and ConfigurationManagerProtocol
  2024-04-12 12:43 ` [edk2-devel] ACPI table generators and ConfigurationManagerProtocol Marcin Juszkiewicz
@ 2024-04-12 14:08   ` Gerd Hoffmann
  0 siblings, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2024-04-12 14:08 UTC (permalink / raw)
  To: devel, marcin.juszkiewicz; +Cc: Sami Mujawar, Evan Lloyd

  Hi,

> > And tell which of platforms is a good example of using those?
> 
> Juno, FVP, Morello, N1SDP, one NXP platform and ArmVirt use them. Probably
> the last one would be best to look at but who knows...

Probably not ArmVirt.  At least not the qemu variant, maybe the kvmtool
version.

On qemu the usual workflow is that qemu generates the acpi tables,
matching the virtual machine configuration, and the firmware just
downloads and installs them.

> > From first look it seems like using ACPI table generators may allow to
> > simplify code by not creating tables by hand (or in ASL). I would
> > like to do some changes around SBSA Reference Platform without rewriting
> > ASL into C again.
> 
> In meantime I rewrote some ASL into C. Again. Now need a way to generate
> DSDT for PCIe buses. Can write something in C again. But do I really need
> to?

Is there a non-qemu implementation of the SBSA Reference Platform?
If not it might be easiest to offload acpi table generation to qemu.

If the acpi tables are not changing you might have a look at
OvmfPkg/Bhyve/AcpiTables instead of going for DynamicTablesPkg.

take care,
  Gerd



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117668): https://edk2.groups.io/g/devel/message/117668
Mute This Topic: https://groups.io/mt/105481311/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] ACPI table generators and ConfigurationManagerProtocol
       [not found] ` <17C588EF15E93250.19773@groups.io>
@ 2024-04-16  7:38   ` Marcin Juszkiewicz
       [not found]   ` <17C6B2A6AFC6832B.12347@groups.io>
  1 sibling, 0 replies; 5+ messages in thread
From: Marcin Juszkiewicz @ 2024-04-16  7:38 UTC (permalink / raw)
  To: devel

W dniu 12.04.2024 o 14:43, Marcin Juszkiewicz via groups.io pisze:
> W dniu 8.10.2023 o 19:25, Marcin Juszkiewicz via groups.io pisze:
> 
> I hate replying to myself after half a year of not seeing any answer. So 
> added some people from repo to Cc:
> 
>> Can someone point me to documentation on how to use ACPI table 
>> generators and ConfigurationManagerProtocol?
> 
> https://github.com/tianocore/edk2/blob/master/DynamicTablesPkg/Readme.md 
> tells the story and points to presentation from 2018 with some pictures 
> in it.
> 
> Looks like the only documentation is the code itself. Is checkout of 
> some old tree and looking change by change how it was done on some 
> platform the easiest way to find out how to use it?

> The more I look at */ConfigurationManager.[ch] the more I do not like 
> the amount of static structures there. All those 
> EDKII_PLATFORM_REPOSITORY_INFO covering 1000 lines looks like "how the 
> hell I will find what to change in other piece of code".
> 
> Any doc pointers? Recommendations (other than "change your job")?

I have spent two days on trying ConfigurationManager and finally gave 
up. The idea behind may look interesting but implementation of it is 
terrible. And there is no documentation for it.

Edk2_Platform_Repo_Info struct full of other structs can be one thousand 
lines long. Then are functions to query those structs - which can take 
almost another thousand lines.

For hardware where amount of system components is known and does not 
change it may be tempting. For those like sbsa-ref/QemuSbsa it means 
extra code to fill struct of structs with hardware details (cpu nodes, 
gic nodes, cpu topology/hierarchy/cache info etc).

So I am going back to how "my" platform is done. Probably will learn 
AmlLib to create DSDT from C code.


And if someone considers using ConfigurationManager for their platform: 
please reconsider it as it may not be worth your time.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117856): https://edk2.groups.io/g/devel/message/117856
Mute This Topic: https://groups.io/mt/105481311/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] ACPI table generators and ConfigurationManagerProtocol
       [not found]   ` <17C6B2A6AFC6832B.12347@groups.io>
@ 2024-04-16  9:02     ` Marcin Juszkiewicz
  0 siblings, 0 replies; 5+ messages in thread
From: Marcin Juszkiewicz @ 2024-04-16  9:02 UTC (permalink / raw)
  To: devel

W dniu 16.04.2024 o 09:38, Marcin Juszkiewicz via groups.io pisze:
> And if someone considers using ConfigurationManager for their platform: 
> please reconsider it as it may not be worth your time.

Wrote blog post about my adventure with CM:

https://marcin.juszkiewicz.com.pl/2024/04/16/configurationmanager-in-edk2-just-say-no/


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117868): https://edk2.groups.io/g/devel/message/117868
Mute This Topic: https://groups.io/mt/105481311/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-04-16  9:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <178C31CFE9B284CD.5378@groups.io>
2024-04-12 12:43 ` [edk2-devel] ACPI table generators and ConfigurationManagerProtocol Marcin Juszkiewicz
2024-04-12 14:08   ` Gerd Hoffmann
     [not found] ` <17C588EF15E93250.19773@groups.io>
2024-04-16  7:38   ` Marcin Juszkiewicz
     [not found]   ` <17C6B2A6AFC6832B.12347@groups.io>
2024-04-16  9:02     ` Marcin Juszkiewicz
2023-10-08 17:25 Marcin Juszkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox