Commit graph

206 commits

Author SHA1 Message Date
Colin Watson
39525c22be * grub-core/loader/i386/linux.c (allocate_pages): Fix spelling of
preferred_address.
(grub_cmd_linux): Likewise.
* grub-core/net/icmp6.c (struct prefix_option): Fix spelling of
preferred_lifetime.  Update all users.
2012-10-05 13:09:19 +01:00
Vladimir 'phcoder' Serbinenko
4e09245441 * grub-core/loader/i386/linux.c (grub_cmd_linux): Fix incorrect
le-conversion.
	Reported by: BURETTE, Bernard.
2012-09-18 11:44:29 +02:00
Benoit Gschwind
801a3027be * grub-core/loader/efi/appleloader.c (devpath_8): New var.
(devs): Add devpath_8.
2012-09-10 09:34:29 +02:00
Vladimir 'phcoder' Serbinenko
ac625d8f79 * grub-core/loader/i386/bsd.c (grub_bsd_elf32_size_hook): Fix mask.
(grub_bsd_elf32_hook): Likewise.
	(grub_bsd_elf64_size_hook): Likewise.
	(grub_bsd_elf64_hook): Likewise.
	(grub_bsd_load_elf): Likewise.
2012-07-22 16:30:48 +02:00
Vladimir 'phcoder' Serbinenko
3569288126 * grub-core/loader/i386/linux.c (find_efi_mmap_size): Don't decrease
efi_mmap_size.
	Reported by: Stuart Hayes.
2012-07-02 11:14:37 +02:00
Vladimir 'phcoder' Serbinenko
f923ad22ce * grub-core/loader/i386/linux.c (find_efi_mmap_size): Increase
additional size to 3 pages.
	Reported by: Stuart Hayes.
2012-06-27 22:55:09 +02:00
Vladimir 'phcoder' Serbinenko
8645f72c72 * grub-core/loader/i386/linux.c (grub_cmd_initrd): Avoid unnecessarry
cast between linux_kernel_header and linux_kernel_params.
2012-06-25 17:44:36 +02:00
Vladimir 'phcoder' Serbinenko
67caf9eb06 * grub-core/loader/i386/linux.c (grub_linux_boot): Setup video before
determining EFI memory map size.
2012-06-20 23:39:33 +02:00
Vladimir 'phcoder' Serbinenko
a09eb54103 Don't assume that beginning address is also the entry point on ppc.
* grub-core/loader/powerpc/ieee1275/linux.c (linux_entry): New variable.
	(grub_linux_boot): Use linux_entry.
	(grub_linux_load32): Fill linux_entry. Fix setting linux_addr.
	(grub_linux_load64): Likewise.
2012-06-13 01:15:15 +02:00
Vladimir 'phcoder' Serbinenko
c5c81ff978 Pass PCIINFO on BIOS to OpenBSD since otherwise it fails to boot
on some qemu versions with GRUB.

	* include/grub/i386/openbsd_bootarg.h (OPENBSD_BOOTARG_PCIBIOS): New
	define.
	(grub_openbsd_bootarg_pcibios): New struct.
	* grub-core/loader/i386/bsd.c (grub_openbsd_boot) [GRUB_MACHINE_PCBIOS]:
	Add PCIINFO.
2012-06-07 16:41:52 +02:00
Vladimir 'phcoder' Serbinenko
49cea015c0 * grub-core/loader/powerpc/ieee1275/linux.c (grub_linux_boot): Sync
caches.
2012-06-06 18:58:19 +02:00
Vladimir 'phcoder' Serbinenko
c21b17e6e0 * grub-core/loader/efi/chainloader.c (copy_file_path): Handle non-ASCII
filenames.
	(make_file_path): Likewise.
2012-06-06 02:34:32 +02:00
Vladimir 'phcoder' Serbinenko
05b0bb9100 * grub-core/loader/i386/linux.c (grub_linux_boot): Use right version.
(grub_cmd_linux): Likewise.
2012-05-31 14:06:11 +02:00
Peter Jones
bcc75fb3f7 * include/grub/i386/linux.h (linux_kernel_params): Add v206.
* grub-core/loader/i386/linux.c (grub_linux_boot): Use v206.
	(grub_cmd_linux) [__x86_64__]: Validate grub_efi_system_table.
2012-05-31 13:23:30 +02:00
Vladimir 'phcoder' Serbinenko
f19cb95e1d * grub-core/loader/i386/linux.c (grub_linux_boot): Fix overflow and
uninited variable. Allocate at least setup_sects.
2012-05-31 12:04:55 +02:00
Vladimir 'phcoder' Serbinenko
a4e5ca80d9 Fix handling of EFI with big memory maps.
* grub-core/loader/i386/linux.c (GRUB_LINUX_CL_OFFSET): Removed.
	(real_mode_mem): Likewise.
	(real_mode_target): Likewise.
	(real_mode_pages): Likewise.
	(prot_mode_pages): Likewise.
	(linux_params): New var.
	(linux_cmdline): Likewise.
	(free_pages): Don't set real mode variables.
	(allocate_pages): Don't allocate real mode memory.
	(grub_e820_add_region): Remove the limit.
	(grub_linux_boot): Allocate and copy real mode memory.
	(grub_linux_unload): Free linux_cmdline.
	(grub_cmd_linux): Use temporary storage for parameters.
	(grub_cmd_initrd): Likewise.
	* include/grub/i386/linux.h (GRUB_E820_MAX_ENTRY): Removed.
	(linux_kernel_params): Make it 1K big.
2012-05-30 14:56:53 +02:00
Vladimir 'phcoder' Serbinenko
e6ad0555e4 * grub-core/efiemu/runtime/efiemu.c: Replace APPLE_CC with __APPLE__.
* grub-core/kern/misc.c: Likewise.
	* grub-core/loader/i386/xnu.c: Likewise.
	* include/grub/i386/tsc.h: Likewise.
	* include/grub/symbol.h: Likewise.
2012-05-28 17:49:18 +02:00
Vladimir 'phcoder' Serbinenko
b41be5623a * grub-core/loader/i386/linux.c (allocate_pages): Overwrite low memory
boot services if we have no other choice.
2012-04-17 13:00:06 +02:00
Vladimir 'phcoder' Serbinenko
9bab65c49d * grub-core/loader/i386/linux.c (grub_cmd_linux): Avoid accessing
kh.loadflags on pre-2.00 kernels.
2012-04-11 22:40:20 +02:00
Vladimir 'phcoder' Serbinenko
3c491b479c Terminate UNDI and PXE before launching the payload to avoid problems
with DMA.

	* grub-core/commands/boot.c (grub_loader_noreturn): Rename to ...
	(grub_loader_flags): ... this. All users updated.
	(grub_loader_boot): Check for GRUB_LOADER_FLAG_NORETURN.
	* grub-core/loader/i386/pc/pxechainloader.c (grub_cmd_pxechain): Mark
	loader as GRUB_LOADER_FLAG_PXE_NOT_UNLOAD.
	* grub-core/net/drivers/i386/pc/pxe.c (grub_pxe_shutdown): New
	function.
	(grub_pxe_restore): Likewise.
	(fini_hnd): New var.
	(GRUB_MOD_INIT): Register shutdown hook.
	(GRUB_MOD_FINI): Shutdown and unregister shutdown hook.
	* include/grub/loader.h (GRUB_LOADER_FLAG_NORETURN): New const.
	(GRUB_LOADER_FLAG_PXE_NOT_UNLOAD): Likewise.
	(grub_loader_set): Rename second argument to flags.
2012-04-11 22:32:31 +02:00
Felix
f65a829e41 * grub-core/loader/efi/appleloader.c (devpath_7): New var.
(devs): Add MBP 2011.
2012-04-01 21:30:24 +02:00
Vladimir 'phcoder' Serbinenko
2282da4a93 * grub-core/loader/i386/linux.c (allocate_pages): Don't allocate
beyond 4 GiB.
	(grub_cmd_linux): Use GRUB_LINUX_BZIMAGE_ADDR for non-relocatable
	images independently of preffered adderss field.
2012-03-11 23:41:29 +01:00
Vladimir 'phcoder' Serbinenko
1ecd61a47a Fix efi chainloader on network root.
* grub-core/loader/efi/chainloader.c (grub_cmd_chainloader): Handle
	network devices.
	* grub-core/net/drivers/efi/efinet.c (grub_efinet_get_device_handle):
	New function.
2012-03-10 20:41:28 +01:00
Vladimir 'phcoder' Serbinenko
922aabf34b * grub-core/loader/efi/chainloader.c (grub_cmd_chainloader): Fix format
in dprintf.
2012-03-10 18:02:53 +01:00
Vladimir 'phcoder' Serbinenko
e8e0566b0c * grub-core/commands/videoinfo.c: Add TRANSLATORS comments.
* grub-core/commands/xnu_uuid.c: Likewise.
	* grub-core/loader/efi/appleloader.c: Likewise.
	* grub-core/script/execute.c: Likewise.
	* grub-core/script/main.c: Likewise.
	* util/grub-mkfont.c: Likewise.
2012-03-10 13:19:46 +01:00
Vladimir 'phcoder' Serbinenko
c9eb96b508 * grub-core/loader/efi/chainloader.c (grub_cmd_chainloader): Use
"out of memory" error messagge.
2012-03-10 13:10:07 +01:00
Vladimir 'phcoder' Serbinenko
807fb77c16 * grub-core/loader/i386/linux.c (prot_init_space): New variable.
(allocate_pages): Improve dprintf.
	(grub_cmd_linux): Fill prot_init_space. Fix improper usage of
	code32_start. Fill code32_start and kernel_alignment in params.
	(grub_cmd_initrd): Use prot_init_space.
2012-03-07 23:45:20 +01:00
Vladimir 'phcoder' Serbinenko
6e69da9ccb * grub-core/commands/videoinfo.c: Add TRANSLATORS comments.
* grub-core/commands/videotest.c: Likewise.
	* grub-core/loader/i386/linux.c: Likewise.
2012-03-06 15:04:33 +01:00
Vladimir 'phcoder' Serbinenko
1a11761f7d * grub-core/loader/i386/linux.c (allocate_pages): Fix handling of the
case when min_align = 0.
2012-03-05 01:35:58 +01:00
Vladimir 'phcoder' Serbinenko
1a2fd1e674 * include/grub/misc.h (ALIGN_UP_OVERHEAD): New define.
* grub-core/loader/i386/linux.c (grub_cmd_initrd): Align initrds at 4.
	* grub-core/loader/i386/pc/linux.c (grub_cmd_initrd): Likewise.
	* grub-core/loader/ia64/efi/linux.c (grub_cmd_initrd): Likewise.
	* grub-core/loader/mips/linux.c (grub_cmd_initrd): Likewise.
	* grub-core/loader/powerpc/ieee1275/linux.c (grub_cmd_initrd): Likewise.
	* grub-core/loader/sparc64/ieee1275/linux.c (grub_cmd_initrd): Likewise.
2012-03-05 01:17:55 +01:00
Vladimir 'phcoder' Serbinenko
7c8d0ce7f4 * include/grub/i386/linux.h (linux_kernel_header): Fix init_size type.
* grub-core/loader/i386/linux.c (grub_cmd_linux): Differentiate between
	prot_size and prot_file_size.
2012-03-04 12:13:05 +01:00
Vladimir 'phcoder' Serbinenko
123f9c50eb Fix FTBFS on mips and ppc 2012-03-03 20:53:54 +01:00
Vladimir 'phcoder' Serbinenko
9be4c45dbe boot services avoid code based on the patch by Matthew Garrett 2012-03-03 20:06:41 +01:00
Vladimir 'phcoder' Serbinenko
8822a8a02b * grub-core/fs/zfs/zfsinfo.c (print_vdev_info): Add TRANSLATORS
comments.
	* grub-core/gdb/gdb.c (grub_cmd_gdbstub): Likewise.
	(GRUB_MOD_INIT): Likewise.
	* grub-core/loader/i386/linux.c (grub_cmd_linux): Clarify that it's
	VGA mode.
	* grub-core/net/net.c (grub_net_route_address): Add TRANSLATORS
	comments.
	* util/grub-install.in (usage): Likewise.
	Spell ID in whole letters.
	Add missing ending dot.
	Quote variables.
	* util/grub-reboot.in: Fix capitalisation.
	* util/grub-set-default.in: Likewise.
2012-03-02 11:53:50 +01:00
Vladimir 'phcoder' Serbinenko
4f3aa1af70 * grub-core/loader/machoXX.c (grub_macho_load): Fix signed vs unsigned
comparison.
2012-02-29 15:48:57 +01:00
Vladimir 'phcoder' Serbinenko
595717e6d4 * grub-core/loader/i386/xnu.c (grub_xnu_boot): Init fsbfreq to
sane value to avoid a spurious warning.
2012-02-29 14:53:41 +01:00
Vladimir 'phcoder' Serbinenko
99ce1597a4 Add LZSS Mach-O support (needed for new xnu kernelcache).
* grub-core/Makefile.core.def (xnu): Add file lzss.c
	* grub-core/loader/lzss.c: New file.
	* grub-core/loader/xnu.c (grub_xnu_load_driver): Close binaryfile
	on Mach-O open failure.
	* grub-core/loader/macho.c (grub_macho_close): Free uncompressedXX.
	Don't free cmdsXX in uncompressedXX is set.
	(grub_macho_file): Init new fields.
	New argument is_64bit. All users updated.
	Handle compressed. Error out if no suitable architecture is found.
	Don't close file.
	(grub_macho_open): New argument is_64bit. All users updated.
	* grub-core/loader/macho32.c: Add defines for new fields.
	* grub-core/loader/macho64.c: Likewise.
	* grub-core/loader/machoXX.c (grub_macho_contains_macho): Make static.
	(grub_macho_parse): Handle compressed.
	Defer actual processing if compressed.
	(grub_macho_cmds_iterate): Decompress if compressed. New argument
	"filename". All users updated.
	(grub_macho_size): New argument "filename". All users updated.
	(grub_macho_get_entry_point): Likewise.
	(grub_macho_load): Handle compressed.
	* include/grub/macho.h (grub_macho_lzss_header): New struct.
	(GRUB_MACHO_LZSS_OFFSET): New define.
	(grub_decompress_lzss): New proto.
	* include/grub/machoload.h (grub_macho_file): New fields to handle
	compressed.
	(grub_macho_contains_macho64): Remove proto.
	(grub_macho_contains_macho32): Likewise.
	* util/grub.d/30_os-prober.in: Use kernel cache if available.
2012-02-29 13:26:13 +01:00
Vladimir 'phcoder' Serbinenko
629e6a3363 * grub-core/loader/i386/xnu.c (grub_xnu_boot): Fix format specification. 2012-02-28 11:02:19 +01:00
Vladimir 'phcoder' Serbinenko
83ddae2333 Support v2 xnu boot arguments.
* grub-core/loader/i386/xnu.c (grub_cpu_xnu_fill_devicetree):
	New argument fsbfreq_out.
	(grub_xnu_set_video): Receive an argument grub_xnu_boot_params_common.
	(grub_xnu_boot): Support v2 arguments. Disable PIC so that APIC can
	be used.
	* grub-core/loader/machoXX.c (grub_macho_load): New argument
	darwin_version.
	* grub-core/loader/xnu.c (grub_xnu_darwin_version): New variable.
	* include/grub/i386/xnu.h (grub_xnu_boot_params_common): New struct.
	(grub_xnu_boot_params): Rename to ...
	(grub_xnu_boot_params_v1): ...this. Use grub_xnu_boot_params_common.
	(grub_xnu_boot_params_v2): New struct.
2012-02-28 04:04:19 +01:00
Navdeep Parhar
665f2341f7 * grub-core/loader/i386/bsd.c (freebsd_zfsguid): New variable.
(freebsd_get_zfs): New function.
	(grub_freebsd_boot): Pass zfs UUID.
	(grub_cmd_freebsd): Set zfs UUID.
2012-02-27 02:02:16 +01:00
Vladimir 'phcoder' Serbinenko
67093bc0ed Another round of string clarification and adding TRANSLATORS comments. 2012-02-26 17:28:05 +01:00
Vladimir 'phcoder' Serbinenko
59bfe502c9 * grub-core/loader/xnu.c (grub_xnu_writetree_toheap_real): Avoid set
in if.
2012-02-12 19:08:55 +01:00
Vladimir 'phcoder' Serbinenko
db5fc59616 * grub-core/loader/efi/appleloader.c (grub_cmd_appleloader): Move
diagnostic to dprintf.
	* grub-core/loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
2012-02-12 19:03:14 +01:00
Vladimir 'phcoder' Serbinenko
d61386e21d Improve string. Gettextize. 2012-02-12 15:25:25 +01:00
Vladimir 'phcoder' Serbinenko
ebcecdf1c3 Increase warning level.
* conf/Makefile.common (CFLAGS_GNULIB): Add -Wno-redundant-decls
	-Wno-unreachable-code -Wno-conversion -Wno-old-style-definition.
	* configure.ac (HOST_CFLAGS): Add bunch of -W arguments.
	(TARGET_CFLAGS): Likewise.
	(HOST_CFLAGS): Add -Werror unless --disable-werror is activated.
	* grub-core/Makefile.core.def (decompressor_xz): Add
	-Wno-unreachable-code.
	(normal): Add -Wno-redundant-decls.
	(xzio): Add -Wno-unreachable-code.
	(lzopio): Add -Wno-redundant-decls -Wno-error.
	* grub-core/commands/acpi.c: Add exception to -Wcast-align.
	* grub-core/commands/lsacpi.c: Add exception to -Wcast-align.
	* grub-core/gensymlist.sh: Add exception to -Wmissing-format-attribute.
	* grub-core/kern/dl.c: Add exception to -Wcast-align.
	* grub-core/kern/efi/efi.c (grub_efi_modules_addr): Likewise.
	* grub-core/kern/i386/coreboot/init.c: Add exception to
	-Wsuggest-attribute=noreturn.
	* grub-core/kern/ia64/dl.c: Add exception to -Wcast-align.
	* grub-core/kern/ia64/dl_helper.c: Likewise.
	* grub-core/kern/mips/dl.c: Likewise.
	* grub-core/kern/sparc64/dl.c: Likewise.
	* grub-core/lib/LzmaEnc.c: Add exception to -Wshadow.
	* grub-core/lib/libgcrypt_wrap/cipher_wrap.h (memcpy): Likewise.
	(memcmp): Likewise.
	* grub-core/lib/pbkdf2.c: Add exception to -Wunreachable-code.
	* grub-core/loader/ia64/efi/linux.c: Add exception to -Wcast-align.
	* grub-core/loader/mips/linux.c: Likewise.
	* grub-core/loader/multiboot_elfxx.c: Likewise.
	* grub-core/script/parser.y: Add exception to -Wunreachable-code.
	* grub-core/video/sm712.c: Add exception to -Wcast-align.
	* util/import_gcry.py: Add -Wno-cast-align to modules checked by hand.
	* grub-core/font/font.c (grub_font_loader_init): Add explicit cast and
	fixme.
	* grub-core/fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
	* grub-core/kern/i386/multiboot_mmap.c (grub_machine_mmap_init):
	Fix prototype.
2012-02-10 16:48:48 +01:00
Vladimir 'phcoder' Serbinenko
6f48ca0143 * grub-core/loader/multiboot_elfxx.c (grub_multiboot_load_elf): Fix
incorrect nesting of #if's.
2012-02-09 23:53:27 +01:00
Vladimir 'phcoder' Serbinenko
a4ea2dff4b * grub-core/commands/lsacpi.c (disp_acpi_xsdt_table): #if'-out the
checks which are always false on some platforms.
	(grub_cmd_lsacpi): Likewise.
	* grub-core/kern/misc.c (grub_strtoul): Likewise.
	* grub-core/loader/multiboot.c (grub_multiboot_set_video_mode):
	Likewise.
2012-02-09 23:48:34 +01:00
Vladimir 'phcoder' Serbinenko
44c6828db4 * grub-core/loader/i386/xnu.c (grub_xnu_boot): Fix printf.
* grub-core/loader/ia64/efi/linux.c (grub_cmd_fpswa): Likewise.
2012-02-09 23:32:03 +01:00
Vladimir 'phcoder' Serbinenko
690c531fc5 Remove "payload" command in ia64 Linux loader since I couldn't
find any evidence of it being used for anything.
	Replace "relocate" command with an environment variable

	* grub-core/loader/ia64/efi/linux.c (ia64_boot_param): Remove extra
	fields.
	(ia64_boot_payload): Removed.
	(last_payload): Likewise.
	(RELOCATE_OFF): Likewise.
	(RELOCATE_ON): Likewise.
	(RELOCATE_FORCE): Likewise.
	(relocate): Likewise.
	(free_pages): Don't free payloads.
	(grub_load_elf64): Use common error messages.
	Use "linux_relocate" variable.
	Increase the space after boot_params.
	(grub_cmd_payload): Removed.
	(grub_cmd_relocate): Likewise.
	(grub_cmd_fpswa): Improve messages.
	(cmd_payload): Removed.
	(cmd_relocate): Likewise.
	(GRUB_MOD_INIT): Don't register "payload" and "relocate".
	(GRUB_MOD_FINI): Don't unregister "payload" and "relocate".
2012-02-09 15:09:40 +01:00
Vladimir 'phcoder' Serbinenko
9c4b5c13e6 Improve gettext support. Stylistic fixes and error handling fixes while
on it.
2012-02-08 19:26:01 +01:00