Subject: Re: building libkvm
To: David Brownlee <>
From: Chris Gilbert <>
List: port-arm
Date: 07/12/2001 10:25:28
On Thursday 12 July 2001 10:03 am, David Brownlee wrote:
> On Thu, 12 Jul 2001, Chris Gilbert wrote:
> > Looking at libkvm I'm not sure that it can be shared across arm26 and
> > arm32, it's very much tied into the kernel.
> >
> > Anyone got any suggestions on how to tackle this one?  currently I'm
> > trying to get a complete make build to work, I've fixed up libkvm to
> > build, but it's got hardcoded includes to arm/arm32 and arm/cats.
> 	Maybe go the same route as the m68k ports - which have common,
> 	sun3 and sun3x kvm files, none of which include any machine/*.h
> 	files...

I believe that the 3 defines that kvm is after are, so we either end up with 
them hardcoded into the file or we use includes, and I'd rather use includes 
incase we ever rearrange the vm layout (we don't really need 3GB of user VM 

so currently there's less need, but that may change if we ever implement 
_kvm_kvatop and _kvm_pa2off.

I have just thought of one way around it, we have an arch and a platform 
symlink inside the arm dir, eg:
	arch -> arm26|arm32
	platform -> acorn32|arm26|cats|dnard|netwinder

What we can then do is have machine/vmparam.h include arm/arch/vmparam.h, the 
arm32 one can then include arm/platform/vmparam.h for the little bit of 
platform specific stuff.

However I'm not sure if this is better or worse, but it should work for all 
cases.  Note that nothing should get included from the platform dir's unless 
_KERNEL is defined, otherwise we may not see bits of userland that are 
platform specific.