Skip to content

Conversation

@miczyg1
Copy link
Contributor

@miczyg1 miczyg1 commented Oct 22, 2025

Some fixes for Gigabyte MZ33-AR1 server to work.

On AMD server systems there are multiple PCI root bridges. The root
bridge scanning in UEFI Payload is not sufficient to detect the memory
and I/O apertures properly. For example, on Turin system, the I/O
aperture on the first root bridge containing the FCH may not have any
I/O resources detected on the PCI devices. This results in the I/O
decoding to be disabled on the root bridge, effectively breaking the
I/O-based serial ports, e.g. on Super I/Os and BMCs.

Populate the root bridge info from CB_TAG_RB_INFO which contains data
compatible with the Universal Payload PCI Root Bridges Info HOB. Make
the PciHostBridgeLib pick the HOB up, if available, and populate
proper root bridge apertures for AMD systems. Otherwise, fall back
to root bridge scanning.

Relevant coreboot patches:
https://review.coreboot.org/c/coreboot/+/89486
https://review.coreboot.org/c/coreboot/+/89487

TEST=Boot UEFI Payload and see the serial console no longer breaks
after PCI enumeration in UEFI Payload on Gigabyte MZ33-AR1.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Mark the range 0x1000-0xa0000 as tested. It caused the payload to mark
this range as reserved. As a result, Linux kernel could not allocate
memory for real mode and panicked.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
@miczyg1
Copy link
Contributor Author

miczyg1 commented Oct 22, 2025

We can wait until upstream patches are merged, because we certainly don't want to have any conflicts with cbmem IDs

@miczyg1 miczyg1 force-pushed the cbmem_pci_rb_info branch 3 times, most recently from 883e4cd to 238dc72 Compare November 5, 2025 15:53
There was a dirty hack for Intel platforms that read TOLUD register
to determine the boundary between MMIO and DRAM. It caused problems
on AMD platforms such as apu2, which does not have TOLUD register. As
a result, regions which held reserved memory were incorrectly
reported as RAM buffers or RAM itself and the OS allocated DMA there.
It could be observed with many IO_PAGE_FAULTs occurring in the OS.
See: Dasharo/dasharo-issues#1134

FWTS complains on ECAM MMCONF not being reserved in the memory map.
So carve it out of the memory map and report it as reserved.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
FWTS complains on MMCONF not being reseved in memory map. So reserve
it.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants