Commit graph

900 commits

Author SHA1 Message Date
Vladimir 'phcoder' Serbinenko
005dd67cb6 * grub-core/disk/ahci.c: Add missing license statements.
* grub-core/fs/romfs.c: Likewise.
	* grub-core/lib/ia64/setjmp.S: Likewise.
	* grub-core/loader/i386/pc/freedos.c: Likewise.
	* grub-core/loader/ia64/efi/linux.c: Likewise.
	* grub-core/video/colors.c: Likewise.
	* include/grub/dl.h (GRUB_MOD_DEP): New macro.
2011-06-24 00:29:21 +02:00
Vladimir 'phcoder' Serbinenko
5ab3f48a92 AHCI support.
* 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.
2011-06-24 00:07:55 +02:00
Szymon Janc
c31dc5f5e4 Add support for DRI and RSTn markers in JPEG files.
* grub-core/video/readers/jpeg.c (JPEG_MARKER_DRI): New define.
	(JPEG_MARKER_RST0): Likewise.
	(JPEG_MARKER_RST1): Likewise.
	(JPEG_MARKER_RST2): Likewise.
	(JPEG_MARKER_RST3): Likewise.
	(JPEG_MARKER_RST4): Likewise.
	(JPEG_MARKER_RST5): Likewise.
	(JPEG_MARKER_RST6): Likewise.
	(JPEG_MARKER_RST7): Likewise.
	(grub_jpeg_data): New fields dri, r1, bitmap_ptr.
	(grub_jpeg_decode_dri): New function.
	(grub_jpeg_decode_sos): Move image data related part into
	grub_jpeg_decode_data function.
	(grub_jpeg_decode_data): New function.
	(grub_jpeg_reset): New function.
	(grub_jpeg_decode_jpeg): Handle new markers.
2011-06-23 23:13:20 +02:00
Vladimir 'phcoder' Serbinenko
cad3237fb5 * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_floppy): Close
file after stat.
	Reported by: David Volgyes <dvolgyes>.
2011-06-23 22:02:05 +02:00
Vladimir 'phcoder' Serbinenko
e061a1b537 * grub-core/lib/reed_solomon.c (rs_recover) [STANDALONE]:
Prevent memory leak.
2011-06-23 20:58:35 +02:00
Vladimir 'phcoder' Serbinenko
1abe47dc99 * grub-core/lib/reed_solomon.c (rs_recover): Prevent memory leak.
(main): Close file.
2011-06-23 20:55:36 +02:00
Vladimir 'phcoder' Serbinenko
fbc626665f * grub-core/loader/i386/xnu.c (grub_cpu_xnu_fill_devprop): Don't attempt
to continue if allocation is failed.

	Reported by: David Volgyes <dvolgyes>.
2011-06-23 20:38:19 +02:00
David Volgyes
e98c83e910 * grub-core/bus/usb/ohci.c (grub_ohci_pci_iter): Avoid NULL-pointer
dereference.
2011-06-23 20:28:04 +02:00
Vladimir 'phcoder' Serbinenko
a199a8cd1a Fix spurious warning.
* grub-core/partmap/acorn.c (grub_acorn_boot_block): Make a union.
	(acorn_partition_map_find): Use .bin member.
2011-06-23 20:05:39 +02:00
Vladimir 'phcoder' Serbinenko
e2d1dba0ae * grub-core/kern/emu/getroot.c (grub_guess_root_device): Don't accept
/dev/root as a valid device.
2011-06-23 19:50:41 +02:00
Jim Meyering
8a5d6919e1 Avoid NULL deref in grub_device_open.
* grub-core/kern/device.c (grub_device_open): Don't dereference
	a NULL pointer upon failed grub_env_get.
