KERNBASE

Hong MingJian superhaar at 263.sina.com
Sat Feb 7 06:40:46 PST 2004


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? 


More information about the freebsd-hackers mailing list