Commit graph

327 commits

Author SHA1 Message Date
Vladimir Serbinenko
1f032575bb * grub-core/loader/multiboot_mbi2.c: Implement special value for load_addr. 2013-12-17 15:14:50 +01:00
Vladimir Serbinenko
3086175489 Implement Truecrypt ISO loader. 2013-12-17 14:45:46 +01:00
Vladimir Serbinenko
ec824e0f2a Implement grub_file tool and use it to implement generating of config
in separate root.
2013-12-17 14:39:48 +01:00
Vladimir Serbinenko
71669c3b76 Implement XEN VFB support. 2013-12-17 13:07:26 +01:00
Vladimir Serbinenko
111bf5db8b * grub-core/loader/i386/linux.c: Use grub_addr_t rather than long when
appropriate.
2013-12-15 14:37:12 +01:00
Vladimir Serbinenko
24ca71c93b * grub-core/loader/i386/linux.c: Use %p rather than %lx for pointers. 2013-12-15 14:35:18 +01:00
Vladimir Serbinenko
7e47e27bd8 Add gcc_struct to all packed structures when compiling with mingw.
Just "packed" doesn't always pack the way we expect.
2013-12-15 14:14:30 +01:00
Vladimir Serbinenko
0df77d793c Implement multiboot2 EFI BS specification. 2013-12-13 12:56:14 +01:00
Vladimir Serbinenko
44bbfa33b8 Propagate the EFI commits to x86-efi specific parts. 2013-12-11 16:11:17 +01:00
Vladimir Serbinenko
219401b8b9 * include/grub/efi/api.h (grub_efi_device_path): Define length as
unaligned u16 rather than u8[2].
2013-12-11 15:54:01 +01:00
Vladimir Serbinenko
d5bab2c0e1 * grub-core/loader/i386/bsd.c: Remove variable length arrays. 2013-11-12 16:14:33 +01:00
Vladimir Serbinenko
87d62d7d29 * grub-core/loader/i386/coreboot/chainloader.c (load_segment): Use
right buffer for temporary load.
2013-11-11 00:06:52 +01:00
Vladimir Serbinenko
5460cfeba8 * grub-core/loader/i386/coreboot/chainloader.c: Support tianocore. 2013-11-10 23:26:25 +01:00
Vladimir Serbinenko
8997730612 * grub-core/loader/i386/coreboot/chainloader.c: Support lzma-compressed
payload.
2013-11-10 20:53:27 +01:00
Vladimir Serbinenko
9612ebc00e Add new ports: i386-xen and x86_64-xen. This allows running GRUB in
XEN PV environment and load kernels.
2013-11-09 21:29:11 +01:00
Vladimir Serbinenko
1a46a3a4b3 * grub-core/loader/i386/multiboot_mbi.c: Handle space in command line.
* grub-core/loader/multiboot_mbi2.c: Likewise.
2013-11-09 17:32:37 +01:00
Vladimir Serbinenko
47dcf7b176 * grub-core/loader/multiboot_mbi2.c (grub_multiboot_add_module): Fix
NULL pointer dereference.
2013-11-08 04:59:46 +01:00
Vladimir Serbinenko
7f084087b2 * grub-core/net/net.c (grub_net_route_unregister): Remove unused
function.
	* grub-core/loader/i386/xnu.c (hextoval): Likewise.
	* grub-core/disk/geli.c (ascii2hex): Likewise.
2013-11-07 19:31:22 +01:00
Vladimir Serbinenko
e7b66a28de * grub-core/loader/sparc64/ieee1275/linux.c (get_physbase): Fix
signature.
2013-11-02 18:57:35 +01:00
Vladimir Serbinenko
93c120754a * grub-core/loader/multiboot_mbi2.c: Implement network tag. 2013-10-28 15:53:39 +01:00
Vladimir Serbinenko
1ca4b75ec2 * grub-core/loader/multiboot_mbi2.c: Add EFI memory map to the list
of supported tags.
2013-10-28 15:40:34 +01:00
Vladimir Serbinenko
329550c4a9 * grub-core/loader/multiboot_mbi2.c: Implement EFI memory map. 2013-10-28 15:37:00 +01:00
Vladimir Serbinenko
00bfa988fc * grub-core/loader/multiboot.c: Add support for multiboot kernels
quirks.
2013-10-28 15:23:46 +01:00
Vladimir Serbinenko
81afc5cce6 * grub-core/loader/i386/linux.c (allocate_pages): Allocate at least
a page in protected space.
2013-10-28 14:30:29 +01:00
Vladimir Serbinenko
cb3c4a4722 * grub-core/loader/multiboot.c (grub_cmd_module): Don't attempt to
allocate space for zero-sized modules.
2013-10-28 14:27:19 +01:00
Vladimir Serbinenko
954f7bf5ec * grub-core/loader/xnu_resume.c (grub_xnu_resume): Reject empty images. 2013-10-28 14:25:22 +01:00
Vladimir Serbinenko
8b46b0ea36 * grub-core/loader/i386/bsd.c (grub_cmd_openbsd): Accept "sd", "cd",
"vnd", "rd" and "fd" disks.
2013-10-27 18:59:27 +01:00
Vladimir Serbinenko
c81acb7ff3 Consolidate cpuid code. 2013-10-27 00:02:01 +02:00
Vladimir Serbinenko
c1bee64676 Move cpuid code to cpuid.h and TSC code to tsc.c. 2013-10-26 23:39:10 +02:00
Vladimir 'phcoder' Serbinenko
2e4659b810 * grub-core/loader/i386/bsd.c: Remove variable length arrays. 2013-10-20 23:45:43 +02:00
Vladimir 'phcoder' Serbinenko
e89c2d48a9 Lift 255x255 erminal sie restriction to 65535x65535. Also change from
bitmasks to small structures of size chosen to fit in registers.
2013-10-19 23:59:32 +02:00
Vladimir 'phcoder' Serbinenko
6de9ee86bf Pass-through unknown E820 types. It required reorganisation of mmap
module.
2013-10-14 16:33:44 +02:00
neil
71764dc8ca * grub-core/loader/multiboot.c (grub_multiboot_set_console): Always use
video if no text is available.

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2013-09-23 13:35:33 +02:00
Vladimir 'phcoder' Serbinenko
f82d79c984 * include/grub/mm.h (grub_extend_alloc): Remove.
* grub-core/loader/i386/pc/plan9.c: Use own version of
	grub_extend_alloc with appropriate types.
2013-08-22 16:44:20 +02:00
sutre@tahoe
ad1fe3f91f Always fill bootdisk info and improve check for NetBSD disklabel. 2013-08-16 19:41:33 +02:00
Vladimir 'phcoder' Serbinenko
3719fbc57f * grub-core/loader/arm/linux.c: Change printf to dprintf. 2013-08-02 22:52:51 +02:00
Vladimir 'phcoder' Serbinenko
ae27e4d323 Merge mainline into arm 2013-07-16 18:43:43 +02:00
Vladimir 'phcoder' Serbinenko
88f8d1463f * grub-core/loader/multiboot_elfxx.c: Check eip after v2p translation
and not before.
	Reported by: Leon Drugi.
2013-07-16 18:37:44 +02:00
Vladimir 'phcoder' Serbinenko
99c971afd3 Add support for processed coreboot payload chainloading. 2013-06-16 02:54:37 +02:00
Francesco Lavra
c6a8472baf Own fdt parsing implementation 2013-05-17 13:45:22 +02:00
Vladimir 'phcoder' Serbinenko
8e71d87482 merge mainline into arm 2013-05-11 10:24:24 +02:00
Vladimir 'phcoder' Serbinenko
fb2666b560 Simplify few strings. 2013-05-07 11:44:15 +02:00
Vladimir 'phcoder' Serbinenko
d22840ec12 Mark few forgotten strings for translation. 2013-05-07 11:41:47 +02:00
Vladimir 'phcoder' Serbinenko
e34092fdf1 * grub-core/loader/linux.c: Use grub_dprintf for debug statements
rather than printf.
2013-05-07 11:38:49 +02:00
Vladimir 'phcoder' Serbinenko
095accd14b * grub-core/loader/i386/linux.c (grub_linux_setup_video): Add
GRUB_VIDEO_ADAPTER_CAPTURE: to handled drived ids.
2013-05-02 18:06:39 +02:00
Vladimir 'phcoder' Serbinenko
02adbb932d * grub-core/io/lzopio.c: Use GRUB_PROPERLY_ALIGNED_ARRAY.
* grub-core/loader/i386/bsd.c: Likewise.
2013-04-28 15:18:50 +02:00
Leon Drugi
43168646d8 * grub-core/loader/multiboot_mbi2.c (grub_multiboot_load): Fix cast in
BSS clearing.
2013-04-27 21:16:55 +02:00
Vladimir 'phcoder' Serbinenko
1a40f80c98 * grub-core/loader/i386/linux.c (grub_linux_boot): Default to
gfxpayload=keep if cbfb is active.
2013-04-24 14:53:00 +02:00
Vladimir 'phcoder' Serbinenko
45fbd9a23f Add missing video ids to coreboot and ieee1275 video. 2013-04-24 14:44:15 +02:00
Vladimir 'phcoder' Serbinenko
90ec4b7f6c * grub-core/kern/ieee1275/init.c (grub_claim_heap): Improve handling
of GRUB_IEEE1275_FLAG_FORCE_CLAIM.
	* grub-core/loader/powerpc/ieee1275/linux.c
	(grub_linux_claimmap_iterate): Handle GRUB_IEEE1275_FLAG_FORCE_CLAIM.
2013-04-19 15:27:09 +02:00
Vladimir 'phcoder' Serbinenko
aeace7f71c * grub-core/kern/elfXX.c (grub_elfXX_load): Handle
GRUB_ELF_LOAD_FLAGS_30BITS and GRUB_ELF_LOAD_FLAGS_62BITS.
	* grub-core/loader/powerpc/ieee1275/linux.c (grub_linux_load32),
	(grub_linux_load64): Mask out 2 high bits.
2013-04-19 15:05:11 +02:00
Vladimir 'phcoder' Serbinenko
cc2fa5ec1e * grub-core/loader/i386/linux.c: Remove useless leftover pointer. 2013-04-14 19:01:23 +02:00
Leif Lindholm
389b31cd71 Initial import of Leif's work 2013-04-07 02:41:07 +02:00
Vladimir 'phcoder' Serbinenko
6a7fb94bfb Replace the region at 0 from coreboot tables to available in BSD
memory map.
2013-03-25 10:23:04 +01:00
Vladimir 'phcoder' Serbinenko
92750e4c60 Add ability to generate newc additions on runtime. 2013-03-22 21:01:28 +01:00
Vladimir 'phcoder' Serbinenko
46ecfc49b6 * grub-core/loader/i386/bsdXX.c (grub_openbsd_find_ramdisk): Use
multiplication rather than division.
2013-03-10 20:37:41 +01:00
Vladimir 'phcoder' Serbinenko
a9c94590dd * grub-core/loader/i386/pc/plan9.c (fill_disk): Fix types to use
intended shifts rather than division.
2013-03-10 19:27:50 +01:00
Vladimir 'phcoder' Serbinenko
5341c0fbfc Avoid costly 64-bit division in grub_get_time_ms on most platforms. 2013-03-10 17:45:38 +01:00
Vladimir 'phcoder' Serbinenko
3188131f72 * grub-core/kern/env.c, include/grub/env.h: Change iterator through
all vars to a macro. All users updated.
2013-03-03 01:34:27 +01:00
Vladimir 'phcoder' Serbinenko
73bf57e2c8 Make elfload not use hooks. Opt for flags and iterators instead. 2013-03-02 16:45:57 +01:00
Vladimir 'phcoder' Serbinenko
e230377407 * grub-core/loader/i386/pc/linux.c (grub_cmd_linux): Fix compilation
for 64-bit platforms.
2013-03-01 10:39:41 +01:00
Vladimir 'phcoder' Serbinenko
0789b67232 Enable linux16 on non-BIOS systems for i.a. memtest.
* grub-core/loader/i386/pc/linux.c (grub_cmd_linux): Handle hole at 0
	correctly.
	* grub-core/Makefile.core.def (linux16): Enable on all x86 flavours.
2013-02-28 22:48:41 +01:00
Vladimir 'phcoder' Serbinenko
43c918828d * grub-core/loader/machoXX.c: Remove nested functions. 2013-02-27 20:56:23 +01:00
C. Masloch
08bcec5020 Improve FreeDOS direct loading support compatibility.
* include/grub/i386/relocator.h (grub_relocator16_state):
	New member ebp.
	* grub-core/lib/i386/relocator.c (grub_relocator16_ebp): New extern
	variable.
	(grub_relocator16_boot): Handle %ebp.
	* grub-core/lib/i386/relocator16.S: Likewise.
	* grub-core/loader/i386/pc/freedos.c:
	Load BPB to pass kernel which partition to load from.
	Check that kernel file is not too large.
	Set register dl to BIOS unit number as well.
2013-01-27 16:07:25 +01:00
Colin Watson
ed12a00309 Fix powerpc and sparc64 build failures caused by un-nesting memory
map iterators.
2013-01-21 14:41:06 +00:00
Colin Watson
fc524edf65 Remove nested functions from filesystem directory iterators.
* include/grub/fs.h (grub_fs_dir_hook_t): New type.
(struct grub_fs.dir): Add hook_data argument.

Update all implementations and callers.
2013-01-21 01:33:46 +00:00
Colin Watson
6a0debbd91 * grub-core/loader/i386/linux.c (grub_cmd_initrd): Don't add the
initrd size to addr_min, since the initrd will be allocated after
this address.
2013-01-20 23:03:35 +00:00
Colin Watson
6c724b85b4 Remove nested functions from ELF iterators. 2013-01-20 15:54:09 +00:00
Colin Watson
25239370fd Remove nested functions from device iterators.
* include/grub/arc/arc.h (grub_arc_iterate_devs_hook_t): New type.
(grub_arc_iterate_devs): Add hook_data argument.
* include/grub/ata.h (grub_ata_dev_iterate_hook_t): New type.
(struct grub_ata_dev.iterate): Add hook_data argument.
* include/grub/device.h (grub_device_iterate_hook_t): New type.
(grub_device_iterate): Add hook_data argument.
* include/grub/disk.h (grub_disk_dev_iterate_hook_t): New type.
(struct grub_disk_dev.iterate): Add hook_data argument.
(grub_disk_dev_iterate): Likewise.
* include/grub/gpt_partition.h (grub_gpt_partition_map_iterate):
Likewise.
* include/grub/msdos_partition.h (grub_partition_msdos_iterate):
Likewise.
* include/grub/partition.h (grub_partition_iterate_hook_t): New
type.
(struct grub_partition_map.iterate): Add hook_data argument.
(grub_partition_iterate): Likewise.
* include/grub/scsi.h (grub_scsi_dev_iterate_hook_t): New type.
(struct grub_scsi_dev.iterate): Add hook_data argument.

Update all callers.
2013-01-20 15:52:15 +00:00
Colin Watson
d0d4b8a063 Remove nested functions from memory map iterators.
* grub-core/efiemu/mm.c (grub_efiemu_mmap_iterate): Add hook_data
argument, passed to hook.
* grub-core/kern/i386/coreboot/mmap.c
(grub_linuxbios_table_iterate): Likewise.
(grub_machine_mmap_iterate: iterate_linuxbios_table): Make static
instead of nested.
(grub_machine_mmap_iterate): Add hook_data argument.
* grub-core/kern/i386/multiboot_mmap.c (grub_machine_mmap_iterate):
Add hook_data argument, passed to hook.
* grub-core/kern/i386/pc/mmap.c (grub_machine_mmap_iterate):
Likewise.
* grub-core/kern/i386/qemu/mmap.c (grub_machine_mmap_iterate):
Likewise.
* grub-core/kern/ieee1275/mmap.c (grub_machine_mmap_iterate):
Likewise.
* grub-core/kern/mips/arc/init.c (grub_machine_mmap_iterate):
Likewise.
* grub-core/kern/mips/loongson/init.c (grub_machine_mmap_iterate):
Likewise.
* grub-core/kern/mips/qemu_mips/init.c (grub_machine_mmap_iterate):
Likewise.
* grub-core/mmap/efi/mmap.c (grub_efi_mmap_iterate): Likewise.
(grub_machine_mmap_iterate): Likewise.
* grub-core/mmap/mmap.c (grub_mmap_iterate): Likewise.
* include/grub/efiemu/efiemu.h (grub_efiemu_mmap_iterate): Update
prototype.
* include/grub/memory.h (grub_memory_hook_t): Add data argument.
Remove NESTED_FUNC_ATTR from here and from all users.
(grub_mmap_iterate): Update prototype.
(grub_efi_mmap_iterate): Update prototype.  Update all callers to
pass appropriate hook data.
(grub_machine_mmap_iterate): Likewise.

* grub-core/commands/acpi.c (grub_acpi_create_ebda: find_hook): Make
static instead of nested.
* grub-core/commands/lsmmap.c (grub_cmd_lsmmap: hook): Likewise.
Rename to ...
(lsmmap_hook): ... this.
* grub-core/efiemu/mm.c (grub_efiemu_mmap_init: bounds_hook):
Likewise.
(grub_efiemu_mmap_fill: fill_hook): Likewise.
* grub-core/kern/i386/coreboot/init.c (grub_machine_init:
heap_init): Likewise.
* grub-core/kern/i386/pc/init.c (grub_machine_init: hook): Likewise.
Rename to ...
(mmap_iterate_hook): ... this.
* grub-core/kern/ieee1275/init.c (grub_claim_heap: heap_init):
Likewise.
* grub-core/lib/ieee1275/relocator.c
(grub_relocator_firmware_get_max_events: count): Likewise.
(grub_relocator_firmware_fill_events: fill): Likewise.  Rename
to ...
(grub_relocator_firmware_fill_events_iter): ... this.
* grub-core/lib/relocator.c (grub_relocator_alloc_chunk_align:
hook): Likewise.  Rename to ...
(grub_relocator_alloc_chunk_align_iter): ... this.
* grub-core/loader/i386/bsd.c (generate_e820_mmap: hook): Likewise.
Rename to ...
(generate_e820_mmap_iter): ... this.
* grub-core/loader/i386/linux.c (find_mmap_size: hook): Likewise.
Rename to ...
(count_hook): ... this.
(grub_linux_boot: hook): Likewise.  Rename to ...
(grub_linux_boot_mmap_find): ... this.
(grub_linux_boot: hook_fill): Likewise.  Rename to ...
(grub_linux_boot_mmap_fill): ... this.
* grub-core/loader/i386/multiboot_mbi.c (grub_fill_multiboot_mmap:
hook): Likewise.  Rename to ...
(grub_fill_multiboot_mmap_iter): ... this.
* grub-core/loader/multiboot.c (grub_get_multiboot_mmap_count:
hook): Likewise.  Rename to ...
(count_hook): ... this.
* grub-core/loader/multiboot_mbi2.c (grub_fill_multiboot_mmap:
hook): Likewise.  Rename to ...
(grub_fill_multiboot_mmap_iter): ... this.
* grub-core/loader/powerpc/ieee1275/linux.c
(grub_linux_claimmap_iterate: alloc_mem): Likewise.
* grub-core/loader/sparc64/ieee1275/linux.c (alloc_phys: choose):
Likewise.  Rename to ...
(alloc_phys_choose): ... this.
(determine_phys_base: get_physbase): Likewise.
* grub-core/mmap/i386/mmap.c (grub_mmap_malign_and_register:
find_hook): Likewise.
* grub-core/mmap/i386/pc/mmap.c (preboot: fill_hook): Likewise.
(malloc_hook: count_hook): Likewise.
* grub-core/mmap/i386/uppermem.c (grub_mmap_get_lower: hook):
Likewise.  Rename to ...
(lower_hook): ... this.
(grub_mmap_get_upper: hook): Likewise.  Rename to ...
(upper_hook): ... this.
(grub_mmap_get_post64: hook): Likewise.  Rename to ...
(post64_hook): ... this.
* grub-core/mmap/mips/uppermem.c (grub_mmap_get_lower: hook):
Likewise.  Rename to ...
(lower_hook): ... this.
(grub_mmap_get_upper: hook): Likewise.  Rename to ...
(upper_hook): ... this.
* grub-core/mmap/mmap.c (grub_mmap_iterate: count_hook): Likewise.
(grub_mmap_iterate: fill_hook): Likewise.
(fill_mask): Pass addr and mask within a single struct.
(grub_cmd_badram: hook): Make static instead of nested.  Rename
to ...
(badram_iter): ... this.
(grub_cmd_cutmem: hook): Likewise.  Rename to ...
(cutmem_iter): ... this.
2013-01-15 12:02:35 +00:00
Vladimir 'phcoder' Serbinenko
3e4f356646 Support Apple FAT binaries on non-Apple platforms.
* include/grub/macho.h (GRUB_MACHO_FAT_EFI_MAGIC): New define.
	* include/grub/i386/macho.h (GRUB_MACHO_CPUTYPE_IS_HOST_CURRENT):
	Likewise.
	* grub-core/loader/efi/chainloader.c (grub_cmd_chainloader): Parse
	Apple FAT binaries.
2013-01-10 12:50:01 +01:00
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