Date: Thu, 27 Feb 2025 14:16:53 GMT From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 3756a1c62af2 - stable/14 - physmem ram: Don't reserve excluded regions Message-ID: <202502271416.51REGrgh016342@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3756a1c62af2f326419572d6fc5789c52567e32e commit 3756a1c62af2f326419572d6fc5789c52567e32e Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2024-02-14 22:07:33 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2025-02-27 13:09:21 +0000 physmem ram: Don't reserve excluded regions 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. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D43893 (cherry picked from commit add99c9c4bae2769cba14a88b83377ec9c04cad9) --- sys/kern/subr_physmem.c | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/sys/kern/subr_physmem.c b/sys/kern/subr_physmem.c index e74a11f47c2c..51af2e896877 100644 --- a/sys/kern/subr_physmem.c +++ b/sys/kern/subr_physmem.c @@ -583,7 +583,6 @@ ram_attach(device_t dev) { vm_paddr_t avail_list[PHYS_AVAIL_COUNT]; rman_res_t start, end; - struct region *hwp; int rid, i; rid = 0; @@ -609,30 +608,6 @@ ram_attach(device_t dev) rid++; } - /* Now, reserve the excluded memory regions. */ - for (i = 0, hwp = exregions; i < excnt; i++, hwp++) { - start = hwp->addr; - end = hwp->addr + hwp->size; - - if (bootverbose) - device_printf(dev, - "reserving excluded region: %jx-%jx\n", - (uintmax_t)start, (uintmax_t)(end - 1)); - - /* - * Best-effort attempt to reserve the range. This may fail, as - * sometimes the excluded ranges provided by the device tree - * will cover or overlap some I/O range. - */ - if (bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, start, end, - end - start, 0) == NULL) { - if (bootverbose) - device_printf(dev, "failed to reserve region\n"); - continue; - } - rid++; - } - return (0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202502271416.51REGrgh016342>