2011-06-23 18:08:53 +02:00
Vladimir 'phcoder' Serbinenko
2df2e89fee Fixed a cache collision bug. Thanks guufy1 for bugreport and test 2011-06-23 09:39:12 +02:00
Vladimir 'phcoder' Serbinenko
a5edbcb3a1 merge mainline into 4096 2011-06-23 04:08:37 +02:00
Colin Watson
6b4e643081 * grub-core/kern/emu/hostdisk.c (linux_find_partition): Handle
partitions under /dev/disk/by-id/.
2011-05-27 13:57:22 +01:00
Colin Watson
c64db050f7 * grub-core/kern/emu/hostdisk.c (linux_find_partition): Give up
after ten consecutive open failures.  Scanning all the way up to
10000 is excessive and can cause serious performance problems in
some configurations.
Fixes Ubuntu bug #787461.
2011-05-27 13:52:21 +01:00
Vladimir 'phcoder' Serbinenko
245f4aba48 * grub-core/disk/arc/arcdisk.c (reopen): Close old handle before
opening new one.
2011-05-21 07:05:46 +02:00
Vladimir Serbinenko
f767c929f2 Don't stat devices unless we have to.
* grub-core/kern/emu/getroot.c (grub_find_device): Recognize
	dir == /dev/mapper.
	(grub_guess_root_device): Use already known os_dev if possible.
	* grub-core/kern/emu/hostdisk.c
	(convert_system_partition_to_system_disk): Scan only in /dev/mapper
	if device is known to be a dm one.

	Also-By: Colin Watson <cjwatson@ubuntu.com>
2011-05-21 07:03:55 +02:00
Vladimir 'phcoder' Serbinenko
9a79fcf2c9 * grub-core/Makefile.core.def (lsacpi): Fix ia64 mismerge.
(lsefisystab): Likewise.
	(lssal): Likewise.
	(lsefimmap): Likewise.
	(hdparm): Enable on qemu-mips.
	(setjmp): Add ia64 nodist.
	(serial): Simplify tags.
2011-05-19 12:13:18 +02:00
Colin Watson
09728256a8 * grub-core/fs/squash4.c: Add missing GRUB_MOD_LICENSE. 2011-05-18 17:16:59 +02:00
Vladimir 'phcoder' Serbinenko
e775d8edfe * grub-core/bus/usb/usbhub.c (poll_nonroot_hub): Downgrade a printf
into dprintf.
2011-05-18 15:37:18 +02:00
Vladimir 'phcoder' Serbinenko
bf947d36e3 Use full 64-bit division.
* grub-core/kern/misc.c (grub_divmod64_full): Renamed to ...
	(grub_divmod64): ... this.
	* include/grub/misc.h (grub_divmod64): Removed. All users switch to full
	version.
2011-05-18 15:35:19 +02:00
Colin Watson
5626056ffb * grub-core/genmod.sh.in: Use 'set -e' rather than '#! /bin/sh -e',
to avoid accidents when debugging with 'sh -x'.
* grub-core/gensyminfo.sh.in: Likewise.
* tests/example_scripted_test.in: Likewise.
* tests/grub_cmd_regexp.in: Likewise.
* tests/grub_script_blanklines.in: Likewise.
* tests/grub_script_dollar.in: Likewise.
* tests/grub_script_expansion.in: Likewise.
* tests/grub_script_final_semicolon.in: Likewise.
* tests/partmap_test.in: Likewise.
* tests/util/grub-shell-tester.in: Likewise.
* tests/util/grub-shell.in: Likewise.
2011-05-18 12:53:07 +01:00
Colin Watson
e2965f4a32 Move gfxmenu color handling to video, so that gfxterm can use it
too.

* grub-core/gfxmenu/named_colors.c: Move to ...
* grub-core/video/colors.c: ... here.  Rename
grub_gui_get_named_color to grub_video_get_named_color.
* grub-core/gfxmenu/gui_string_util.c (my_isxdigit): Move to ...
* grub-core/video/colors.c (my_isxdigit): ... here.
* grub-core/gfxmenu/gui_string_util.c (parse_hex_color_component):
Move to ...
* grub-core/video/colors.c (parse_hex_color_component): ... here.
* grub-core/gfxmenu/gui_string_util.c (grub_gui_parse_color): Move
to ...
* grub-core/video/colors.c (grub_video_parse_color): ... here.

* include/grub/gui.h (grub_gui_color_t): Move to ...
* include/grub/video.h (grub_video_rgba_color_t): ... here.
* include/grub/gui.h (grub_gui_color_rgb): Move to ...
* include/grub/video.h (grub_video_rgba_color_rgb): ... here.
* include/grub/gui.h (grub_gui_map_color): Move to ...
* include/grub/video.h (grub_video_map_rgba_color): ... here.
* include/grub/gui_string_util.h (grub_gui_get_named_color): Move
to ...
* include/grub/video.h (grub_video_get_named_color): ... here.
* include/grub/gui_string_util.h (grub_gui_parse_color): Move to ...
* include/grub/video.h (grub_video_parse_color): ... here.

