diff options
author | msmith <msmith@FreeBSD.org> | 1999-07-28 20:07:12 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 1999-07-28 20:07:12 +0000 |
commit | 0adfd0204463db90782d5e7b23c0815f4ab45365 (patch) | |
tree | 634430dc5b8739eb437185723171cbd37066643a /sys/i386/apm | |
parent | 61cc9f6d68d8b55cedeafe16ebb835fae2143395 (diff) | |
download | FreeBSD-src-0adfd0204463db90782d5e7b23c0815f4ab45365.zip FreeBSD-src-0adfd0204463db90782d5e7b23c0815f4ab45365.tar.gz |
Remove unused real-mode APM init functions.
Diffstat (limited to 'sys/i386/apm')
-rw-r--r-- | sys/i386/apm/apm_init/Makefile | 74 | ||||
-rw-r--r-- | sys/i386/apm/apm_init/apm_init.S | 212 | ||||
-rw-r--r-- | sys/i386/apm/apm_init/apm_init.inc | 125 | ||||
-rw-r--r-- | sys/i386/apm/apm_init/bin2asm.c | 76 | ||||
-rw-r--r-- | sys/i386/apm/apm_init/real_prot.S | 184 | ||||
-rw-r--r-- | sys/i386/apm/apm_init/real_prot.h | 56 | ||||
-rw-r--r-- | sys/i386/apm/apm_init/rmaouthdr | 6 | ||||
-rw-r--r-- | sys/i386/apm/apm_init/table.c | 26 |
8 files changed, 0 insertions, 759 deletions
diff --git a/sys/i386/apm/apm_init/Makefile b/sys/i386/apm/apm_init/Makefile deleted file mode 100644 index f09d767..0000000 --- a/sys/i386/apm/apm_init/Makefile +++ /dev/null @@ -1,74 +0,0 @@ -# -# APM (Advanced Power Management) BIOS Device Driver -# -# Copyright (c) 1994-1995 by HOSOKAWA, Tatsumi <hosokawa@jp.FreeBSD.org> -# -# This software may be used, modified, copied, and distributed, in -# both source and binary form provided that the above copyright and -# these terms are retained. Under no circumstances is the author -# responsible for the proper functioning of this software, nor does -# the author assume any responsibility for damages incurred with its -# use. -# -# Sep., 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) -# -# $Id: Makefile,v 1.7 1997/03/09 16:46:04 kato Exp $ -# - -OBJS = apm_init.o real_prot.o table.o -CFLAGS = -DKERNEL -DINITIALIZER -OPTFLAGS = -O2 -I386INCDIR = ${.CURDIR}/../../include -INC= -I$(I386INCDIR) - -all: apm_init.inc - -.SUFFIXES: .c .S .o - -.c.o: - $(CC) $(CFLAGS) $(OPTFLAGS) $(INC) -c $< - -.S.o: - $(CC) $(CFLAGS) $(INC) -c $< - -apm_init.inc: apm_initat.inc apm_init98.inc - echo "#ifdef PC98" > apm_init.inc - cat apm_init98.inc >> apm_init.inc - echo "#else" >> apm_init.inc - cat apm_initat.inc >> apm_init.inc - echo "#endif" >> apm_init.inc - -apm_initat.inc: apm_initat bin2asm - ./bin2asm apm_initat apm_initat.inc - -apm_initat: $(OBJS) - rm -f $(OBJS) - make $(OBJS) - $(LD) -Bstatic -N -T 0 -o apm_initat $(OBJS) - cp apm_initat apm_initat.sym - @strip apm_initat - @sh ${.CURDIR}/rmaouthdr apm_initat apm_initat.tmp - @mv -f apm_initat.tmp apm_initat - -apm_init98.inc: apm_init98 bin2asm - ./bin2asm apm_init98 apm_init98.inc - -apm_init98: $(OBJS) - rm -f $(OBJS) - make CC="$(CC) -DPC98" $(OBJS) - $(LD) -Bstatic -N -T 0 -o apm_init98 $(OBJS) - cp apm_init98 apm_init98.sym - @strip apm_init98 - @sh ${.CURDIR}/rmaouthdr apm_init98 apm_init98.tmp - @mv -f apm_init98.tmp apm_init98 - -bin2asm: bin2asm.c - $(CC) -o bin2asm ${.CURDIR}/bin2asm.c - -allclean: clean - @rm -f apm_init.inc -clean: - @rm -f *.o apm_init98 apm_init98.inc apm_init98.sym \ - apm_initat apm_initat.inc apm_initat.sym apm_init apm_init.sym bin2asm - -.include <bsd.prog.mk> diff --git a/sys/i386/apm/apm_init/apm_init.S b/sys/i386/apm/apm_init/apm_init.S deleted file mode 100644 index bf8c2c6..0000000 --- a/sys/i386/apm/apm_init/apm_init.S +++ /dev/null @@ -1,212 +0,0 @@ -/* - * APM (Advanced Power Management) BIOS Device Driver - * - * Copyright (c) 1994-1995 by HOSOKAWA, Tatsumi <hosokawa@jp.FreeBSD.org> - * - * This software may be used, modified, copied, and distributed, in - * both source and binary form provided that the above copyright and - * these terms are retained. Under no circumstances is the author - * responsible for the proper functioning of this software, nor does - * the author assume any responsibility for damages incurred with its - * use. - * - * Sep., 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) - * - * $Id$ - */ - -/* - * If you want to know the specification of APM BIOS, see the following - * documentations, - * - * [1] Intel Corporation and Microsoft Corporation, "Advanced Power - * Management, The Next Generation, Version 1.0", Feb.,1992. - * - * [2] Intel Corporation and Microsoft Corporation, "Advanced Power - * Management (APM) BIOS Interface Specification Revision 1.1", - * Sep.,1993, Intel Order Number: 241704-001, Microsoft Part - * Number: 781-110-X01 - * - * or contact - * - * APM Support Desk (Intel Corporation, US) - * TEL: (800)628-8686 - * FAX: (916)356-6100. - */ - - .file "apm_init.S" - -#define ASM - -#include "real_prot.h" -#include "apm_bios.h" -#include "apm_segments.h" - -/* - * APM BIOS initializer - * - * Return value: - * %eax 0xffffffff Can't find APM BIOS - * 0xfffffffe Don't support 32bit connection - * 0xfffffffd Connection error - * otherwise APM version (16bit BCD format) - * %ebx APM cs entry offset (32bit) - * %ecx lower 16bit APM 16bit cs base (real mode segment) - * upper 16bit APM 32bit cs base (real mode segment) - * %edx lower 16bit APM ds limit (real mode segment) - * upper 16bit [Reserved] - * %esi lower 16bit APM cs limit (APM 1.1 or later) - * upper 16bit APM ds limit (APM 1.1 or later) - * %edi bit0 = 1 16bit protected mode interface supported - * bit1 = 1 32bit protected mode interface supported - * bit2 = 1 "CPU idle" call slows processor clock speed - * bit3 = 1 APM BIOS Power Management disabled - * bit4 = 1 APM BIOS Power Management disengaged - */ - - .text -ENTRY(apm_init) - cli /* disable interrupt */ - pushl %ebp /* save original base pointer */ - /* ebp is used as a register variable */ - /* - * save old data segments: We assume that %ds == %es && %ds == %ss - */ - pushl %fs - movw %ds, %ax - movw %ax, %fs - movw $(APM_INIT_DS_SEL), %ax /* initializer data segment */ - movw %ax, %ds - movw %ax, %es - movw %ax, %ss - movl %esp, old_esp /* save original stack pointer */ - movl $0x10000, %esp /* setup temporary stack */ - /* (note that it isn't 0x00000000) */ - - sidt EXT(Idtr_prot) /* save current IDT */ - call EXT(prot_to_real) /* return to real mode */ - - /* - * APM installation check - */ - movb $(APM_BIOS), %ah - movb $(APM_INSTCHECK), %al - data32 - movl $(PMDV_APMBIOS), %ebx - sti - int $(SYSTEM_BIOS) /* call system BIOS */ - cli - - jnc 1f /* if found, goto 1f */ - - data32 - call EXT(real_to_prot) /* come back again to protected mode */ - movl $(APMINI_CANTFIND), apm_version - /* can't find APM BIOS */ - jmp finish - -1: - movl %eax, %edx /* actually, movw %ax, %dx */ - /* save the value of %ax */ - data32 - call EXT(real_to_prot) /* come back again to protected mode */ - cmpw $0x504d, %bx /* "PM" signature? */ - jz 1f - - movl $(APMINI_CANTFIND), apm_version - /* can't find APM BIOS */ - jmp finish - -1: - testl $(APM_32BIT_SUPPORT), %ecx - /* supports 32bit connection? */ - jnz 1f - - movl $(APMINI_NOT32BIT), apm_version - /* don't support 32bit connection */ - jmp finish -1: - andl $0x0000ffff, %edx - movl %edx, apm_version - andl $0x0000ffff, %ecx - movl %ecx, apm_flags - - /* - * APM Protected Mode 32-bit Interface Connect - */ - call EXT(prot_to_real) /* return to real mode */ - - /* Disconnect, just in case */ - movb $(APM_BIOS), %ah - movb $(APM_DISCONNECT), %al - data32 - movl $(PMDV_APMBIOS), %ebx - sti - int $(SYSTEM_BIOS) - cli - - /* Ignore return code, but we can now connect safely */ - movb $(APM_BIOS), %ah - movb $(APM_PROT32CONNECT), %al - data32 - movl $(PMDV_APMBIOS), %ebx - sti - int $(SYSTEM_BIOS) - cli - jnc 1f /* if successed, go to 1f */ - data32 - call EXT(real_to_prot) - movl $(APMINI_CONNECTERR), apm_version - /* connection error */ - jmp finish -1: - /* save PM 32bit code segment into %bp */ - movl %eax, %ebp /* actually, movw %ax, %bp */ - data32 - call EXT(real_to_prot) - movl $0x0000ffff, %eax - andl %eax, %ebp /* 32bit cs base */ - andl %eax, %ecx /* 16bit cs base */ - andl %eax, %edx /* ds base */ - andl %eax, %esi /* cs length (APM 1.1 or later) */ - andl %eax, %edi /* ds length (APM 1.1 or later) */ - /* %ebx is code offset */ - /* pack 32bit cs and 16bit cs into %ecx */ - shll $16, %ebp - orl %ebp, %ecx - /* pack cs length and ds length into %esi */ - shll $16, %edi - orl %edi, %esi -finish: - cli - lidt EXT(Idtr_prot) /* restore old IDTR */ - movl old_esp, %esp /* restore old stack pointer */ - movl apm_version, %ebp /* stored to %eax later */ - movl apm_flags, %edi - movw %fs, %ax - movw %ax, %ss - movw %ax, %es - movw %ax, %ds - movl %ebp, %eax - popl %fs - popl %ebp /* restore old base pointer */ - lret /* restore old code segment */ - - .data - - .globl EXT(ouraddr) -LEXT(ouraddr) - .long APM_OURADDR - -old_esp: - .long 0 -apm_version: - .long 0 -apm_flags: - .long 0 -old_ds: - .word 0 -old_es: - .word 0 -old_ss: - .word 0 diff --git a/sys/i386/apm/apm_init/apm_init.inc b/sys/i386/apm/apm_init/apm_init.inc deleted file mode 100644 index 74000e3..0000000 --- a/sys/i386/apm/apm_init/apm_init.inc +++ /dev/null @@ -1,125 +0,0 @@ -#ifdef PC98 -/* This file is automatically generated by bin2asm */ -/* Original file is 'apm_init98' */ - - .byte 0xfa, 0x55, 0x0f, 0xa0, 0x66, 0x8c, 0xd8, 0x66 - .byte 0x8e, 0xe0, 0x66, 0xb8, 0xe8, 0x00, 0x66, 0x8e - .byte 0xd8, 0x66, 0x8e, 0xc0, 0x66, 0x8e, 0xd0, 0x89 - .byte 0x25, 0x94, 0x01, 0x00, 0x00, 0xbc, 0x00, 0x00 - .byte 0x01, 0x00, 0x0f, 0x01, 0x0d, 0xb0, 0x01, 0x00 - .byte 0x00, 0xe8, 0x22, 0x01, 0x00, 0x00, 0xb4, 0x9a - .byte 0xb0, 0x00, 0x66, 0xbb, 0x00, 0x00, 0x00, 0x00 - .byte 0xfb, 0xcd, 0x1f, 0xfa, 0x73, 0x15, 0x66, 0xe8 - .byte 0xdc, 0x00, 0x00, 0x00, 0xc7, 0x05, 0x98, 0x01 - .byte 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xe9, 0xa0 - .byte 0x00, 0x00, 0x00, 0x89, 0xc2, 0x66, 0xe8, 0xc5 - .byte 0x00, 0x00, 0x00, 0x66, 0x81, 0xfb, 0x4d, 0x50 - .byte 0x74, 0x0f, 0xc7, 0x05, 0x98, 0x01, 0x00, 0x00 - .byte 0xff, 0xff, 0xff, 0xff, 0xe9, 0x82, 0x00, 0x00 - .byte 0x00, 0xf7, 0xc1, 0x02, 0x00, 0x00, 0x00, 0x75 - .byte 0x0c, 0xc7, 0x05, 0x98, 0x01, 0x00, 0x00, 0xfe - .byte 0xff, 0xff, 0xff, 0xeb, 0x6e, 0x81, 0xe2, 0xff - .byte 0xff, 0x00, 0x00, 0x89, 0x15, 0x98, 0x01, 0x00 - .byte 0x00, 0x81, 0xe1, 0xff, 0xff, 0x00, 0x00, 0x89 - .byte 0x0d, 0x9c, 0x01, 0x00, 0x00, 0xe8, 0xae, 0x00 - .byte 0x00, 0x00, 0xb4, 0x9a, 0xb0, 0x04, 0x66, 0xbb - .byte 0x00, 0x00, 0x00, 0x00, 0xfb, 0xcd, 0x1f, 0xfa - .byte 0xb4, 0x9a, 0xb0, 0x03, 0x66, 0xbb, 0x00, 0x00 - .byte 0x00, 0x00, 0xfb, 0xcd, 0x1f, 0xfa, 0x73, 0x12 - .byte 0x66, 0xe8, 0x5a, 0x00, 0x00, 0x00, 0xc7, 0x05 - .byte 0x98, 0x01, 0x00, 0x00, 0xfd, 0xff, 0xff, 0xff - .byte 0xeb, 0x21, 0x89, 0xc5, 0x66, 0xe8, 0x46, 0x00 - .byte 0x00, 0x00, 0xb8, 0xff, 0xff, 0x00, 0x00, 0x21 - .byte 0xc5, 0x21, 0xc1, 0x21, 0xc2, 0x21, 0xc6, 0x21 - .byte 0xc7, 0xc1, 0xe5, 0x10, 0x09, 0xe9, 0xc1, 0xe7 - .byte 0x10, 0x09, 0xfe, 0xfa, 0x0f, 0x01, 0x1d, 0xb0 - .byte 0x01, 0x00, 0x00, 0x8b, 0x25, 0x94, 0x01, 0x00 - .byte 0x00, 0x8b, 0x2d, 0x98, 0x01, 0x00, 0x00, 0x8b - .byte 0x3d, 0x9c, 0x01, 0x00, 0x00, 0x66, 0x8c, 0xe0 - .byte 0x66, 0x8e, 0xd0, 0x66, 0x8e, 0xc0, 0x66, 0x8e - .byte 0xd8, 0x89, 0xe8, 0x0f, 0xa1, 0x5d, 0xcb, 0x00 - .byte 0xfa, 0x0f, 0x20, 0xc0, 0x66, 0x83, 0xc8, 0x01 - .byte 0x0f, 0x22, 0xc0, 0x66, 0xea, 0x33, 0x01, 0x00 - .byte 0x00, 0xe0, 0x00, 0x66, 0xb8, 0xe8, 0x00, 0x8e - .byte 0xd8, 0x8e, 0xd0, 0x8e, 0xc0, 0x0f, 0x01, 0x1d - .byte 0xb0, 0x01, 0x00, 0x00, 0xc3, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x66, 0xb8, 0xf8, 0x00, 0xea, 0x5b, 0x01, 0x00 - .byte 0x00, 0xf0, 0x00, 0x8e, 0xd8, 0x8e, 0xd0, 0x8e - .byte 0xc0, 0x0f, 0x20, 0xc0, 0x66, 0x83, 0xe0, 0xfe - .byte 0x0f, 0x22, 0xc0, 0x66, 0xea, 0x73, 0x01, 0x00 - .byte 0x00, 0x00, 0x80, 0x8c, 0xc8, 0x8e, 0xd8, 0x8e - .byte 0xd0, 0x8e, 0xc0, 0x67, 0x66, 0x0f, 0x01, 0x1d - .byte 0xb6, 0x01, 0x00, 0x00, 0x66, 0xc3, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - -/* Total size = 0x01c0 */ -#else -/* This file is automatically generated by bin2asm */ -/* Original file is 'apm_initat' */ - - .byte 0xfa, 0x55, 0x0f, 0xa0, 0x66, 0x8c, 0xd8, 0x66 - .byte 0x8e, 0xe0, 0x66, 0xb8, 0xe8, 0x00, 0x66, 0x8e - .byte 0xd8, 0x66, 0x8e, 0xc0, 0x66, 0x8e, 0xd0, 0x89 - .byte 0x25, 0x94, 0x01, 0x00, 0x00, 0xbc, 0x00, 0x00 - .byte 0x01, 0x00, 0x0f, 0x01, 0x0d, 0xb0, 0x01, 0x00 - .byte 0x00, 0xe8, 0x22, 0x01, 0x00, 0x00, 0xb4, 0x53 - .byte 0xb0, 0x00, 0x66, 0xbb, 0x00, 0x00, 0x00, 0x00 - .byte 0xfb, 0xcd, 0x15, 0xfa, 0x73, 0x15, 0x66, 0xe8 - .byte 0xdc, 0x00, 0x00, 0x00, 0xc7, 0x05, 0x98, 0x01 - .byte 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xe9, 0xa0 - .byte 0x00, 0x00, 0x00, 0x89, 0xc2, 0x66, 0xe8, 0xc5 - .byte 0x00, 0x00, 0x00, 0x66, 0x81, 0xfb, 0x4d, 0x50 - .byte 0x74, 0x0f, 0xc7, 0x05, 0x98, 0x01, 0x00, 0x00 - .byte 0xff, 0xff, 0xff, 0xff, 0xe9, 0x82, 0x00, 0x00 - .byte 0x00, 0xf7, 0xc1, 0x02, 0x00, 0x00, 0x00, 0x75 - .byte 0x0c, 0xc7, 0x05, 0x98, 0x01, 0x00, 0x00, 0xfe - .byte 0xff, 0xff, 0xff, 0xeb, 0x6e, 0x81, 0xe2, 0xff - .byte 0xff, 0x00, 0x00, 0x89, 0x15, 0x98, 0x01, 0x00 - .byte 0x00, 0x81, 0xe1, 0xff, 0xff, 0x00, 0x00, 0x89 - .byte 0x0d, 0x9c, 0x01, 0x00, 0x00, 0xe8, 0xae, 0x00 - .byte 0x00, 0x00, 0xb4, 0x53, 0xb0, 0x04, 0x66, 0xbb - .byte 0x00, 0x00, 0x00, 0x00, 0xfb, 0xcd, 0x15, 0xfa - .byte 0xb4, 0x53, 0xb0, 0x03, 0x66, 0xbb, 0x00, 0x00 - .byte 0x00, 0x00, 0xfb, 0xcd, 0x15, 0xfa, 0x73, 0x12 - .byte 0x66, 0xe8, 0x5a, 0x00, 0x00, 0x00, 0xc7, 0x05 - .byte 0x98, 0x01, 0x00, 0x00, 0xfd, 0xff, 0xff, 0xff - .byte 0xeb, 0x21, 0x89, 0xc5, 0x66, 0xe8, 0x46, 0x00 - .byte 0x00, 0x00, 0xb8, 0xff, 0xff, 0x00, 0x00, 0x21 - .byte 0xc5, 0x21, 0xc1, 0x21, 0xc2, 0x21, 0xc6, 0x21 - .byte 0xc7, 0xc1, 0xe5, 0x10, 0x09, 0xe9, 0xc1, 0xe7 - .byte 0x10, 0x09, 0xfe, 0xfa, 0x0f, 0x01, 0x1d, 0xb0 - .byte 0x01, 0x00, 0x00, 0x8b, 0x25, 0x94, 0x01, 0x00 - .byte 0x00, 0x8b, 0x2d, 0x98, 0x01, 0x00, 0x00, 0x8b - .byte 0x3d, 0x9c, 0x01, 0x00, 0x00, 0x66, 0x8c, 0xe0 - .byte 0x66, 0x8e, 0xd0, 0x66, 0x8e, 0xc0, 0x66, 0x8e - .byte 0xd8, 0x89, 0xe8, 0x0f, 0xa1, 0x5d, 0xcb, 0x00 - .byte 0xfa, 0x0f, 0x20, 0xc0, 0x66, 0x83, 0xc8, 0x01 - .byte 0x0f, 0x22, 0xc0, 0x66, 0xea, 0x33, 0x01, 0x00 - .byte 0x00, 0xe0, 0x00, 0x66, 0xb8, 0xe8, 0x00, 0x8e - .byte 0xd8, 0x8e, 0xd0, 0x8e, 0xc0, 0x0f, 0x01, 0x1d - .byte 0xb0, 0x01, 0x00, 0x00, 0xc3, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x66, 0xb8, 0xf8, 0x00, 0xea, 0x5b, 0x01, 0x00 - .byte 0x00, 0xf0, 0x00, 0x8e, 0xd8, 0x8e, 0xd0, 0x8e - .byte 0xc0, 0x0f, 0x20, 0xc0, 0x66, 0x83, 0xe0, 0xfe - .byte 0x0f, 0x22, 0xc0, 0x66, 0xea, 0x73, 0x01, 0x00 - .byte 0x00, 0x00, 0x80, 0x8c, 0xc8, 0x8e, 0xd8, 0x8e - .byte 0xd0, 0x8e, 0xc0, 0x67, 0x66, 0x0f, 0x01, 0x1d - .byte 0xb6, 0x01, 0x00, 0x00, 0x66, 0xc3, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - -/* Total size = 0x01c0 */ -#endif diff --git a/sys/i386/apm/apm_init/bin2asm.c b/sys/i386/apm/apm_init/bin2asm.c deleted file mode 100644 index 8433485..0000000 --- a/sys/i386/apm/apm_init/bin2asm.c +++ /dev/null @@ -1,76 +0,0 @@ -/* - * APM (Advanced Power Management) BIOS Device Driver - * - * Copyright (c) 1994-1995 by HOSOKAWA, Tatsumi <hosokawa@jp.FreeBSD.org> - * - * This software may be used, modified, copied, and distributed, in - * both source and binary form provided that the above copyright and - * these terms are retained. Under no circumstances is the author - * responsible for the proper functioning of this software, nor does - * the author assume any responsibility for damages incurred with its - * use. - * - * Sep., 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) - * - * $Id: bin2asm.c,v 1.6 1997/02/22 09:29:53 peter Exp $ - */ - -#include <stdio.h> - -#define NCOLS 8 - -int main(int argc, char *argv[]) -{ - int c, col, lastline; - FILE *infile, *outfile; - - if (argc != 3) { - fprintf(stderr, "Usage: %s infile outfile\n", argv[0]); - exit(1); - } - - if ((infile = fopen(argv[1], "rb")) == NULL) { - fprintf(stderr, "Can't open %s.\n", argv[1]); - exit(1); - } - - if ((outfile = fopen(argv[2], "wb")) == NULL) { - fprintf(stderr, "Can't open %s.\n", argv[2]); - exit(1); - } - - col = 0; - - fprintf(outfile, "/* This file is automatically generated by bin2asm */\n"); - fprintf(outfile, "/* Original file is '%s' */\n\n", argv[1]); - - lastline = 0; - - while ((c = fgetc(infile)) != EOF) { - if (col % NCOLS == 0) { - fprintf(outfile, "\t.byte\t"); - } - fprintf(outfile, "0x%02x", c); - if (col % NCOLS == NCOLS - 1) { - fprintf(outfile, "\n"); - lastline = 1; - } - else { - fprintf(outfile, ", "); - lastline = 0; - } - col++; - } - if (!lastline) { - do { - fprintf(outfile, "0x00, "); - } while ((col++) % NCOLS < NCOLS - 2); - fprintf(outfile, "0x00\n"); - } - - fprintf(outfile, "\n/* Total size = 0x%04x */\n", col); - - fclose(infile); - fclose(outfile); - return 0; -} diff --git a/sys/i386/apm/apm_init/real_prot.S b/sys/i386/apm/apm_init/real_prot.S deleted file mode 100644 index ca8716d..0000000 --- a/sys/i386/apm/apm_init/real_prot.S +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Mach Operating System - * Copyright (c) 1992, 1991 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - * - * from: Mach, Revision 2.2 92/04/04 11:34:13 rpd - * $Id: real_prot.S,v 1.5 1997/02/22 09:29:54 peter Exp $ - */ - - -/* - Copyright 1988, 1989, 1990, 1991, 1992 - by Intel Corporation, Santa Clara, California. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appears in all -copies and that both the copyright notice and this permission notice -appear in supporting documentation, and that the name of Intel -not be used in advertising or publicity pertaining to distribution -of the software without specific, written prior permission. - -INTEL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, -IN NO EVENT SHALL INTEL BE LIABLE FOR ANY SPECIAL, INDIRECT, OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT, -NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION -WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -/* - * Copyright (C) 1994 by HOSOKAWA, Tatsumi <hosokawa@jp.FreeBSD.org> - * - * This software may be used, modified, copied, and distributed, in - * both source and binary form provided that the above copyright and - * these terms are retained. Under no circumstances is the author - * responsible for the proper functioning of this software, nor does - * the author assume any responsibility for damages incurred with its - * use. - * - * Sep., 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) - */ - -/* - * Modified for APM BIOS initializer by HOSOKAWA Tatsumi - * - * See also locore.s. - * (This file is based directly on /sys/i386/boot/biosboot/asm.S) - */ - - .file "real_prot.S" - -#include "real_prot.h" -#include "apm_segments.h" -#include "apm_bios.h" - -CR0_PE_ON = 0x1 -CR0_PE_OFF = 0xfffffffe - - .text - -/* - * - * real_to_prot() - * transfer from real mode to protected mode. - */ - -ENTRY(real_to_prot) - /* guarantee that interrupt is disabled when in prot mode */ - cli - - /* - * deleted for APM initializer by HOSOKAWA Tatsumi - * <hosoakwa@jp.FreeBSD.org> - */ -#if 0 - /* load the gdtr */ - addr32 - data32 - lgdt EXT(Gdtr) -#endif - - /* set the PE bit of CR0 */ - mov %cr0, %eax - - data32 - or $CR0_PE_ON, %eax - mov %eax, %cr0 - - /* - * make intrasegment jump to flush the processor pipeline and - * reload CS register - */ - data32 - ljmp $(APM_INIT_CS_SEL), $xprot -xprot: - - /* - * we are in USE32 mode now - * set up the protected mode segment registers : DS, SS, ES - */ - movw $(APM_INIT_DS_SEL), %ax /* data segment */ - mov %ax, %ds /* gas would waste a prefix byte for movw */ - mov %ax, %ss - mov %ax, %es - - /* load idtr so that we can enable interrupts */ - lidt EXT(Idtr_prot) - - ret - -/* - * - * prot_to_real() - * transfer from protected mode to real mode - * - */ - -ENTRY(prot_to_real) - - /* Prepare %ax while we're still in a mode that gas understands. */ - movw $(APM_INIT_DS16_SEL), %ax - - /* Change to use16 mode. */ - ljmp $(APM_INIT_CS16_SEL), $x16 -x16: - - mov %ax, %ds - mov %ax, %ss - mov %ax, %es - - /* clear the PE bit of CR0 */ - mov %cr0, %eax - data32 - and $CR0_PE_OFF, %eax - mov %eax, %cr0 - - /* - * make intersegment jmp to flush the processor pipeline - * and reload CS register - */ - data32 - ljmp $(APM_OURADDR>>4), $xreal -xreal: - - /* - * we are in real mode now - * set up the real mode segment registers : DS, SS, ES - */ - mov %cs, %ax - mov %ax, %ds - mov %ax, %ss - mov %ax, %es - - /* load idtr so that we can enable interrupts */ - addr32 - data32 - lidt EXT(Idtr_real) - - data32 - ret diff --git a/sys/i386/apm/apm_init/real_prot.h b/sys/i386/apm/apm_init/real_prot.h deleted file mode 100644 index 1da53b4..0000000 --- a/sys/i386/apm/apm_init/real_prot.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Mach Operating System - * Copyright (c) 1991,1990,1989 Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify and distribute this software and its - * documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR - * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie Mellon - * the rights to redistribute these changes. - * - * from: Mach, Revision 2.7 92/02/29 15:33:41 rpd - * $Id: real_prot.h,v 1.6 1997/02/22 09:29:54 peter Exp $ - */ - -/* - * Copyright (C) 1994 by HOSOKAWA, Tatsumi <hosokawa@jp.FreeBSD.org> - * - * This software may be used, modified, copied, and distributed, in - * both source and binary form provided that the above copyright and - * these terms are retained. Under no circumstances is the author - * responsible for the proper functioning of this software, nor does - * the author assume any responsibility for damages incurred with its - * use. - * - * Sep., 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) - * Nov., 1994 Committed to FreeBSD 2.0-current - * Jan., 1995 Ported to RT-Mach 3.0 MK83g - */ - -/* - * Modified to APM BIOS initializer by HOSOKAWA, Tatsumi - */ - -#define ALIGN 4 -#define EXT(x) _ ## x -#define LEXT(x) _ ## x ## : - -#define addr32 .byte 0x67 -#define data32 .byte 0x66 - -#define ENTRY(x) .globl EXT(x); .align ALIGN; LEXT(x) diff --git a/sys/i386/apm/apm_init/rmaouthdr b/sys/i386/apm/apm_init/rmaouthdr deleted file mode 100644 index 4bb9c84..0000000 --- a/sys/i386/apm/apm_init/rmaouthdr +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/csh -f -# -# from: Mach, Revision 2.2 92/04/04 11:36:01 rpd -# $Id$ -# -dd if=$1 of=$2 ibs=32 skip=1 obs=1024b diff --git a/sys/i386/apm/apm_init/table.c b/sys/i386/apm/apm_init/table.c deleted file mode 100644 index 9935bf7..0000000 --- a/sys/i386/apm/apm_init/table.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * APM (Advanced Power Management) BIOS Device Driver - * - * Copyright (c) 1994-1995 by HOSOKAWA, Tatsumi <hosokawa@jp.FreeBSD.org> - * - * This software may be used, modified, copied, and distributed, in - * both source and binary form provided that the above copyright and - * these terms are retained. Under no circumstances is the author - * responsible for the proper functioning of this software, nor does - * the author assume any responsibility for damages incurred with its - * use. - * - * Sep., 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) - * - * $Id$ - */ - -#include <apm_bios.h> - -struct pseudo_desc { - unsigned short limit; - unsigned long base __attribute__ ((packed)); -}; - -struct pseudo_desc Idtr_prot = { 0, 0 }; /* filled on run time */ -struct pseudo_desc Idtr_real = { 0x400 - 1, 0x0 }; |