9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Steven Stallion <sstallion@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] about KTZERO mismatch in mkfile and mem.h
Date: Mon, 20 Jan 2014 19:36:22 -0600	[thread overview]
Message-ID: <CAGGHmKF+rZz-xWJnyJHPrv_D3QiNJS0hFKYL9CAXwYgd-aeMgQ@mail.gmail.com> (raw)
In-Reply-To: <EC80728D-5B0F-45BD-A520-D99922F52F1B@fb.com>

On Mon, Jan 20, 2014 at 7:20 PM, Yoann Padioleau <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?

pc kernels are a.out boot images. The extra 32 bytes are for the image
header. The difference varies by kernel - raw and uImage kernels don't
suffer from this; ELF as well depending on how smart the boot loader
is.

Steve



      parent reply	other threads:[~2014-01-21  1:36 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
2014-01-21  1:36 ` Steven Stallion [this message]

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=CAGGHmKF+rZz-xWJnyJHPrv_D3QiNJS0hFKYL9CAXwYgd-aeMgQ@mail.gmail.com \
    --to=sstallion@gmail.com \
    --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).