* grub-core/Makefile.core.def (kernel) [videoinkernel]: Add
video/colors.c.
(gfxmenu): Remove gfxmenu/named_colors.c.
(video) [videomodules]: Add video/colors.c.

Add a background_color command.

* grub-core/term/gfxterm.c (grub_gfxterm_background_color_cmd): New
function.
(GRUB_MOD_INIT): Register background_color command.
(GRUB_MOD_FINI): Unregister background_color command.
(redraw_screen_rect): Allow blend/replace of text layer to be
controlled independently from whether there is a background bitmap.
(grub_gfxterm_background_image_cmd): Change blend_text_bg when
changing bitmap.
2011-05-18 12:44:24 +01:00
Vladimir 'phcoder' Serbinenko
1e4b43901a * grub-core/fs/fat.c: Include grub/fat.h.
(grub_fat_bpb): Moved to ...
	* include/grub/fat.h (grub_fat_bpb): ... here. New file.
	* grub-core/loader/i386/pc/chainloader.c: Include grub/fat.h and
	grub/ntfs.h.
	* include/grub/i386/pc/chainloader.h (grub_chainloader_flags_t):
	Moved from here...
	* grub-core/loader/i386/pc/chainloader.c (grub_chainloader_flags_t): ...
	here.
	* grub-core/loader/i386/pc/chainloader.c (grub_chainloader_patch_bpb):
	New function.
	(grub_chainloader_cmd): Patch BPB if --bpb is given.
	(GRUB_MOD_INIT): Show --bpb.
	* grub-core/loader/i386/pc/ntldr.c (grub_cmd_ntldr): Patch BPB.
	* grub-core/normal/main.c (features): New variable.
	(GRUB_MOD_INIT): Set feature_* variables.
	* include/grub/i386/pc/chainloader.h (grub_chainloader_patch_bpb): New
	proto.
	* include/grub/ntfs.h (grub_ntfs_bpb): New field bios_drive.
2011-05-18 12:48:14 +02:00
Vladimir 'phcoder' Serbinenko
cf02731e48 * grub-core/Makefile.core.def (ieee1275_fb): Use enable=powerpc_ieee1275
for cleanness.
2011-05-18 12:39:22 +02:00
Vladimir 'phcoder' Serbinenko
548937c6d6 merge mainline into ahci 2011-05-18 12:36:26 +02:00
Vladimir 'phcoder' Serbinenko
e3a1073fd2 FreeDOS direct loading support.
* docs/grub.texi (Supported OS): Add FreeDOS.
	* grub-core/Makefile.core.def (freedos): New module.
	* grub-core/lib/i386/relocator.c (grub_relocator16_ebx): New extern
	variable.
	(grub_relocator16_boot): Handle %ebx.
	* grub-core/lib/i386/relocator16.S: Likewise.
	* grub-core/loader/i386/pc/freedos.c: New file.
2011-05-18 12:15:16 +02:00
Vladimir 'phcoder' Serbinenko
05caa461e8 Long Linux command line support.
* grub-core/loader/i386/linux.c (GRUB_LINUX_CL_END_OFFSET): Removed.
	(maximal_cmdline_size): New variable.
	(allocate_pages): Use maximal_cmdline_size.
	(grub_cmd_linux): Set and use maximal_cmdline_size.
	* grub-core/loader/i386/pc/linux.c (GRUB_LINUX_CL_END_OFFSET): Removed.
	(allocate_pages): Use maximal_cmdline_size.
	(grub_cmd_linux): Set and use maximal_cmdline_size.
	* include/grub/i386/linux.h (GRUB_LINUX_SETUP_MOVE_SIZE): Removed.
	(linux_kernel_header): Add fields kernel_alignment, relocatable, pad
	and cmdline_size.
