9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: jmk@plan9.bell-labs.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] moving 9load to 0x800000
Date: Fri, 25 Jan 2002 12:24:21 -0500	[thread overview]
Message-ID: <20020125172424.1F6E719A74@mail.cse.psu.edu> (raw)

One of the first things 9load does in main() is
	if((ulong)&end > (KZERO|(640*1024)))
		panic("i'm too big\n");
KZERO is defined as 0x80000000 in mem.h, which should be OK for most
other things. However, mem.h defines where some other datastructures
go in memory, such as the vector table:
	#define IDTADDR		0x80000800		/* idt */

Basically, you want to grep for KZERO and 0x8 in the source to see what
turns up.

On Fri Jan 25 12:13:33 EST 2002, rminnich@lanl.gov wrote:
> On Fri, 25 Jan 2002 jmk@plan9.bell-labs.com wrote:
>
> > You probably need to change at where load.c/ialloc() starts allocating
> > (currently 3MB).
>
> actually that ought to be ok with us.
>
> Here's the problem. We're loading 9load from linuxbios. There is
> significant usage of the area 0x10000 and up by linuxbios, so 9load has to
> live elsewhere. 0x100000 won't do, since that's where the kernel goes.
>
> So I hoped we could put the 9load code at 0x800000. I don't see a problem
> with allocating at 3 MB, that leaves plenty of room for the kernel at 1
> MB.
>
> It ends up like this:
>
> 0-0x90000 linuxbios
> 0x100000-0x2fffff -- plan 9 kernel (when loaded)
> 0x300000          -- 9load allocator
> 0x800000          -- 9load code
>
> Does that sound reasonable? Will the -T switch to ld fix all that needs
> fixing or are there manifest constants somewhere we have to fix up too?
>
> thanks
>
> ron


             reply	other threads:[~2002-01-25 17:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-25 17:24 jmk [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-01-25 16:42 Russ Cox
2002-01-25 16:37 jmk
2002-01-25 17:12 ` Ronald G Minnich
2002-01-25 16:19 Ronald G Minnich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020125172424.1F6E719A74@mail.cse.psu.edu \
    --to=jmk@plan9.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).