Bug report for new MacOS X compilation

Samuel Rydh mol-devel@lists.maconlinux.org
Fri, 19 Mar 2004 16:14:10 +0100


On Fri, Mar 19, 2004 at 04:03:11PM +0100, Samuel Rydh wrote:
> --- mol-old/src/kmod/Darwin/alloc.c
> +++ mol-new/src/kmod/Darwin/alloc.c
>         if( !phys ) {
>                 printk("tophys_mol: VA %08lX translates to 0!\n", (ulong)p );
>         }
>         phys += phys ? (ulong)(p-trunc_page(p)) : 0;
> +	phys = phys << 12;
>         return phys;
> 
> /Samue

Oh my... the fix shuld of course be

--- mol-old/src/kmod/Darwin/alloc.c
+++ mol-new/src/kmod/Darwin/alloc.c
	if( !phys ) {
		printk("tophys_mol: VA %08lX translates to 0!\n", (ulong)p );
	}
+	phys = phys << 12;
	phys += phys ? (ulong)(p-trunc_page(p)) : 0;
	return phys;

/Samuel