From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 7 06:40:46 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D7CE16A4CE for ; Sat, 7 Feb 2004 06:40:46 -0800 (PST) Received: from bsdbox (unknown [219.153.14.178]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1CF0643D1F for ; Sat, 7 Feb 2004 06:40:44 -0800 (PST) (envelope-from superhaar@263.sina.com) Received: from bsdbox (localhost [127.0.0.1]) by bsdbox (8.12.9p2/8.12.9) with ESMTP id i1594r2R001527 for ; Thu, 5 Feb 2004 09:04:54 GMT (envelope-from superhaar@263.sina.com) Received: (from hmj@localhost) by bsdbox (8.12.9p2/8.12.9/Submit) id i1594njk001524; Thu, 5 Feb 2004 09:04:49 GMT (envelope-from superhaar@263.sina.com) Date: Thu, 5 Feb 2004 09:04:49 GMT Message-Id: <200402050904.i1594njk001524@bsdbox> X-Authentication-Warning: bsdbox: hmj set sender to superhaar@263.sina.com using -f From: Hong MingJian To: freebsd-hackers@freebsd.org Subject: KERNBASE X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Feb 2004 14:40:46 -0000 Hello: I'm a newbie to the kernel and trying to understand parts of kernel by reading its source codes. I'm reading sys/i386/i386/locore.s. There is a macro definition in the file sys/i386/i386/locore.s: #define R(foo) ((foo)-KERNBASE) But in the /sys/conf/ldscript.i386, . = kernbase + 0x00100000 + SIZEOF_HEADERS; And the kernel is loaded in the physical address 0x00100000, so I think the macro in the locore.s should be: #define R(foo) ((foo)-KERNBASE-SIZEOF_HEADERS) Why not?