Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/i386/stand Addredd port-i386/9897, but differently....
details: https://anonhg.NetBSD.org/src/rev/fae358fe1737
branches: trunk
changeset: 485275:fae358fe1737
user: tsarna <tsarna%NetBSD.org@localhost>
date: Sun Apr 23 19:57:12 2000 +0000
description:
Addredd port-i386/9897, but differently. Since the effect of resetting
the video mode on machines with ancient or no video cards is not clear,
for safety's sake a I created a new biosboot variant, biosboot_resetvideo
that does the call.
Anyway, now I can boot my i-opener without hitting Tab. Thanks Andrew!
diffstat:
sys/arch/i386/stand/Makefile | 3 +-
sys/arch/i386/stand/biosboot/Makefile | 6 +-
sys/arch/i386/stand/biosboot/main.c | 6 +-
sys/arch/i386/stand/biosboot_resetvideo/Makefile | 5 +
sys/arch/i386/stand/lib/Makefile | 4 +-
sys/arch/i386/stand/lib/biosvideomode.S | 67 ++++++++++++++++++++++++
sys/arch/i386/stand/lib/libi386.h | 3 +-
7 files changed, 88 insertions(+), 6 deletions(-)
diffs (169 lines):
diff -r 27203ae91cf2 -r fae358fe1737 sys/arch/i386/stand/Makefile
--- a/sys/arch/i386/stand/Makefile Sun Apr 23 19:55:51 2000 +0000
+++ b/sys/arch/i386/stand/Makefile Sun Apr 23 19:57:12 2000 +0000
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.11 2000/01/15 01:17:12 christos Exp $
+# $NetBSD: Makefile,v 1.12 2000/04/23 19:57:12 tsarna Exp $
SUBDIR= biosboot installboot
SUBDIR+= dosboot
SUBDIR+= biosboot_com0
+SUBDIR+= biosboot_resetvideo
#SUBDIR+= genprom netboot
.include <bsd.subdir.mk>
diff -r 27203ae91cf2 -r fae358fe1737 sys/arch/i386/stand/biosboot/Makefile
--- a/sys/arch/i386/stand/biosboot/Makefile Sun Apr 23 19:55:51 2000 +0000
+++ b/sys/arch/i386/stand/biosboot/Makefile Sun Apr 23 19:57:12 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.25 2000/01/20 16:51:01 christos Exp $
+# $NetBSD: Makefile,v 1.26 2000/04/23 19:57:13 tsarna Exp $
S= ${.CURDIR}/../../../../
@@ -28,6 +28,10 @@
CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0 -DDIRECT_SERIAL
.endif
+.if (${BASE} == "biosboot_resetvideo")
+CPPFLAGS+= -DRESET_VIDEO
+.endif
+
CPPFLAGS+= -DSUPPORT_USTARFS
CPPFLAGS+= -DPASS_BIOSGEOM
#CPPFLAGS+= -DBOOTPASSWD
diff -r 27203ae91cf2 -r fae358fe1737 sys/arch/i386/stand/biosboot/main.c
--- a/sys/arch/i386/stand/biosboot/main.c Sun Apr 23 19:55:51 2000 +0000
+++ b/sys/arch/i386/stand/biosboot/main.c Sun Apr 23 19:57:12 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.18 2000/03/29 14:29:34 soren Exp $ */
+/* $NetBSD: main.c,v 1.19 2000/04/23 19:57:13 tsarna Exp $ */
/*
* Copyright (c) 1996, 1997, 1999
@@ -236,6 +236,10 @@
#endif
gateA20();
+#ifdef RESET_VIDEO
+ biosvideomode();
+#endif
+
print_banner();
/* try to set default device to what BIOS tells us */
diff -r 27203ae91cf2 -r fae358fe1737 sys/arch/i386/stand/biosboot_resetvideo/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/i386/stand/biosboot_resetvideo/Makefile Sun Apr 23 19:57:12 2000 +0000
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1 2000/04/23 19:57:14 tsarna Exp $
+
+BASE= biosboot_resetvideo
+
+.include "../biosboot/Makefile"
diff -r 27203ae91cf2 -r fae358fe1737 sys/arch/i386/stand/lib/Makefile
--- a/sys/arch/i386/stand/lib/Makefile Sun Apr 23 19:55:51 2000 +0000
+++ b/sys/arch/i386/stand/lib/Makefile Sun Apr 23 19:57:12 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 1999/12/21 14:22:54 drochner Exp $
+# $NetBSD: Makefile,v 1.14 2000/04/23 19:57:14 tsarna Exp $
S?= ${.CURDIR}/../../../../
@@ -15,7 +15,7 @@
#CPPFLAGS+= -DNO_DISKLABEL
#CPPFLAGS+= -DSAVE_MEMORY
-SRCS= pcio.c conio.S comio.S comio_direct.c
+SRCS= pcio.c conio.S comio.S comio_direct.c biosvideomode.S
SRCS+= getsecs.c biosgetrtc.S biosdelay.S biosreboot.S gatea20.c
SRCS+= biosmem.S getextmemx.c biosmemx.S printmemlist.c
SRCS+= pread.c menuutils.c parseutils.c
diff -r 27203ae91cf2 -r fae358fe1737 sys/arch/i386/stand/lib/biosvideomode.S
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/i386/stand/lib/biosvideomode.S Sun Apr 23 19:57:12 2000 +0000
@@ -0,0 +1,67 @@
+
+/*
+ * Copyright (c) 1996
+ * Perry E. Metzger. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgements:
+ * This product includes software developed for the NetBSD Project
+ * by Perry E. Metzger.
+ * 4. The names of the authors may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+
+#include <machine/asm.h>
+
+#define data32 .byte 0x66
+
+ .text
+
+ENTRY(biosvideomode)
+ pushl %ebp
+ movl %esp,%ebp
+ pushl %ebx
+ push %esi
+ push %edi
+
+ call _C_LABEL(prot_to_real)
+
+ movb $0, %ah
+ movb $2, %al
+ int $0x10
+ # zero-extend 16-bit result to 32 bits.
+ data32
+ movl $0, %ebx
+ mov %eax,%ebx # !!! at run time, it is mov %ax,%bx
+
+ data32
+ call _C_LABEL(real_to_prot)
+
+ movl %ebx, %eax
+
+ pop %edi
+ pop %esi
+ popl %ebx
+ popl %ebp
+ ret
diff -r 27203ae91cf2 -r fae358fe1737 sys/arch/i386/stand/lib/libi386.h
--- a/sys/arch/i386/stand/lib/libi386.h Sun Apr 23 19:55:51 2000 +0000
+++ b/sys/arch/i386/stand/lib/libi386.h Sun Apr 23 19:57:12 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: libi386.h,v 1.10 1999/12/21 14:22:54 drochner Exp $ */
+/* $NetBSD: libi386.h,v 1.11 2000/04/23 19:57:14 tsarna Exp $ */
/*
* Copyright (c) 1996
@@ -50,6 +50,7 @@
int getbasemem __P((void));
int getextmemx __P((void));
int getextmem1 __P((void));
+int biosvideomode __P((void));
#ifdef CONSERVATIVE_MEMDETECT
#define getextmem() getextmem1()
#else
Home |
Main Index |
Thread Index |
Old Index