From: "Marcin Juszkiewicz" <marcin.juszkiewicz@linaro.org>
To: devel@edk2.groups.io
Cc: Leif Lindholm <quic_llindhol@quicinc.com>,
Ard Biesheuvel <ardb+tianocore@kernel.org>,
Graeme Gregory <graeme@xora.org.uk>,
Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Subject: [edk2-devel] [PATCH edk2-platforms v3 0/5] get rid of DeviceTree from SbsaQemu
Date: Wed, 24 Jan 2024 14:53:35 +0100 [thread overview]
Message-ID: <20240124-no-dt-for-cpu-v3-0-5375fcf09037@linaro.org> (raw)
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.
If TF-A answer to SMC call would be not success then we assume that it
is old version and go back to parsing DeviceTree data directly. Just now
it is present in one place (SbsaQemuHardwareInfoLib) together with new
code for handling SMC stuff.
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
After this change the only place where DT data is parsed directly is
checking for memory nodes. Patches for that code will be sent once we
get SMC calls into TF-A.
Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
---
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 v2: https://openfw.io/edk2-devel/20240116-no-dt-for-cpu-v2-0-6cf078d9ab76@linaro.org/T/#t
---
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
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 | 34 ++++
.../SbsaQemu/Include/IndustryStandard/SbsaQemuSmc.h | 15 +-
.../Qemu/SbsaQemu/Include/Library/FdtHelperLib.h | 36 ----
.../Include/Library/SbsaQemuHardwareInfoLib.h | 45 +++++
Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c | 10 +-
.../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c | 13 +-
.../SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c | 9 +-
.../SbsaQemu/Library/FdtHelperLib/FdtHelperLib.c | 98 ----------
.../SbsaQemuHardwareInfoLib.c | 205 ++++++++++++++++++++
14 files changed, 317 insertions(+), 199 deletions(-)
---
base-commit: 82c4c4b038659843adb519d2e94ad83d77332c26
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 (#114295): https://edk2.groups.io/g/devel/message/114295
Mute This Topic: https://groups.io/mt/103931816/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
next reply other threads:[~2024-01-24 13:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-24 13:53 Marcin Juszkiewicz [this message]
2024-01-24 13:53 ` [edk2-devel] [PATCH edk2-platforms v3 1/5] Platform/SbsaQemu: add SbsaQemuHardwareInfoLib Marcin Juszkiewicz
2024-01-24 13:53 ` [edk2-devel] [PATCH edk2-platforms v3 2/5] Platform/SbsaQemu: read amount of cpus during init Marcin Juszkiewicz
2024-01-24 13:53 ` [edk2-devel] [PATCH edk2-platforms v3 3/5] Platform/SbsaQemu: use PcdCoreCount directly Marcin Juszkiewicz
2024-01-24 13:53 ` [edk2-devel] [PATCH edk2-platforms v3 4/5] Platform/SbsaQemu: move FdtHandlerLib to SbsaQemuHardwareInfoLib Marcin Juszkiewicz
2024-01-24 13:53 ` [edk2-devel] [PATCH edk2-platforms v3 5/5] Platform/SbsaQemu: hang if there is no cpu information Marcin Juszkiewicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240124-no-dt-for-cpu-v3-0-5375fcf09037@linaro.org \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox