Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Feb 2025 12:26:36 GMT
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 6a7a01ec8b74 - main - physmem: Move the ram0 device earlier in the boot
Message-ID:  <202502041226.514CQa5T040907@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=6a7a01ec8b7495497d3d0cd28234cc68c36b6d61

commit 6a7a01ec8b7495497d3d0cd28234cc68c36b6d61
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2025-02-04 11:56:49 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2025-02-04 12:02:00 +0000

    physmem: Move the ram0 device earlier in the boot
    
    If the ram driver is unable to reserve a memory range it will panic
    with no real information why. Move this driver earlier in the boot so
    any devices that cause the conflict will fail to attach.
    
    This should make it easier to debug why the conflict exists.
    
    Reviewed by:    mhorne, kevans, imp
    Sponsored by:   Arm Ltd
    Differential Revision:  https://reviews.freebsd.org/D48766
---
 sys/kern/subr_physmem.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/kern/subr_physmem.c b/sys/kern/subr_physmem.c
index 059566f0eccb..6b97b36a6c51 100644
--- a/sys/kern/subr_physmem.c
+++ b/sys/kern/subr_physmem.c
@@ -622,5 +622,6 @@ static device_method_t ram_methods[] = {
 };
 
 DEFINE_CLASS_0(ram, ram_driver, ram_methods, /* no softc */ 1);
-DRIVER_MODULE(ram, nexus, ram_driver, 0, 0);
+EARLY_DRIVER_MODULE(ram, nexus, ram_driver, 0, 0,
+    BUS_PASS_ROOT + BUS_PASS_ORDER_MIDDLE);
 #endif /* _KERNEL */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202502041226.514CQa5T040907>