summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1997-07-31 08:07:54 +0000
committerphk <phk@FreeBSD.org>1997-07-31 08:07:54 +0000
commit6d1ddc2e2dee48d853bb19c4bbc9fb72139742c7 (patch)
treea89e65b194e8335fecd0eef3256c396db81e2c29
parent29728add12d02d8c9c21274b640d1f31e730cf55 (diff)
downloadFreeBSD-src-6d1ddc2e2dee48d853bb19c4bbc9fb72139742c7.zip
FreeBSD-src-6d1ddc2e2dee48d853bb19c4bbc9fb72139742c7.tar.gz
Add support for booting in VESA 0x102 videomode. Corresponding patches to
syscons are being reviewed by sos.
-rw-r--r--sys/i386/boot/biosboot/Makefile5
-rw-r--r--sys/i386/boot/biosboot/bios.S30
-rw-r--r--sys/i386/boot/biosboot/boot.c12
-rw-r--r--sys/i386/include/bootinfo.h5
4 files changed, 46 insertions, 6 deletions
diff --git a/sys/i386/boot/biosboot/Makefile b/sys/i386/boot/biosboot/Makefile
index 3344134..de820a8 100644
--- a/sys/i386/boot/biosboot/Makefile
+++ b/sys/i386/boot/biosboot/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.56 1997/04/25 19:37:58 bde Exp $
+# $Id: Makefile,v 1.57 1997/06/09 05:10:54 bde Exp $
#
PROG= boot
@@ -10,7 +10,8 @@ BINDIR= /usr/mdec
BINMODE= 444
CFLAGS= -O2 -malign-functions=0 -malign-jumps=0 -malign-loops=0 \
-mno-486 \
- -DDO_BAD144 -DBOOTWAIT=${BOOTWAIT} -DTIMEOUT=${TIMEOUT}
+ -DVESA_SUPPORT -DDO_BAD144 \
+ -DBOOTWAIT=${BOOTWAIT} -DTIMEOUT=${TIMEOUT}
CFLAGS+= -DBOOTSEG=${BOOTSEG} -DBOOTSTACK=${BOOTSTACK}
CFLAGS+= -I${.CURDIR}/../../..
CFLAGS+= ${CWARNFLAGS}
diff --git a/sys/i386/boot/biosboot/bios.S b/sys/i386/boot/biosboot/bios.S
index 340e7a0..891d93a 100644
--- a/sys/i386/boot/biosboot/bios.S
+++ b/sys/i386/boot/biosboot/bios.S
@@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*
* from: Mach, Revision 2.2 92/04/04 11:34:26 rpd
- * $Id: bios.S,v 1.10 1997/05/16 10:39:59 bde Exp $
+ * $Id: bios.S,v 1.11 1997/07/12 10:23:15 joerg Exp $
*/
/*
@@ -476,3 +476,31 @@ xdone:
pop %ebx
pop %ebp
ret
+
+#ifdef VESA_SUPPORT
+ENTRY(vesa_mode)
+ push %ebp
+ mov %esp, %ebp
+ push %ebx
+ push %esi
+ push %edi
+
+ movw 0x8(%ebp), %bx
+
+ call EXT(prot_to_real)
+
+ data32
+ mov $0x4f02, %eax
+ sti
+ int $0x10
+ cli
+
+ data32
+ call EXT(real_to_prot)
+
+ pop %edi
+ pop %esi
+ pop %ebx
+ pop %ebp
+ ret
+#endif
diff --git a/sys/i386/boot/biosboot/boot.c b/sys/i386/boot/biosboot/boot.c
index 0257d8e..8b1ae11 100644
--- a/sys/i386/boot/biosboot/boot.c
+++ b/sys/i386/boot/biosboot/boot.c
@@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*
* from: Mach, [92/04/03 16:51:14 rvb]
- * $Id: boot.c,v 1.66 1997/06/09 05:10:55 bde Exp $
+ * $Id: boot.c,v 1.67 1997/06/14 10:00:42 bde Exp $
*/
@@ -201,6 +201,12 @@ loadprog(void)
unsigned pad;
char *s, *t;
+
+#ifdef VESA_SUPPORT
+ if (bootinfo.bi_vesa)
+ vesa_mode(bootinfo.bi_vesa);
+#endif
+
read((void *)&head, sizeof(head));
if ( N_BADMAG(head)) {
printf("Invalid format!\n");
@@ -381,6 +387,10 @@ nextarg:
goto nextarg;
if (c == 'a')
f |= RB_ASKNAME;
+#ifdef VESA_SUPPORT
+ if (c == 'b')
+ bootinfo.bi_vesa = 0x102;
+#endif
if (c == 'C')
f |= RB_CDROM;
if (c == 'c')
diff --git a/sys/i386/include/bootinfo.h b/sys/i386/include/bootinfo.h
index 3ad09db..d91b2a8 100644
--- a/sys/i386/include/bootinfo.h
+++ b/sys/i386/include/bootinfo.h
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: bootinfo.h,v 1.7 1997/02/22 09:33:57 peter Exp $
*/
#ifndef _MACHINE_BOOTINFO_H_
@@ -55,7 +55,8 @@ struct bootinfo {
unsigned long bi_bios_geom[N_BIOS_GEOM];
unsigned int bi_size;
unsigned char bi_memsizes_valid;
- unsigned char bi_pad[3];
+ unsigned char bi_pad[1];
+ unsigned short bi_vesa;
unsigned long bi_basemem;
unsigned long bi_extmem;
unsigned long bi_symtab;
OpenPOWER on IntegriCloud