Index | Thread | Search

From:
Martin Pieuchot <mpi@grenadille.net>
Subject:
Re: uvm_map: kill ifdef __i386__
To:
tech@openbsd.org
Date:
Sun, 9 Nov 2025 12:24:19 +0000

Download raw body.

Thread
On 09/11/25(Sun) 21:55, Jonathan Gray wrote:
> On Sun, Nov 09, 2025 at 10:31:25AM +0000, Martin Pieuchot wrote:
> > There's a specific uvm_map_setup_md() for i386 but it does exactly the
> > same as other 32 bits architectures.
> > 
> > I386 is no longer the main architecture and I doubt anyone will
> > resurrect these experiments.  But if that happens it is easy to
> > reintroduce a custom uvm_map_setup_md(). 
> > 
> > For now I'd like to remove this #ifdef.
> > 
> > ok?
> 
> diff between the i386 and 32-bit versions:
> 
> @@ -14,10 +14,7 @@ uvm_map_setup_md(struct vm_map *map)
>  		min = VMMAP_MIN_ADDR;
>  
>  #if 0	/* Cool stuff, not yet */
> -	/* Executable code is special. */
> -	map->uaddr_exe = uaddr_rnd_create(min, I386_MAX_EXE_ADDR);
> -	/* Place normal allocations beyond executable mappings. */
> -	map->uaddr_any[3] = uaddr_pivot_create(2 * I386_MAX_EXE_ADDR, max);
> +	map->uaddr_any[3] = uaddr_pivot_create(min, max);
>  #else	/* Crappy stuff, for now */
>  	map->uaddr_any[0] = uaddr_rnd_create(min, max);
>  #endif
> 
> can the pivot code also be removed?

It could.  Can we discuss that in a later step?  I'd like to know if I
drop or commit this diff first.