Detect LSI MegaRAID SAS (`mfi') devices on GNU/kFreeBSD.
* util/deviceiter.c [__FreeBSD_kernel__] (get_mfi_disk_name): New
function.
[__FreeBSD_kernel__] (grub_util_iterate_devices): Scan for mfi
(/dev/mfid[0-9]+) devices using get_mfi_disk_name().
* grub-core/video/video.c (grub_video_edid_checksum): New function.
(grub_video_edid_preferred_mode): Likewise. Try EDID followed by
the Flat Panel extension, in line with the X.org VESA driver.
* grub-core/video/i386/pc/vbe.c (grub_vbe_bios_get_flat_panel_info):
New function.
(grub_vbe_bios_get_ddc_capabilities): Likewise.
(grub_vbe_bios_read_edid): Likewise.
(grub_vbe_get_preferred_mode): Likewise.
(grub_video_vbe_setup): When the mode is "auto", try to get the
preferred mode from VBE, and use the largest mode that is no larger
than the preferred mode (some BIOSes expose a preferred mode that is
not in their mode list!). If this fails, fall back to 640x480 as a
safe conservative choice.
(grub_video_vbe_get_edid): New function.
(grub_video_vbe_adapter): Add get_edid.
* include/grub/video.h (struct grub_vbe_edid_info): New structure.
(struct grub_video_adapter): Add get_edid.
(grub_video_edid_checksum): Add prototype.
(grub_video_edid_preferred_mode): Likewise.
* include/grub/i386/pc/vbe.h (struct grub_vbe_flat_panel_info): New
structure.
* grub-core/commands/videoinfo.c (print_edid): New function.
(grub_cmd_videoinfo): Print EDID if available.
* util/grub.d/00_header.in (GRUB_GFXMODE): Default to "auto". This
is more appropriate on a wider range of platforms than 640x480.
* docs/grub.texi (Simple configuration): Update GRUB_GFXMODE
documentation.
* grub-core/Makefile.core.def (kernel): Remove kern/emu/getroot.c and
kern/emu/raid.c.
* grub-core/kern/emu/main.c (main): Don't try to guess root device. It's
useless.
* grub-core/kern/emu/misc.c (get_win32_path): Moved from here...
* util/getroot.c (get_win32_path): ... here.
* grub-core/kern/emu/misc.c (fini_libzfs): Moved from here...
* util/getroot.c (fini_libzfs): ... here.
* grub-core/kern/emu/misc.c (grub_get_libzfs_handle): Moved from here...
* util/getroot.c (grub_get_libzfs_handle): ... here.
* grub-core/kern/emu/misc.c (grub_find_zpool_from_dir):
Moved from here...
* util/getroot.c (grub_find_zpool_from_dir): ... here.
* grub-core/kern/emu/misc.c
(grub_make_system_path_relative_to_its_root): Moved from here...
* util/getroot.c (grub_make_system_path_relative_to_its_root): ... here.
* grub-core/kern/emu/getroot.c: Moved from here ...
* util/getroot.c: ... here. All users updated.
* grub-core/kern/emu/raid.c: Moved from here ...
* util/raid.c: ... here. All users updated.
* grub-core/Makefile.core.def (ata_pthru): Removed.
(ahci): New module.
(pata): Likewise.
* grub-core/bus/usb/ohci.c (GRUB_MOD_FINI): Unregister preboot hook
on unload.
* grub-core/commands/hdparm.c (grub_hdparm_do_ata_cmd): Use ATA
readwrite.
(grub_hdparm_do_check_powermode_cmd): Likewise.
(grub_hdparm_do_smart_cmd): Likewise.
(grub_hdparm_set_val_cmd): Likewise.
(grub_cmd_hdparm): Likewise. Check thta we have an ATA device.
* grub-core/disk/ahci.c: New file.
* grub-core/disk/ata.c: Factor out the low-level part into ...
* grub-core/disk/pata.c: ... here.
* grub-core/disk/ata_pthru.c: Contents moved to ...
* grub-core/disk/pata.c: ... here.
* grub-core/disk/scsi.c (grub_scsi_names): New array.
(grub_scsi_iterate): Use grub_scsi_names.
(grub_scsi_open): Likewise.
* grub-core/kern/disk.c (grub_disk_ata_pass_through): Removed.
* include/grub/ata.h (grub_ata_commands): Add DMA commands.
(grub_ata_regs_t): New struct.
(grub_disk_ata_pass_through_parms): Likewise.
(grub_ata_device): Renamed to ...
(grub_ata): ... this.
(grub_ata_dev): New struct.
Removed all low-level inline functions.
* include/grub/scsi.h: Add PATA and AHCI subsystems.
(grub_scsi_dev): Removed 'name' and 'id'. Added 'id' parameter to
iterate hooks and open. All users updated.
* util/grub-install.in: Handle AHCI disk module.
Detect `ataraid' devices on GNU/kFreeBSD. Fix for ATA devices using
`ata' driver on kernel of FreeBSD 9.
* util/deviceiter.c [__FreeBSD_kernel__] (get_ada_disk_name)
(get_ataraid_disk_name): New functions.
[__FreeBSD_kernel__] (grub_util_iterate_devices): Scan for ataraid
(/dev/ar[0-9]+) and ada (/dev/ada[0-9]+) devices using
get_ataraid_disk_name() and get_ada_disk_name().
allow both endiannesses coexist.
* configure.ac: proparate target_cpu=mipsel rather than resetting to
mips. All conditions adjusted.
* tests/util/grub-shell-tester.in: Remove gratuitious target_cpu
variable.
* util/grub-install.in: Adjust conditions to take renaming into account.
* util/grub-mkimage.c (image_targets): Likewise. New target
mips-qemu_mips-elf for bigendian mips.
* grub-core/boot/decompressor/none.c (grub_decompress_core): Exit
early if src == dest.
* util/grub-mkimage.c (generate_image): Arange for src == dest if
compression is none.
as opposed to after.
* grub-core/Makefile.core.def (kernel): Increase linking address.
(none_decompress): Likewise.
(xz_decompress): Likewise.
* grub-core/boot/mips/startup_raw.S: Use prewritten uncompression
address.
* grub-core/kern/mips/arc/init.c (grub_machine_init): Handle memory
layout change.
(grub_arch_modules_addr): New function.
* grub-core/kern/mips/init.c (grub_arch_modules_addr): Moved from here...
* grub-core/kern/mips/loongson/init.c (grub_arch_modules_addr): .. here
* grub-core/kern/mips/qemu_mips/init.c (grub_arch_modules_addr): ... and
here.
* grub-core/kern/mips/startup.S (total_size): Rename to ...
(grub_total_modules_size): ... this. Make global.
[GRUB_MACHINE_ARC]: Don't attempt to move modules out of the bss.
* include/grub/offsets.h (GRUB_KERNEL_MIPS_LOONGSON_UNCOMPRESSED_ADDR):
New definition.
(GRUB_KERNEL_MIPS_QEMU_MIPS_UNCOMPRESSED_ADDR): Likewise.
(GRUB_KERNEL_MIPS_ARC_UNCOMPRESSED_ADDR): Likewise.
(GRUB_KERNEL_MACHINE_UNCOMPRESSED_ADDR): Likewise.
(GRUB_KERNEL_MIPS_ARC_LINK_ADDR): Increased.
* util/grub-mkimage.c (image_target_desc): New flag
PLATFORM_FLAGS_MODULES_BEFORE_KERNEL.
(image_targets): Set PLATFORM_FLAGS_MODULES_BEFORE_KERNEL on mips-arc.
(generate_image): Handle images with modules before kernel.
and GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT, which replace
GRUB_CMDLINE_LINUX and GRUB_CMDLINE_LINUX_DEFAULT (complementing the
existing options which append).
* docs/grub.texi (Simple configuration): Document new options.
Reported by: Ian Jackson. Fixes Debian bug #617538.