Commit Graph
36 Commits
Author SHA1 Message Date
okuji 041e243877 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/builtins.c (install_func): If DEST_DRIVE is a hard
  disk, enable the workaround in Stage 1 by replacing the jmp
  with double nop's.

  * stage1/stage1.h (STAGE1_BOOT_DRIVE_CHECK): New macro.
  (STAGE1_BOOT_DRIVE_MASK): Removed.

  * stage1/stage1.S (boot_drive_check): New label. This implements
  a different workaround for buggy BIOSes which don't pass boot
  drive correctly. This is effective for BIOSes which pass a value
  without the seventh bit (0x80).
  (boot_drive_mask): Removed.
2005-02-15 22:05:07 +00:00
okuji 4f29a8af45 2004-03-27 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/char_io.c [!GRUB_UTIL] (memcpy): New function. It is
	defined as an alias of grub_memmove. This is copied from GRUB 2.

	* stage2/disk_io.c (print_completions): Simplified conditionals
	to make it easier to edit the file with Emacs.
	Added support for (cd).
	(set_device): Likewise.

	* stage2/common.c (init_bios_info): Check if BOOT_DRIVE is a
	CDROM drive. If it is true, set CDROM_DRIVE to BOOT_DRIVE.
	(cdrom_drive): New variable.

	From Leonid Lisovskiy <lly@pisem.net>:
	* stage2/start_eltorito.S: New file.

	* stage2/stage2.c (run_menu): Use GRUB_INVALID_DRIVE instead of
	0xFF.

	* stage2/shared.h (STAGE2_ID_ISO9660_STAGE1_5): New macro.
	[FSYS_ISO9660] (STAGE2_ID): Set to STAGE2_ID_ISO9660_STAGE1_5.
	(struct geometry): Added a new member ``sector_size''.
	(BIOSDISK_FLAG_CDROM): New macro.
	(cdrom_drive): Declared.

	* stage2/fsys_iso9660.c: New file.
	* stage2/iso9660.h: Likewise.

	* stage2/filesys.h (FSYS_ISO9660_NUM): New macro.
	[FSYS_ISO9660] (iso9660_mount): Declared.
	[FSYS_ISO9660] (iso9660_read): Likewise.
	[FSYS_ISO9660] (iso9660_dir): Likewise.
	(NUM_FSYS): Added FSYS_ISO9660_NUM.

	* stage2/disk_io.c (fsys_table) [FSYS_ISO9660]: Added iso9660.
	(current_drive): Use GRUB_INVALID_DRIVE.
	(log2): New function.
	(rawread): Use BUF_GEOM.SECTOR_SIZE instead of SECTOR_SIZE.
	Change the type of BUFADDR from int to char *.
	Use a virtual track to make sure that one track fits in the
	buffer.
	(sane_partition): Allow CURRENT_DRIVE to be CDROM_DRIVE, because
	a bios drive for a CD-ROM is often assigned to greater than
	0x88.
	(set_device): Use GRUB_INVALID_DRIVE instead of 0xFF.
	(setup_part): Likewise.

	* stage2/cmdline.c (init_cmdline): Use GRUB_INVALID_DRIVE.

	* stage2/builtins.c (install_func): Use GRUB_INVALID_DRIVE.
	(setup_func): Added iso9660_stage1_5.

	* stage2/bios.c (biosdisk): Don't fall back to the CHS mode
	if the drive is a CDROM.
	(get_cdinfo): New function.
	(get_diskinfo): Call get_cdinfo if the drive is greater than or
	equal to 0x88 or the drive supports LBA.
	Set the sector size to SECTOR_SIZE if it is not a CD-ROM.

	* stage2/asm.S (biosdisk_int13_extensions): Take a word
	argument AX instead of a byte argument AH.
	(get_diskinfo_int13_extensions): Removed.

	* stage2/Makefile.am (noinst_HEADERS): Added iso9660.h.
	(libgrub_a_SOURCES): Added fsys_iso9660.c.
	(libgrub_a_CFLAGS): Added -DFSYS_ISO9660=1.
	(pkgdata_DATA): Added iso9660_stage1_5 and stage2_eltorito.
	(noinst_PROGRAMS): Added iso9660_stage1_5.exec and
	start_eltorito.exec.
	(noinst_DATA): Added start_eltorito.
	(pre_stage2_exec_SOURCES): Added fsys_iso9660.c.
	(START_ELTORITO_LINK): New variable.
	(start_eltorito_exec_SOURCES): Likewise.
	(start_eltorito_exec_CCASFLAGS): Likewise.
	(start_eltorito_exec_LDFLAGS): Likewise.
	(start_eltorito_exec-start.$(OBJEXT)): New dependency.
	(stage2_eltorito): New target.
	(iso9660_stage1_5_exec_SOURCES): New variable.
	(iso9660_stage1_5_exec_CFLAGS): Likewise.
	(iso9660_stage1_5_exec_CCASFLAGS): Likewise.
	(iso9660_stage1_5_exec_LDFLAGS): Likewise.

	* stage1/stage1.h (GRUB_INVALID_DRIVE): New macro.

	* stage1/stage1.S (boot_drive): Use the macro GRUB_INVALID_DRIVE.
	(real_start): Likewise.

	* lib/device.c (get_drive_geometry): Set GEOM->SECTOR_SIZE to
	SECTOR_SIZE by default.

	* configure.ac (--disable-iso9660): New option.
