From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] about KTZERO mismatch in mkfile and mem.h
Date: Mon, 20 Jan 2014 20:29:32 -0500 [thread overview]
Message-ID: <16573812b745d9101800e21915615766@mikro.quanstro.net> (raw)
In-Reply-To: <EC80728D-5B0F-45BD-A520-D99922F52F1B@fb.com>
On Mon Jan 20 20:21:28 EST 2014, pad@fb.com wrote:
> Hi,
>
> in 9/pc/mem.h it says:
> /*
> * Address spaces
> */
> #define KZERO 0xF0000000 /* base of kernel address space */
> #define KTZERO (KZERO+0x100000) /* first address in kernel text - 9load sits below */
>
>
> and in 9/pc/mkfile:
> # must match mem.h
> APBOOTSTRAP=0xF0003000
> KTZERO=0xF0100020
>
>
> so why the difference? what is this additional 20 for KTZERO?
ah, good question.
KZERO is the lowest virtual address that's part of the kernel proper.
in the mkfile, the address of the first instruction is wanted to pass to
the linker. this is KTZERO in the mkfile. in mem.h, the page containing
the first instruction is wanted for mmu mapping, etc., and that's a little
different. it's a bit fast-and-loose, and perhaps incorrect to use the
same name for both. perhaps
#define KTPZERO ROUNDDN(KTZERO, BY2PG)
would have been less confusing.
- erik
next prev parent reply other threads:[~2014-01-21 1:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-21 1:20 Yoann Padioleau
2014-01-21 1:29 ` erik quanstrom [this message]
2014-01-21 1:36 ` Steven Stallion
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=16573812b745d9101800e21915615766@mikro.quanstro.net \
--to=quanstro@quanstro.net \
--cc=9fans@9fans.net \
/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).