From owner-freebsd-hackers Mon Apr 28 23:13:23 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id XAA28268 for hackers-outgoing; Mon, 28 Apr 1997 23:13:23 -0700 (PDT) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id XAA28263 for ; Mon, 28 Apr 1997 23:13:20 -0700 (PDT) Received: (from msmith@localhost) by genesis.atrad.adelaide.edu.au (8.8.5/8.7.3) id PAA20132 for hackers@freebsd.org; Tue, 29 Apr 1997 15:43:17 +0930 (CST) From: Michael Smith Message-Id: <199704290613.PAA20132@genesis.atrad.adelaide.edu.au> Subject: mapping memory inside the kernel? To: hackers@freebsd.org Date: Tue, 29 Apr 1997 15:43:17 +0930 (CST) X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk A question for those familiar with the workings of the kernel wrt. load-time and mappings; If I want to load extra data after the kernel, and not have it clobbered by the bss clearing in locore.s, how should this be done? As I see it I can : - put the data after _edata, and copy it somewhere before the bss is cleared. (Yuck, requires a static buffer in the data segment). - put the data after _end, and copy it into a buffer in the bss (still yuck for a static buffer ripe for overflowing). - put the data after _end and adjust _end after the bss is cleared, saving the old _end value as a reference to this data. - put the data somewhere else (first meg somewhere?) and advertise its location in some fashion. Perhaps the kernel flags should become a physical address reference to a parameter block instead. This could be done in a backwards-compatible fashion I think. Of these, I obviously like the third, although it requires some more structure on the part of the data (ie. more work on the part of the bootstrap loader). I don't know how well this would work in conjunction with compressed kernels though. -- ]] Mike Smith, Software Engineer msmith@gsoft.com.au [[ ]] Genesis Software genesis@gsoft.com.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control. (ph) +61-8-8267-3493 [[ ]] Unix hardware collector. "Where are your PEZ?" The Tick [[