From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Mon, 20 Jan 2014 19:36:22 -0600 Message-ID: From: Steven Stallion To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [9fans] about KTZERO mismatch in mkfile and mem.h Topicbox-Message-UUID: b41dacbe-ead8-11e9-9d60-3106f5b1d025 On Mon, Jan 20, 2014 at 7:20 PM, Yoann Padioleau 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