From 4752fe0b22455d21f86fb9a09fab7f3fa979c0cb Mon Sep 17 00:00:00 2001 From: niklas Date: Sun, 5 Mar 2000 18:40:59 +0000 Subject: [PATCH] D not forget our memmap changes, ok mickey@ --- sys/arch/i386/stand/libsa/exec_i386.c | 5 ++++- sys/arch/i386/stand/libsa/libsa.h | 5 +++-- sys/arch/i386/stand/libsa/memprobe.c | 16 +++++++++++----- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/sys/arch/i386/stand/libsa/exec_i386.c b/sys/arch/i386/stand/libsa/exec_i386.c index afa6ae63103..c56a613d8cd 100644 --- a/sys/arch/i386/stand/libsa/exec_i386.c +++ b/sys/arch/i386/stand/libsa/exec_i386.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_i386.c,v 1.25 2000/02/18 17:10:10 mickey Exp $ */ +/* $OpenBSD: exec_i386.c,v 1.26 2000/03/05 18:40:59 niklas Exp $ */ /* * Copyright (c) 1997-1998 Michael Shalayeff @@ -66,6 +66,9 @@ machdep_exec(xp, howto, loadaddr) cd.conspeed = com_speed; addbootarg(BOOTARG_CONSDEV, sizeof(cd), &cd); + /* Pass memory map to the kernel */ + mem_pass(); + makebootargs(av, &ac); #ifdef EXEC_DEBUG diff --git a/sys/arch/i386/stand/libsa/libsa.h b/sys/arch/i386/stand/libsa/libsa.h index 29064a0a707..6fb8ce1d135 100644 --- a/sys/arch/i386/stand/libsa/libsa.h +++ b/sys/arch/i386/stand/libsa/libsa.h @@ -1,4 +1,4 @@ -/* $OpenBSD: libsa.h,v 1.29 1999/08/25 00:54:19 mickey Exp $ */ +/* $OpenBSD: libsa.h,v 1.30 2000/03/05 18:40:59 niklas Exp $ */ /* * Copyright (c) 1996-1999 Michael Shalayeff @@ -47,8 +47,9 @@ void apmprobe __P((void)); void apmcheck __P((void)); void pciprobe __P((void)); void dump_biosmem __P((bios_memmap_t *)); -int mem_delete __P((long, long)); int mem_add __P((long, long)); +int mem_delete __P((long, long)); +void mem_pass __P((void)); void devboot __P((dev_t, char *)); void machdep __P((void)); diff --git a/sys/arch/i386/stand/libsa/memprobe.c b/sys/arch/i386/stand/libsa/memprobe.c index 6c00ef0f519..7f2dba44310 100644 --- a/sys/arch/i386/stand/libsa/memprobe.c +++ b/sys/arch/i386/stand/libsa/memprobe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: memprobe.c,v 1.33 1999/09/30 06:29:57 downsj Exp $ */ +/* $OpenBSD: memprobe.c,v 1.34 2000/03/05 18:40:59 niklas Exp $ */ /* * Copyright (c) 1997-1999 Michael Shalayeff @@ -312,10 +312,6 @@ memprobe() apmcheck(); - /* Register in global var */ - addbootarg(BOOTARG_MEMMAP, - (pm - bios_memmap + 1) * sizeof(*bios_memmap), bios_memmap); - #ifdef DEBUG printf(")["); #endif @@ -457,3 +453,13 @@ mem_add(sa, ea) return 0; } +void +mem_pass() +{ + bios_memmap_t *p; + + for (p = bios_memmap; p->type != BIOS_MAP_END; p++) + ; + addbootarg(BOOTARG_MEMMAP, (p - bios_memmap + 1) * sizeof *bios_memmap, + bios_memmap); +} -- 2.20.1