Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

system/2850: USPACE needs alignment on some platforms

From: <mcn(at)EnGarde.com>
Date: Thu Oct 31 2002 - 13:55:18 EST


>Number: 2850
>Category: system
>Synopsis: USPACE needs alignment on some platforms
>Confidential: no
En Garde Systems
net
>Environment:
        

	System      : OpenBSD 2.8
	Architecture: OpenBSD.i386
	Machine     : i386

>Description:

In /sys/kern/kern_fork.c, line 185. The USPACE is allocated using uvm_km_valloc(). However, on some platforms (including MIPS), the USPACE must be aligned to an even page boundary (due to cache wiring restrictions). NetBSD has adopted a simple ifdef to allow alignment if necessary.

While not necessary for supporting x86 platforms, I'd suggest a simple 3 line fix would have no impact on x86 or alpha, but would allow easy support for other platforms. In addition, since it follows NetBSD standards, it makes it relatively easy to port NetBSD platforms to OpenBSD without tracking down out-of-arch problems.
>How-To-Repeat:

See Description.
>Fix:

Change the line:

        uaddr = uvm_km_valloc(kernel_map, USPACE); to:
#if defined(USPACE_ALIGN)

        uaddr = uvm_km_valloc_align(kernel_map, USPACE, USPACE_ALIGN); #else

        uaddr = uvm_km_valloc(kernel_map, USPACE); #endif

>Release-Note:
Received on Thu Nov 7 15:54:27 2002

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:29:36 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library