From 36fd6bd0fab6678e52659fda9bf79e6db7851fb4 Mon Sep 17 00:00:00 2001 From: okuji Date: Sat, 27 Oct 2001 14:48:39 +0000 Subject: [PATCH] 2001-10-27 Yoshinori K. Okuji * stage2/apm.S: Always disconnect from APM. Written by Erich Stefan Boleyn. * util/Makefile.am (noinst_DATA): Removed. (EXTRA_DIST): Likewise. --- ChangeLog | 8 ++++++++ stage2/apm.S | 20 +++++++++----------- util/Makefile.am | 4 ++-- util/Makefile.in | 8 +++----- 4 files changed, 22 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index c38808891..7abcef0b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2001-10-27 Yoshinori K. Okuji + + * stage2/apm.S: Always disconnect from APM. Written by Erich + Stefan Boleyn. + + * util/Makefile.am (noinst_DATA): Removed. + (EXTRA_DIST): Likewise. + 2001-10-14 Gordon Matzigkeit * configure.in: Explicitly call _AM_DEPENDENCIES(CC) for the diff --git a/stage2/apm.S b/stage2/apm.S index b0da4f225..abf5e271c 100644 --- a/stage2/apm.S +++ b/stage2/apm.S @@ -1,6 +1,6 @@ /* * GRUB -- GRand Unified Bootloader - * Copyright (C) 2000 Free Software Foundation, Inc. + * Copyright (C) 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -91,12 +91,12 @@ ENTRY(get_apm_info) xorw %cx, %cx int $0x15 /* error -> should not happen, tidy up */ - jc apm_disconnect + jc done_apm_bios /* check for "PM" signature */ cmpw $0x504d, %bx /* no signature -> should not happen, tidy up */ - jne apm_disconnect + jne done_apm_bios /* record the APM BIOS version */ movw %ax, ABS(EXT_C(apm_bios_info)) @@ -104,19 +104,17 @@ ENTRY(get_apm_info) movw %cx, ABS(EXT_C(apm_bios_info)) + 12 jmp done_apm_bios -apm_disconnect: - /* Disconnect */ - movw $0x5304, %ax - xorw %bx, %bx - /* ignore return code */ - int $0x15 - jmp done_apm_bios - no_32_apm_bios: /* remove 32 bit support bit */ andw $0xfffd, ABS(EXT_C(apm_bios_info)) + 12 done_apm_bios: + /* Some paranoia here: Always Disconnect from APM */ + movw $0x5304, %ax + xorw %bx, %bx + /* ignore return code */ + int $0x15 + DATA32 call EXT_C(real_to_prot) .code32 diff --git a/util/Makefile.am b/util/Makefile.am index 2ac4de794..de26673a3 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -1,9 +1,9 @@ bin_PROGRAMS = mbchk sbin_SCRIPTS = grub-install grub-md5-crypt noinst_SCRIPTS = grub-image -noinst_DATA = menu.lst +#noinst_DATA = menu.lst -EXTRA_DIST = $(noinst_DATA) +#EXTRA_DIST = $(noinst_DATA) # XXX: Need to search for a header file in docs, because of multiboot.h. AM_CFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir)/docs diff --git a/util/Makefile.in b/util/Makefile.in index 31ab7fbac..eb9a38e0f 100644 --- a/util/Makefile.in +++ b/util/Makefile.in @@ -89,9 +89,9 @@ install_sh = @install_sh@ bin_PROGRAMS = mbchk sbin_SCRIPTS = grub-install grub-md5-crypt noinst_SCRIPTS = grub-image -noinst_DATA = menu.lst +#noinst_DATA = menu.lst -EXTRA_DIST = $(noinst_DATA) +#EXTRA_DIST = $(noinst_DATA) # XXX: Need to search for a header file in docs, because of multiboot.h. AM_CFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir)/docs @@ -125,8 +125,6 @@ CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ CFLAGS = @CFLAGS@ DIST_SOURCES = $(mbchk_SOURCES) -DATA = $(noinst_DATA) - DIST_COMMON = Makefile.am Makefile.in grub-image.in grub-install.in \ grub-md5-crypt.in SOURCES = $(mbchk_SOURCES) @@ -276,7 +274,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) +all-am: Makefile $(PROGRAMS) $(SCRIPTS) installdirs: $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir)