Commit Graph
17 Commits
Author SHA1 Message Date
robertmh fe11b298f6 2008-03-28 Robert Millan <rmh@aybabtu.com>
Surpass 1 TiB disk addressing limit.  Note: there are no plans to handle
        the 2 TiB disk limit in GRUB Legacy, since that would need considerable
        rework.  If you have >2TiB disks, use GRUB 2 instead.

        * grub/asmstub.c (biosdisk): Add unsigned qualifier to `sector'.
        * stage2/bios.c (biosdisk): Likewise.
        * stage2/disk_io.c (rawread, devread, rawwrite, devwrite): Likewise.
        * stage2/shared.h (rawread, devread, rawwrite, devwrite): Likewise.
        * lib/device.c (get_drive_geometry): Replace BLKGETSIZE with
        BLKGETSIZE64.
2008-03-28 13:22:28 +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 da7278fc6d 2003-01-29 Yoshinori K. Okuji <okuji@enbug.org>
From Ilguiz Latypov:
	* configure.in: Fix a syntax error in a sed script.
	* stage2/bios.c (get_diskinfo): PhoenixBIOS 4.0 Revision 6.0
	for ZF Micro might understand the greater buffer size for the
	"get drive parameters" int 0x13 call in its own way.
	Supposedly the BIOS assumes even bigger space is available and
	thus corrupts the stack.  This is why we specify the exactly
	necessary size of 0x42 bytes.
2003-01-29 09:13:56 +00:00
okuji 4cd09c4b6a 2001-12-30 Yoshinori K. Okuji <okuji@gnu.org>
* stage2/bios.c (get_diskinfo): Clear out the structure DRP
	before calling get_diskinfo_int13_extensions, because the Ralf
	Brown's Interrupt List says that Dell machines using PhoenixBIOS
	4.0 Release 6.0 fail, if DRP.FLAGS is not zero. Setting the
	entire structure to zero may be overkill, but it should be safe.

	* stage2/char_io.c [STAGE1_5] (grub_memset): Defined.
2001-12-30 07:33:23 +00:00
okuji 3785f597a0 Don\'t use get_diskinfo_floppy. 2001-10-13 12:28:37 +00:00
okuji b1cdb09358 add a workaround for Thinkpad X20. 2000-12-13 17:11:19 +00:00
okuji e3daf570b2 add another workaround for buggy BIOSes into get_diskinfo. 2000-11-10 15:33:10 +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 72bae78465 fix a bug about a LBA check in stage2. 2000-06-03 06:08:05 +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 68b1a3d231 enable the fallback in bios.c, add new options into grub-install. 2000-01-10 17:54:22 +00:00
okuji 2745c43fd4 skip CD-ROMs, avoid an automake bug, make sure that LBA read/write are supported, increase the number of devices to be probed. 1999-12-29 01:27:35 +00:00
okuji 7e9a0794d0 fix potential bugs in some LBA code 1999-08-12 09:38:44 +00:00
okuji cb6a267f1e some bug fixes 1999-07-26 11:04:09 +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 9350d46a2a build process is cleaned up 1999-06-24 00:03:29 +00:00