2004-03-27 17:02:54 +00:00
okuji f8111d3b54 2002-12-11 Yoshinori K. Okuji <okuji@enbug.org>
Add a workaround for buggy BIOSes which don't pass boot drive
	correctly. The idea is that GRUB forces the fixed disk flag
	when booted from a hard disk. When BIOS loads GRUB directly,
	the boot drive must be either of 0x00 and 0x80, so this should
	work, if those BIOSes always pass zero to %dl. AFAIK, this
	assumption is always correct.

	* stage2/builtins.c (install_func): Store the fixed disk flag of
	the destination drive in BOOT_DRIVE_MASK in Stage 1.

	* stage1/stage1.h (STAGE1_BOOT_DRIVE_MASK): New macro.

	* stage1/stage1.S (boot_drive_mask): New variable. It is or'ed
	to %dl.
2002-12-10 17:30:29 +00:00
okuji 59d735d43f 2001-12-30 Yoshinori K. Okuji <okuji@gnu.org>
* stage1/stage1.S: Don't call INT 13, AH=48H, because it is
	difficult to call this function with the workaround implemented
	in the previous change due to the size limit of Stage 1.

	(lba_mode) [NO_BUGGY_BIOS_IN_THE_WORLD]: Don't check the
	geometry explicitly. This shouldn't be harmful, as INT 13,
	AH=42H should take care of it, and if you cannot read Stage 2
	even with LBA because of a geometry problem, you can never read
	it.

	* stage2/start.S (lba_mode) [NO_BUGGY_BIOS_IN_THE_WORLD]:
	Likewise.
