[edk2-devel] [PATCH edk2-platforms 0/3] WIP: SbsaQemu: make PCIe dynamic

Marcin Juszkiewicz posted 3 patches 10 months, 2 weeks ago
Failed in applying to current master (apply log)
Silicon/Qemu/SbsaQemu/SbsaQemu.dec            |  2 +-
Platform/Qemu/SbsaQemu/SbsaQemu.dsc           | 53 ++++++-------
.../Qemu/SbsaQemu/AcpiTables/AcpiTables.inf   | 23 +++---
.../SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf       |  9 +++
.../SbsaQemuPciHostBridgeLib.inf              |  2 +-
.../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c | 74 +++++++++++++++++++
.../SbsaQemuPciHostBridgeLib.c                | 16 ++--
Silicon/Qemu/SbsaQemu/AcpiTables/Dsdt.asl     | 38 +++++-----
Silicon/Qemu/SbsaQemu/AcpiTables/Mcfg.aslc    | 43 -----------
9 files changed, 150 insertions(+), 110 deletions(-)
delete mode 100644 Silicon/Qemu/SbsaQemu/AcpiTables/Mcfg.aslc
[edk2-devel] [PATCH edk2-platforms 0/3] WIP: SbsaQemu: make PCIe dynamic
Posted by Marcin Juszkiewicz 10 months, 2 weeks ago
# Introduction

Out plan is to clean SbsaQemu machine from hardcoded variables. There
were patches posted for GIC data, we have ones for GIC ITS and this is
my attempt on making PCIe data configurable.

The goal is:
- QEMU provides PCIe variables in DeviceTree
- TF-A parses DT and provides PCIe variables via SMC
- EDK2 calls SMC to get PCIe variables


# Reason

But for this we need PCIe variables to be dynamic. I lack EDK2
knowledge. I curse and complain while working with it but some work
needs to be done and it is hard to find someone who would do it.

This patchset is dump of my work-in-progress. It breaks the platform and
I lack ideas why.


# Description

First patch replaces calls to FixedPcd*() in DSDT and PciHostBridge
initialization with expected values.

So far no changes in behaviour.


Second change creates MCFG table using C to not use FixedPcd*() calls in
ASLC source.

So far no changes in behaviour. MCFG table is exactly the same.


Third patch moves all PCIe variables from being Fixed to being Dynamic.
And it breaks things:

InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 100FB866190
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 100FB866178
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 100FB866160
[Bds] Entry...
[BdsDxe] Locate Variable Policy protocol - Success
Variable Driver Auto Update PlatformLang, PlatformLang:en, Lang:eng Status: Success
[Variable]END_OF_DXE is signaled
Initialize variable error flag (FF)
PCI Bus First Scanning
PciBus: Discovered PCI @ [00|00|00]  [VID = 0x1B36, DID = 0x8]
FATAL ERROR - RaiseTpl with OldTpl(0x1F) > NewTpl(0x10)
ASSERT [DxeCore] /home/marcin/devel/linaro/sbsa-qemu/code/edk2/MdeModulePkg/Core/Dxe/Event/Tpl.c(66): ((BOOLEAN)(0==1))


Any ideas?

Marcin Juszkiewicz (3):
  WIP: SbsaQemu: make PCIe variables dynamic (part 1)
  WIP: SbsaQemu: make PCIe variables dynamic (part 2)
  WIP: SbsaQemu: make PCIe variables dynamic (part 3)

 Silicon/Qemu/SbsaQemu/SbsaQemu.dec            |  2 +-
 Platform/Qemu/SbsaQemu/SbsaQemu.dsc           | 53 ++++++-------
 .../Qemu/SbsaQemu/AcpiTables/AcpiTables.inf   | 23 +++---
 .../SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf       |  9 +++
 .../SbsaQemuPciHostBridgeLib.inf              |  2 +-
 .../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c | 74 +++++++++++++++++++
 .../SbsaQemuPciHostBridgeLib.c                | 16 ++--
 Silicon/Qemu/SbsaQemu/AcpiTables/Dsdt.asl     | 38 +++++-----
 Silicon/Qemu/SbsaQemu/AcpiTables/Mcfg.aslc    | 43 -----------
 9 files changed, 150 insertions(+), 110 deletions(-)
 delete mode 100644 Silicon/Qemu/SbsaQemu/AcpiTables/Mcfg.aslc

-- 
2.40.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#106065): https://edk2.groups.io/g/devel/message/106065
Mute This Topic: https://groups.io/mt/99513051/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH edk2-platforms 0/3] WIP: SbsaQemu: make PCIe dynamic
Posted by Marcin Juszkiewicz 10 months, 1 week ago
W dniu 13.06.2023 o 21:28, Marcin Juszkiewicz pisze:
> This patchset is dump of my work-in-progress. It breaks the platform and
> I lack ideas why.

To make things funnier: works fine in RELEASE mode.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#106256): https://edk2.groups.io/g/devel/message/106256
Mute This Topic: https://groups.io/mt/99513051/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-