2011-05-18 09:56:33 +02:00
Vladimir Serbinenko
a2491e235c Improve devmapper support
* grub-core/kern/emu/getroot.c (grub_util_is_dmraid): Removed.
	(grub_util_is_lvm): New function.
	(grub_util_get_dev_abstraction): Assume dmraid if not lvm rather
	than lvm if not dmraid.
	Handle mapped md nodes.
	* grub-core/kern/emu/hostdisk.c (device_is_mapped): Rename to ...
	(grub_util_device_is_mapped): ... this. Make always available. All users
	updated.
	(grub_util_get_dm_node_linear_info) [HAVE_DEVICE_MAPPER]: New function.
	(convert_system_partition_to_system_disk): Handle lvm, mpath and
	dmraid nodes.
	* include/grub/emu/misc.h (grub_util_device_is_mapped): New proto.

	Also-By: Colin Watson <cjwatson@ubuntu.com>
2011-05-18 09:35:47 +02:00
Vladimir 'phcoder' Serbinenko
6ad6223e92 Unify grub-mkrescue (except powerpc) and grrub-mknetdir across platforms
* grub-core/Makefile.am (platform_DATA): Add modinfo.sh.
	* grub-core/modinfo.sh.in: New file.
	* grub-core/Makefile.core.def (modinfo.sh): New script.
	* util/grub-mknetdir.in: Use modinfo.sh.
	* util/grub-mkrescue.in: Likewise.
2011-05-18 01:38:01 +02:00
Vladimir 'phcoder' Serbinenko
543a8f6ef9 * grub-core/kern/ia64/dl_helper.c (grub_ia64_dl_get_tramp_got_size):
Fix potential usage of Elf32 instead of Elf64 when compiling on
	32-bit architecture. Add endianness macros while on it.
2011-05-18 00:21:49 +02:00
Vladimir 'phcoder' Serbinenko
35341bbc96 Avoid unnecessary copying on 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.
2011-05-17 21:40:35 +02:00
Vladimir 'phcoder' Serbinenko
b772baedcd Reduce memory footprint on SGI by putting modules before the kernel
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.
2011-05-17 21:15:54 +02:00
Vladimir 'phcoder' Serbinenko
566a191715 Prevent potential loss of memory map by overwrite on qemu-mips.
* grub-core/boot/mips/startup_raw.S [GRUB_MACHINE_MIPS_QEMU_MIPS]:
	Save ram size in $s4.
	* grub-core/kern/mips/qemu_mips/init.c (RAMSIZE): Removed.
	All users changed to grub_arch_memsize.
	* grub-core/kern/mips/startup.S (grub_arch_machine): Restrict to
	Loongson.
	[GRUB_MACHINE_MIPS_QEMU_MIPS]: Save grub_arch_memsize.
	* grub-core/loader/mips/linux.c (grub_linux_boot): Pass memory size.
	* include/grub/mips/qemu_mips/memory.h (grub_arch_memsize): New
	external variable.
2011-05-17 19:32:51 +02:00
Vladimir 'phcoder' Serbinenko
90f7ac192f * grub-core/kern/mips/startup.S (grub_arch_cpuclock): Move to the right
place.
2011-05-17 18:39:32 +02:00
Vladimir 'phcoder' Serbinenko
dc16af0369 make linux loader work on qemu-mips 2011-05-17 15:34:40 +02:00
Vladimir 'phcoder' Serbinenko
a228ec103a enable ATA on qemu-mips 2011-05-17 14:35:55 +02:00
Vladimir 'phcoder' Serbinenko
1b6656d360 Revert changes to cache_flush.S 2011-05-17 14:04:49 +02:00
Vladimir 'phcoder' Serbinenko
3666d5f636 merge mainline and various cleanups 2011-05-17 14:02:18 +02:00
Vladimir 'phcoder' Serbinenko
400b93718f SGI ARCS port.
* Makefile.util.def (libgrubmods.a): Add dvh.c.
	* conf/Makefile.common (CCASFLAGS_PLATFORM): Add -mips3 on all mips
	platforms.
	* configure.ac: New target mips-arc.
	* gentpl.py: Likewise.
	* grub-core/Makefile.am: Likewise.
	* grub-core/Makefile.core.def: Likewise.
	(xz_decompress): Remove -D GRUB_MACHINE_LINK_ADDR.
	(none_decompress): Likewise.
	(lsdev): New module.
	(datetime): Use lib/arc/datetime.c on ARC.
	(part_dvh): New module.
	* grub-core/commands/arc/lsdev.c: New file.
	* grub-core/disk/arc/arcdisk.c: Likewise.
	* grub-core/kern/mips/arc/init.c: Likewise.
	* grub-core/kern/mips/cache_flush.S: Don't flush non 4-byte
	aligned addresses.
	* grub-core/kern/mips/dl.c (grub_arch_dl_check_header): Fix bigendian
	support.
	(grub_arch_dl_relocate_symbols): Likewise.
	* grub-core/kern/mips/loongson/init.c (grub_get_rtc): Moved from here...
	* grub-core/kern/mips/init.c (grub_get_rtc): ... here.
	* grub-core/kern/mips/startup.S (grub_arch_cpuclock): Have on all
	platforms.
	* grub-core/lib/arc/datetime.c: New file.
	* grub-core/loader/mips/linux.c: Always include time.h. Don't include
	pci.h on non-loongson.
	(envp_off) [!GRUB_MACHINE_MIPS_LOONGSON]: Remove.
	(grub_linux_boot): Set unused registers to 0.
	(grub_cmd_linux) [!GRUB_MACHINE_MIPS_LOONGSON]: Remove envp.
	* grub-core/mmap/mips/loongson/uppermem.c: Moved from here ...
	* grub-core/mmap/mips/uppermem.c: ...here.
	* grub-core/partmap/dvh.c: New file.
	* grub-core/term/arc/console.c: Likewise.
	* grub-core/term/terminfo.c (ANSI_C0_STR): New const.
	(grub_terminfo_set_current): Add terminal "arc".
	(grub_terminfo_readkey): Support ARC sequences.
	* include/grub/arc/arc.h: New file.
	* include/grub/arc/console.h: Likewise.
	* include/grub/disk.h (grub_disk_dev_id): Add
	GRUB_DISK_DEVICE_ARCDISK_ID.
	* include/grub/mips/arc/kernel.h: New file.
	* include/grub/mips/arc/memory.h: Likewise.
	* include/grub/mips/arc/time.h: Likewise.
	* include/grub/mips/loongson/kernel.h (grub_halt): Moved from here ...
	* include/grub/mips/kernel.h (grub_halt): ... here.
	* include/grub/mips/loongson.h (GRUB_CPU_REGISTER_WRAP): Moved from
	here...
	* include/grub/mips/mips.h (GRUB_CPU_REGISTER_WRAP): ... here.
	(GRUB_CPU_LOONGSON_COP0_TIMER_COUNT): Moved from here ...
	* include/grub/mips/mips.h (GRUB_CPU_LOONGSON_COP0_TIMER_COUNT): .. here
	* include/grub/mips/loongson/kernel.h (grub_reboot): Removed redundant
	proto.
	* include/grub/mips/loongson/memory.h (GRUB_ARCH_LOWMEMVSTART): Moved
	from here ...
	* include/grub/mips/memory.h (GRUB_ARCH_LOWMEMVSTART): ... here.
	(GRUB_ARCH_LOWMEMPSTART): Moved from here ...
	* include/grub/mips/memory.h (GRUB_ARCH_LOWMEMPSTART): ... here.
	(GRUB_ARCH_LOWMEMMAXSIZE): Moved from here ...
	* include/grub/mips/memory.h (GRUB_ARCH_LOWMEMMAXSIZE): ... here.
	(GRUB_ARCH_HIGHMEMPSTART): Moved from here ...
	* include/grub/mips/memory.h (GRUB_ARCH_HIGHMEMPSTART): ... here.
	(grub_phys_addr_t): Moved from here ...
	* include/grub/mips/memory.h (grub_phys_addr_t): ... here.
	(grub_vtop): Moved from here ...
	* include/grub/mips/memory.h (grub_vtop): ... here.
	(grub_map_memory): Moved from here ...
	* include/grub/mips/memory.h (grub_map_memory): ... here.
	(grub_unmap_memory): Moved from here ...
	* include/grub/mips/memory.h (grub_unmap_memory): ... here.
	(grub_machine_mmap_iterate): Moved from here ...
	* include/grub/mips/memory.h (grub_machine_mmap_iterate): ... here.
	(grub_mmap_get_lower): Moved from here ...
	* include/grub/mips/memory.h (grub_mmap_get_lower): ... here.
	(grub_mmap_get_upper): Moved from here ...
	* include/grub/mips/memory.h (grub_mmap_get_upper): ... here.
	* include/grub/mips/loongson/time.h (grub_arch_cpuclock): Moved from
	here ...
	* include/grub/mips/time.h (grub_arch_cpuclock): ... here.
	* include/grub/mips/loongson/time.h (grub_get_rtc): Moved from
	here ...
	* include/grub/mips/time.h (grub_get_rtc): ... here.
	* include/grub/mips/loongson/time.h (grub_arch_cpuclock): Moved from
	here ...
	* include/grub/mips/time.h (grub_arch_cpuclock): ... here.
	* include/grub/mips/loongson/time.h (grub_cpu_idle): Moved from
	here ...
	* include/grub/mips/time.h (grub_cpu_idle): ... here.
	* include/grub/offsets.h (GRUB_KERNEL_MIPS_ARC_LINK_ADDR): New
	definition.
	(GRUB_KERNEL_MIPS_ARC_LINK_ALIGN): Likewise.
	(GRUB_KERNEL_MIPS_ARC_COMPRESSED_SIZE): Likewise.
	(GRUB_KERNEL_MIPS_ARC_UNCOMPRESSED_SIZE): Likewise.
	(GRUB_KERNEL_MIPS_ARC_TOTAL_MODULE_SIZE): Likewise.
	(GRUB_KERNEL_MIPS_ARC_PREFIX): Likewise.
	(GRUB_KERNEL_MIPS_ARC_PREFIX_END): Likewise.
	(GRUB_KERNEL_MIPS_ARC_MOD_ALIGN): Likewise.
	(GRUB_MACHINE_LINK_ADDR): Likewise.
	* include/grub/terminfo.h (GRUB_TERMINFO_READKEY_MAX_LEN): Increased
	to 6.
	* util/grub-install.in: Run dvhtool on ARC.
	* util/grub-mkimage.c (image_targets): Add mips-arc.
