public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [PATCH edk2-platforms v6 0/7] get rid of DeviceTree from SbsaQemu
@ 2024-03-06 11:41 Marcin Juszkiewicz
  2024-03-06 11:41 ` [edk2-devel] [PATCH edk2-platforms v6 1/7] Platform/SbsaQemu: add SbsaQemuHardwareInfoLib Marcin Juszkiewicz
                   ` (6 more replies)
  0 siblings, 7 replies; 19+ messages in thread
From: Marcin Juszkiewicz @ 2024-03-06 11:41 UTC (permalink / raw)
  To: devel
  Cc: Leif Lindholm, Ard Biesheuvel, Graeme Gregory, Xiong Yining,
	Chen Baozi, Marcin Juszkiewicz

We want to stop parsing DeviceTree to gather hardware information.

Instead we ask TF-A for those details using SMC calls. On real hardware
platform it could be asking on-board Embedded Controller.

Hardware information (CPU, Memory) is now in SbsaQemuHardwareInfoLib
together with new code for handling SMC stuff. If TF-A answer to SMC
call would be not success then we go back to parsing DeviceTree data
directly. There is no DT parsing elsewhere.

I hope that we can drop FdtHandler part as part of 202411 release.

TF-A part: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/25707

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
---
Changes in v6 (Marcin Juszkiewicz):
- patch 5 now shutdowns system in case of no CPU information

Changes in v5 (Xiong Yining):
- added missing patch
- Link to v5: https://openfw.io/edk2-devel/20240131132400.3022662-1-xiongyining1480@phytium.com.cn/

Changes in v4 (Xiong Yining):
- patch 6 add the support for getting the hardware information of memory via SMC calls.
- patch 7 add the callback of DeviceTree when SMC calls defined on patch 6 failled.
- replace FdtHelperGetMpidr() with SbsaQemuGetMpidr() on patch 4 to compile successfully.
- Link to v4: https://openfw.io/edk2-devel/20240131100027.2538549-1-xiongyining1480@phytium.com.cn/

Changes in v3:
- added SMC_SIP_CALL_SUCCESS
- on SMC call fail tell that SMC call failed instead of blaming TF-A
- hang when there is no cpu information (TODO: shutdown instead)
- Link to v3: https://openfw.io/edk2-devel/20240124-no-dt-for-cpu-v3-0-5375fcf09037@linaro.org/

---
Marcin Juszkiewicz (5):
      Platform/SbsaQemu: add SbsaQemuHardwareInfoLib
      Platform/SbsaQemu: read amount of cpus during init
      Platform/SbsaQemu: use PcdCoreCount directly
      Platform/SbsaQemu: move FdtHandlerLib to SbsaQemuHardwareInfoLib
      Platform/SbsaQemu: hang if there is no cpu information

Xiong Yining (2):
      Platform/SbsaQemu: get the information of memory via SMC calls
      Platform/SbsaQemu: add DeviceTree fallbacks to parse memory information

 Platform/Qemu/SbsaQemu/SbsaQemu.dsc                 |   4 +-
 Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf    |   6 +-
 .../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf     |   4 +-
 .../SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf     |   4 +-
 .../SbsaQemu/Library/FdtHelperLib/FdtHelperLib.inf  |  33 --
 .../SbsaQemuHardwareInfoLib.inf                     |  36 ++
 .../SbsaQemu/Library/SbsaQemuLib/SbsaQemuLib.inf    |   2 +-
 .../SbsaQemu/Include/IndustryStandard/SbsaQemuSmc.h |  17 +-
 .../Qemu/SbsaQemu/Include/Library/FdtHelperLib.h    |  36 --
 .../Include/Library/SbsaQemuHardwareInfoLib.h       |  73 ++++
 Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c      |  10 +-
 .../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c       |  15 +-
 .../SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c       |   9 +-
 .../SbsaQemu/Library/FdtHelperLib/FdtHelperLib.c    |  98 ------
 .../SbsaQemuHardwareInfoLib.c                       | 352 ++++++++++++++++++++
 .../Qemu/SbsaQemu/Library/SbsaQemuLib/SbsaQemuMem.c |  54 +--
 16 files changed, 511 insertions(+), 242 deletions(-)
---
base-commit: fe41713668d42b20a2370dab27de3269e877e454
change-id: 20240115-no-dt-for-cpu-2c511393df93

Best regards,
-- 
Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>



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



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

end of thread, other threads:[~2024-03-19 11:27 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-06 11:41 [edk2-devel] [PATCH edk2-platforms v6 0/7] get rid of DeviceTree from SbsaQemu Marcin Juszkiewicz
2024-03-06 11:41 ` [edk2-devel] [PATCH edk2-platforms v6 1/7] Platform/SbsaQemu: add SbsaQemuHardwareInfoLib Marcin Juszkiewicz
2024-03-14 15:09   ` Ard Biesheuvel
2024-03-14 15:14     ` Ard Biesheuvel
2024-03-15 11:34       ` Marcin Juszkiewicz
2024-03-06 11:41 ` [edk2-devel] [PATCH edk2-platforms v6 2/7] Platform/SbsaQemu: read amount of cpus during init Marcin Juszkiewicz
2024-03-14 15:13   ` Ard Biesheuvel
2024-03-15 11:49     ` Marcin Juszkiewicz
2024-03-19 10:25       ` Marcin Juszkiewicz
2024-03-19 11:02         ` Ard Biesheuvel
2024-03-19 11:27           ` Marcin Juszkiewicz
2024-03-06 11:42 ` [edk2-devel] [PATCH edk2-platforms v6 3/7] Platform/SbsaQemu: use PcdCoreCount directly Marcin Juszkiewicz
2024-03-14 15:15   ` Ard Biesheuvel
2024-03-06 11:42 ` [edk2-devel] [PATCH edk2-platforms v6 4/7] Platform/SbsaQemu: move FdtHandlerLib to SbsaQemuHardwareInfoLib Marcin Juszkiewicz
2024-03-14 15:16   ` Ard Biesheuvel
2024-03-06 11:42 ` [edk2-devel] [PATCH edk2-platforms v6 5/7] Platform/SbsaQemu: hang if there is no cpu information Marcin Juszkiewicz
2024-03-06 11:42 ` [edk2-devel] [PATCH edk2-platforms v6 6/7] Platform/SbsaQemu: get the information of memory via SMC calls Marcin Juszkiewicz
2024-03-14 15:18   ` Ard Biesheuvel
2024-03-06 11:42 ` [edk2-devel] [PATCH edk2-platforms v6 7/7] Platform/SbsaQemu: add DeviceTree fallbacks to parse memory information Marcin Juszkiewicz

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