From owner-freebsd-hackers Thu Oct 11 15: 8:44 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id 872D037B407; Thu, 11 Oct 2001 15:08:28 -0700 (PDT) Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id QAA38144; Thu, 11 Oct 2001 16:18:43 -0700 (PDT) Date: Thu, 11 Oct 2001 16:18:41 -0700 (PDT) From: Julian Elischer To: hackers@freebsd.org Cc: developers@freebsd.org Subject: Patch to allow 4.2 driver .o to run on 4.4 Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Sorry about the crosspost but I estimate that this reaches those who need to see this.. There was a change in the 4.x kernel.h on June 15 that broke backwards compatibility for binary distributed driver files (distributed as .o files) It was an MFC of a patch by peter.. but we didn't understand the ramifications in 4.x. my fix (a reversion in part) is as follows: Index: kernel.h =================================================================== RCS file: /repos/cvs/mod/freebsd/src/sys/sys/kernel.h,v retrieving revision 1.63.2.5 diff -u -r1.63.2.5 kernel.h --- kernel.h 2001/07/26 23:27:53 1.63.2.5 +++ kernel.h 2001/10/11 21:30:03 @@ -113,13 +113,13 @@ SI_SUB_VM = 0x1000000, /* virtual memory system init*/ SI_SUB_KMEM = 0x1800000, /* kernel memory*/ SI_SUB_KVM_RSRC = 0x1A00000, /* kvm operational limits*/ - SI_SUB_CPU = 0x2000000, /* CPU resource(s)*/ - SI_SUB_KLD = 0x2100000, /* KLD and module setup */ - SI_SUB_INTRINSIC = 0x2200000, /* proc 0*/ - SI_SUB_VM_CONF = 0x2300000, /* config VM, set limits*/ - SI_SUB_RUN_QUEUE = 0x2400000, /* the run queue*/ - SI_SUB_CREATE_INIT = 0x2500000, /* create the init process */ - SI_SUB_DRIVERS = 0x3100000, /* Let Drivers initialize */ + SI_SUB_CPU = 0x1e00000, /* CPU resource(s)*/ + SI_SUB_KLD = 0x1f00000, /* KLD and module setup */ + SI_SUB_INTRINSIC = 0x2000000, /* proc 0*/ + SI_SUB_VM_CONF = 0x2100000, /* config VM, set limits*/ + SI_SUB_RUN_QUEUE = 0x2200000, /* the run queue*/ + SI_SUB_CREATE_INIT = 0x2300000, /* create the init process */ + SI_SUB_DRIVERS = 0x2400000, /* Let Drivers initialize */ SI_SUB_CONFIGURE = 0x3800000, /* Configure devices */ SI_SUB_VFS = 0x4000000, /* virtual file system*/ SI_SUB_CLOCKS = 0x4800000, /* real time and stat clocks*/ The result of this was that old .o drivers are initialise at sequence 0x2400000 but the device framework is not initialised until 0x3100000. my patch shifts all the numbers back to below that that binary ,o files would be compiled with, thus ensuring that the world is ready for them when they initialise. The hardest hit would be any drivers using the PCI compatibility shims which core-dump on a null reference because the pci compatibility shim devclass pointer is not yet initialised.. I'd like to check this in to 4.4++ as itwill allow anyone else with binary .o drivers (No idea if there are any others) to use their dirvers without having to go back to their suppliers and pay "lots-o-cash" to get them to recompile it. (If they still have the source). Julian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message