2001-12-30 08:23:16 +00:00
okuji 728d26ca30 Add a workaround for AST BIOS. 2001-12-19 11:37:17 +00:00
okuji 3a150c2b37 Reorganize the file `AUTHOR', according to the current status of copyright
assignments received by the FSF.

Jason Thomas was added.
Erich Stefan Boleyn was moved into those who assigned their copyrights.
Gordon Matzigkeit was moved into the others, because he still wasn't listed
in fencepost.gnu.org:/gd/gnuorg/copyright.list.

The remaining problem is that we haven't had copyright assignments of
VaX#8, Heiko Schroeder and Gordon Matzigkeit. As for the first two, Erich
is now trying to contact them by proxy. So I'm just waiting.

As for Gordon.... oh, what are you doing, Gordon?! Hurry up, please!
2001-11-12 06:57:29 +00:00
gord c7159c3bdb Make NT magic explicit. 2001-05-29 04:38:21 +00:00
okuji b5381c0919 change boot messages. 2000-09-10 08:46:52 +00:00
okuji abca3d8f72 don't check if a sector of a disk is outside the disk in LBA mode by default, because some BIOSes don't return correct geometries. 2000-09-05 12:27:00 +00:00
okuji 7f6d84c46f add a workaround for binutils-2.9.1.0.x into stage1.S. 2000-08-30 19:06:30 +00:00
okuji f1c162c0c6 preserve a magic number used by Windows NT. 2000-08-26 17:28:27 +00:00
okuji d08bfbd094 shrink the code size of stage1. 2000-04-30 05:42:41 +00:00
okuji 92fca67cf5 make the LBA support bitmap checks configurable at the installation time. 2000-04-18 11:22:07 +00:00
okuji 844cb6f07d use _llseek even if glibc2.0 under Linux, add a new option --disable-lba-support-bitmap-check into configure. 2000-02-07 21:21:52 +00:00
okuji a033c6beb3 don't check if AH=42h is supported in stage1. 2000-01-11 09:33:09 +00:00
okuji a6d7cb06db check for the support bitmap in stage1. 1999-11-16 05:58:37 +00:00
okuji 9f88649c8c fallback to CHS if LBA fails in stage1. 1999-11-13 05:43:19 +00:00
okuji 9d7344365c add a workaround for some BIOSes into stage1, remove our own rult to produce info files. 1999-10-26 03:44:30 +00:00
okuji c14ac03919 add user-ref.texi. 1999-10-21 17:38:49 +00:00
okuji 3764236446 now stage1 supports both LBA and CHS. 1999-10-12 07:36:23 +00:00
okuji 3ccfc3bed1 reduce the size of Stage 1.5, improve the completion, fix some bugs. 1999-09-29 09:28:37 +00:00
gord 9bfb72e5d8 Add labels for the default blocklist. 1999-09-23 18:11:40 +00:00
okuji dc267a70d2 fix some bugs when COFF is used and some configure bugs. 1999-09-18 16:23:07 +00:00
okuji 4ea54f2d0a determine the size of Stage 2 automatically. 1999-09-15 05:41:03 +00:00
okuji be514997d2 add netboot support. 1999-09-14 06:55:57 +00:00
okuji 6608e1b9e2 The internal of the command handling is heavily modified, and a new command help is added. 1999-09-05 05:54:33 +00:00
okuji 95dfefd185 fix a bug in stage1_lba, and move all the constants in stage1 to stage1.h 1999-07-13 15:46:28 +00:00
okuji cb7e6d5e4e Bug fixes in the geometry detection. Linux video mode selection support. New Stage 1 stage1_lba is added. Stage 1.5 becomes much smaller. 1999-07-12 00:47:11 +00:00
okuji fc6fa9d5e2 add stage2 id 1999-06-27 08:34:46 +00:00
okuji bd6d015f8e fix a stage1 bug 1999-06-23 21:42:39 +00:00
okuji 0d6c15713b The debug version of Stage 2 is removed 1999-06-06 01:40:59 +00:00
gord 5cf05b32d2 Indented and started off the long journey to becoming an Automakified GNU package. 1999-02-28 18:37:50 +00:00
gord 6b874486ce Debian grub-0.5-2 release. 1999-02-22 03:11:52 +00:00
erich ae07073cec Changed stage1 to report error strings instead of single characters.
Removed display of characters on success, as it was confusing.
1998-08-20 20:52:57 +00:00
erich 1ce29ae611 Increased number of sectors to load for default "raw" floppy 1996-10-03 15:35:07 +00:00
erich d2dee25f8c Initial revision 1996-09-18 02:29:19 +00:00