These regions can conflict with I/O resources and prevent allocation
of those regions by other drivers. It may make sense to reserve them
after the boot-time probe of devices has concluded (or after an
initial pass to reserve firmware-assigned resources before "wildcard"
resources are allocated), but that would require additional changes.
Details
- Reviewers
kevans andrew imp - Commits
- rGadd99c9c4bae: physmem ram: Don't reserve excluded regions
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
On the Ampere machine I used to test this series, one of the excluded regions conflicted with a memory window on one of the Host-PCI bridges.
sys/kern/subr_physmem.c | ||
---|---|---|
631 | Can you talk about why you removed this? We specifically exclude a lot of regions for kboot because that's the old, running UEFI runtime services or are the gicv3 memory that's reserved in the memory maps we pass in. I want to make sure that this won't break things, but don't understand what you're trying to accomplish. |
sys/kern/subr_physmem.c | ||
---|---|---|
631 | Because reserving these devices in ram0 means other devices can't reserve them. Specifically as I noted in the comment above, a portion of a memory window for one of the Host-PCI bridge windows in the Ampere machine I tested on was listed as an excluded region, so the bridge couldn't allocate its window since it conflicted with a ram0 reservation. The real fix is that we need to let the real I/O devices probe first before ram0 reserves things. The comment above about "best-effort" indicates the conflict, the problem is that ram0 probes before other devices, so it doesn't actually work as intended as instead ram0 preempts I/O devices. |
sys/kern/subr_physmem.c | ||
---|---|---|
631 | OK. That makes sense and I don't think will interfere with the kboot stuff... |