Subject: Re: Three small patches for ARM
To: Martin Husemann <martin@duskware.de>
From: Scott <scott_allan@picovex.com>
List: port-arm
Date: 07/27/2006 11:23:53
This is a multi-part message in MIME format.
--------------090104050709060007020506
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Martin Husemann wrote:
> On Wed, Jul 26, 2006 at 06:46:22PM -0700, Scott wrote:
> 
>>3) allow_asm_vmparam.patch
>>This one is really simple.  I wanted to use KERNEL_BASE in an assembly 
>>source, but arch/arm/include/arm32/vmparam.h wasn't protected by #ifndef 
>>__ASSEMBLER__.  The patch adds the protection.
> 
> 
> The other way to do this would be to add a KERNEL_BASE entry to genassym.cf.

Thanks for educating a NetBSD newbie.  That works fine for me as well.    Just 
for completeness, I've attached a completely trivial patch that does it that 
way instead, but I'm still somewhat unclear on the rationale behind which way 
would be used in what cases.  Of course, using genassym.cf for the structure 
offsets and such is clear, but for the simple defines, it becomes hazier for me.

Thanks again,
   Scott

--------------090104050709060007020506
Content-Type: text/x-patch;
 name="allow_asm_kernelbase.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="allow_asm_kernelbase.patch"

Index: netbsd_quilt/src/sys/arch/arm/arm32/genassym.cf
===================================================================
--- netbsd_quilt.orig/src/sys/arch/arm/arm32/genassym.cf
+++ netbsd_quilt/src/sys/arch/arm/arm32/genassym.cf
@@ -67,6 +67,7 @@
 
 define	VM_MIN_ADDRESS		VM_MIN_ADDRESS
 define	VM_MAXUSER_ADDRESS	VM_MAXUSER_ADDRESS
+define	KERNEL_BASE		KERNEL_BASE
 
 define	DOMAIN_CLIENT		DOMAIN_CLIENT
 define	PMAP_DOMAIN_KERNEL	PMAP_DOMAIN_KERNEL

--------------090104050709060007020506--