2011-05-17 09:17:38 +02:00
Vladimir 'phcoder' Serbinenko
8e29b2ffe3 set id on arc disks 2011-05-16 21:50:14 +02:00
Vladimir 'phcoder' Serbinenko
0670a9751b merge mainline into ahci 2011-05-16 17:17:04 +02:00
Vladimir 'phcoder' Serbinenko
c8ecc840d7 * grub-core/bus/pci.c (grub_memalign_dma32): Always allocate in 64-byte
blocks.
2011-05-16 08:51:55 +02:00
Vladimir 'phcoder' Serbinenko
153a4b552d * grub-core/bus/usb/usbhub.c (attach_root_port): Wait 10ms
after enabling port.
2011-05-16 08:50:21 +02:00
Vladimir 'phcoder' Serbinenko
ff44d107ad Skip incorrect USB devices.
* grub-core/bus/usb/usb.c (grub_usb_device_initialize): Fail if
	configcnt == 0.
	* include/grub/usb.h (grub_usb_err_t): New enum value
	GRUB_USB_ERR_BADDEVICE.
2011-05-16 02:39:25 +02:00
Vladimir 'phcoder' Serbinenko
736e0ade54 Fuloong video init support.
* include/grub/vga.h (grub_vga_write_arx): inb monochrome address as
	well.
	(grub_vga_read_arx): New function.
	* grub-core/video/sis315pro.c (GRUB_SIS315PRO_MMIO_SPACE): New
	definition.
	(framebuffer): New members io, mmioptr and mmiobase.
	(read_sis_cmd): New function.
	(write_sis_cmd): Likewise.
	(grub_video_sis315pro_setup): Do the initialisation. Use 640x480
	rather than 640x400.
	* grub-core/video/sis315_init.c: New file.
2011-05-16 02:34:58 +02:00
Vladimir 'phcoder' Serbinenko
c3fc520c0d * grub-core/bus/cs5536.c: Don't include grub/machine/kernel.h on
non-loongson.
	* grub-core/kern/mips/dl.c (grub_arch_dl_init_linker): Fix argument
	to grub_dl_register_symbol.
2011-05-15 15:41:23 +02:00
Vladimir 'phcoder' Serbinenko
67b1e5c907 Fix compilation errors.
* grub-core/term/ns8250.c (serial_get_divisor): Declare 'port' as
	potentially unused.
	* grub-core/loader/i386/linux.c (grub_linux_setup_video):
	Handle GRUB_VIDEO_DRIVER_SIS315PRO.
	* grub-core/bus/cs5536.c (grub_cs5536_init_geode): Restrict DIVIL init
	to loongson machines.
2011-05-15 12:32:37 +02:00
Vladimir 'phcoder' Serbinenko
b756f75f07 Several FS mtime support.
* grub-core/fs/affs.c (grub_affs_time): New struct.
	(grub_affs_file): New field mtime.
	(grub_fshelp_node): Changed 'block' and 'parent' to more appropriate
	type. Removed 'size'. New field 'di'. All users updated.
	(grub_affs_mount): Simplify checsum checking.
	(grub_affs_iterate_dir): New helper grub_affs_create_node.
	(grub_affs_dir): Handle mtime.
	* grub-core/fs/cpio.c (grub_cpio_find_file): Handle mtime.
	(grub_cpio_dir): Likewise.
	* grub-core/fs/hfs.c (grub_hfs_dirrec): New fields 'ctime' and 'mtime'.
	(grub_hfs_filerec): New field mtime.
	(grub_hfs_dir): Handle mtime.
	(grub_hfs_mtime): New function.
	(grub_hfs_fs): Register grub_hfs_mtime.
	* grub-core/fs/iso9660.c (grub_iso9660_date2): New struct.
	(grub_iso9660_dir): New field mtime.
	(grub_fshelp_node): New field dirent.
	(iso9660_to_unixtime): New function.
	(iso9660_to_unixtime2): Likewise.
	(grub_iso9660_read_symlink): Use node->dirent.
	(grub_iso9660_iterate_dir): Likewise.
	(grub_iso9660_dir): Set mtime.
	(grub_iso9660_mtime): New function.
	(grub_iso9660_fs): Register grub_iso9660_mtime.
	* grub-core/fs/jfs.c (grub_jfs_time): New struct.
	(grub_jfs_inode): New fields atime, ctime and mtime.
	(grub_jfs_dir): Set mtime.
	* grub-core/fs/minix.c (grub_minix_dir): Likewise.
	* grub-core/fs/ntfs.c (list_file): Set mtime.
	(grub_ntfs_dir): Likewise.
	* grub-core/fs/reiserfs.c (grub_fshelp_node): New field 'mtime'.
	(grub_reiserfs_iterate_dir): Set mtime.
	(grub_reiserfs_dir): Likewise.
	* grub-core/fs/sfs.c (grub_sfs_obj): New field mtime.
	(grub_fshelp_node): Likewise.
	(grub_sfs_iterate_dir): Set mtime.
	(grub_sfs_dir): Likewise.
	* grub-core/fs/udf.c (grub_udf_dir): Set mtime.
	* grub-core/fs/xfs.c (grub_xfs_time): New struct.
	(grub_xfs_inode): New fields atime, mtime, ctime.
	(grub_xfs_dir): Set mtime.
	* include/grub/datetime.h (grub_datetime2unixtime): New function.
	* include/grub/hfs.h (grub_hfs_sblock): New fields ctime and mtime.
	* include/grub/ntfs.h (grub_fshelp_node): New field mtime.

	Support UDF symlinks.

	* grub-core/fs/udf.c (grub_udf_iterate_dir): Handle symlinks.
	(grub_ufs_read_symlink): New function. All users updated.

	Check amiga partmap checksum.

	* grub-core/partmap/amiga.c (grub_amiga_rdsk): Pad to 128 bytes.
	(grub_amiga_partition): Likewise.
	(amiga_partition_map_checksum): New function.
	(amiga_partition_map_iterate): Check checksum.
2011-05-15 12:23:54 +02:00
Vladimir 'phcoder' Serbinenko
5470225d58 ROMFS support.
* Makefile.util.def (libgrubmods.a): Add romfs.
	* grub-core/Makefile.core.def (romfs): New module.
	* grub-core/fs/romfs.c: New file.
2011-05-15 12:01:03 +02:00