Commit graph

184 commits

Author SHA1 Message Date
Robert Millan
f84b481b35 Cheery-pick grub-emu split from experimental (rev 1361)
2009-11-23  Robert Millan  <rmh.grub@aybabtu.com>

        * configure.ac: Detect all `emu' platforms.  Define
        GRUB_MACHINE_* macros in TARGET_CFLAGS.  Remove
        --enable-grub-emu logic.  Disable include/grub/machine
        symlink on `emu' platforms.

        * genkernsyms.sh.in: Use @TARGET_CFLAGS@ during symbol generation.
        * gensymlist.sh.in: Likewise.

        * include/grub/i386/coreboot/machine.h: Remove file.
        * include/grub/i386/efi/machine.h: Likewise.
        * include/grub/i386/ieee1275/machine.h: Likewise.
        * include/grub/i386/pc/machine.h: Likewise.
        * include/grub/i386/qemu/machine.h: Likewise.
        * include/grub/powerpc/ieee1275/machine.h: Likewise.
        * include/grub/sparc64/ieee1275/machine.h: Likewise.
        * include/grub/x86_64/efi/machine.h: Likewise.

        * commands/acpi.c: Remove `<grub/machine/machine.h>'.
        * commands/halt.c: Likewise.
        * commands/reboot.c: Likewise.
        * include/grub/autoefi.h: Likewise.
        * include/grub/i386/at_keyboard.h: Likewise.
        * include/grub/i386/kernel.h: Likewise.
        * include/grub/i386/loader.h: Likewise.
        * include/grub/i386/pc/memory.h: Likewise.
        * kern/dl.c: Likewise.
        * kern/i386/coreboot/init.c: Likewise.
        * loader/i386/bsd.c: Likewise.
        * loader/i386/linux.c: Likewise.
        * loader/multiboot_loader.c: Likewise.
        * term/i386/pc/serial.c: Likewise.
        * term/usb_keyboard.c: Likewise.

        * include/grub/time.h [!GRUB_MACHINE_EMU]: Remove
        `<grub/machine/machine.h>'
        [!GRUB_MACHINE_EMU] (GRUB_TICKS_PER_SECOND): New macro.
        * util/misc.c: Remove `<grub/machine/machine.h>' and
        `<grub/machine/time.h>'.

        * Makefile.in (enable_grub_emu): Remove variable.
        Include $(srcdir)/conf/any-emu.mk for the `emu' platform.

        * conf/any-emu.rmk: New file.
        * conf/common.rmk (grub_emu_init.lst, grub_emu_init.h)
        (grub_emu_init.c): Move from here ...
        * conf/any-emu.rmk: ... to here.

        * conf/i386-coreboot.rmk (sbin_UTILITIES): Remove `grub-emu'.
        (grub_emu_SOURCES, grub_emu_LDFLAGS): Move from here ...
        * conf/any-emu.rmk: ... to here.
2009-11-23 15:31:54 +00:00
Robert Millan
8d0edf4abd 2009-11-13 Robert Millan <rmh.grub@aybabtu.com>
* include/grub/multiboot.h (struct grub_multiboot_header): Move
        from here ...
        * include/multiboot.h (struct multiboot_header): ... to here.  Update
        all users.
        * include/grub/multiboot.h (struct grub_multiboot_info): Move
        from here ...
        * include/multiboot.h (struct multiboot_info): ... to here.  Update
        all users.
        * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): Move
        from here ...
        * include/multiboot.h (struct multiboot_mmap_entry): ... to here.
        Update all users.
        * include/grub/multiboot.h (struct grub_mod_list): Move
        from here ...
        * include/multiboot.h (struct multiboot_mod_list): ... to here.
        Update all users.
2009-11-13 13:34:51 +00:00
Robert Millan
6944770e0c 2009-11-13 Robert Millan <rmh.grub@aybabtu.com>
* include/multiboot2.h (multiboot_word): Rename from this ...
        (multiboot2_word): ... to this.  Update all users.
        (multiboot_header): Rename from this ...
        (multiboot2_header): ... to this.  Update all users.
        (multiboot_tag_header): Rename from this ...
        (multiboot2_tag_header): ... to this.  Update all users.
        (multiboot_tag_start): Rename from this ...
        (multiboot2_tag_start): ... to this.  Update all users.
        (multiboot_tag_name): Rename from this ...
        (multiboot2_tag_name): ... to this.  Update all users.
        (multiboot_tag_module): Rename from this ...
        (multiboot2_tag_module): ... to this.  Update all users.
        (multiboot_tag_memory): Rename from this ...
        (multiboot2_tag_memory): ... to this.  Update all users.
        (multiboot_tag_unused): Rename from this ...
        (multiboot2_tag_unused): ... to this.  Update all users.
        (multiboot_tag_end): Rename from this ...
        (multiboot2_tag_end): ... to this.  Update all users.
2009-11-13 13:30:55 +00:00
phcoder
46695a62e6 2009-10-16 Vladimir Serbinenko <phcoder@gmail.com>
Let user specify OpenBSD root device.

	* loader/i386/bsd.c (openbsd_root): New variable.
	(openbsd_opts): New option 'root'.
	(OPENBSD_ROOT_ARG): New macro.
	(grub_openbsd_boot): Use 'openbsd_root'.
	(grub_cmd_openbsd): Fill 'openbsd_root'.
2009-10-16 20:21:12 +00:00
phcoder
44998e5893 2009-10-15 Vladimir Serbinenko <phcoder@gmail.com>
* loader/i386/pc/xnu.c (grub_xnu_set_video): Fix loading splash image.
2009-10-15 12:40:13 +00:00
robertmh
9155bc1796 2009-10-14 Robert Millan <rmh.grub@aybabtu.com>
Refer to kernel of FreeBSD "kFreeBSD" to avoid confusion between
        the Operating System (FreeBSD) and its kernel (kernel of FreeBSD).

        * loader/i386/bsd.c (grub_freebsd_boot): Read kernel environment
        from "kFreeBSD" namespace (rather than "FreeBSD").  Update all
        users.

        (GRUB_MOD_INIT (bsd)): Rename "freebsd" command to "kfreebsd",
        "openbsd" to "kopenbsd", "netbsd" to "knetbsd", "freebsd_loadenv"
        to "kfreebsd_loadenv", "freebsd_module" to "kfreebsd_module",
        and "freebsd_module_elf" to "kfreebsd_module_elf".  Update all
        users.
2009-10-14 16:49:22 +00:00
robertmh
5c936493d3 2009-10-09 Robert Millan <rmh.grub@aybabtu.com>
Fail gracefuly when attempting to load 64-bit kFreeBSD on IA32 CPU.

        * include/grub/i386/cpuid.h: New file.
        * commands/i386/cpuid.c: Include `<grub/i386/cpuid.h>'.
        (has_longmode): Rename to ...
        (grub_cpuid_has_longmode): ... this.  Update all users.  Remove
        `static' attribute.
        * loader/i386/bsd.c: Include `<grub/i386/cpuid.h>'.
        (grub_bsd_load_elf): Fail if load of 64-bit kernel was requested
        on a CPU that doesn't implement AMD64 instruction set.
2009-10-09 17:57:02 +00:00
robertmh
6122955707 2009-09-12 Robert Millan <rmh.grub@aybabtu.com>
* video/i386/pc/vbe.c (grub_vbe_get_video_mode_info): Move packed
        mode special handling (grub_vbe_bios_set_dac_palette_width() call)
        from here ...
        * loader/i386/linux.c [GRUB_MACHINE_PCBIOS]
        (grub_linux_setup_video): ... to here (with some adjustments).
2009-09-12 13:07:27 +00:00
phcoder
975146895c missing part of previous commit 2009-09-04 13:50:32 +00:00
phcoder
197f76c741 2009-09-04 Vladimir Serbinenko <phcoder@gmail.com>
* loader/i386/xnu.c (grub_cpu_xnu_fill_devicetree): Remove
	unnecessary calls to grub_error.
2009-09-04 13:16:07 +00:00
phcoder
fe00f472fc 2009-08-30 Vladimir Serbinenko <phcoder@gmail.com>
* loader/i386/bsdXX.c (SUFFIX (grub_freebsd_load_elfmodule)): Fix
	loading of headers in some cases.
2009-08-30 19:28:01 +00:00
phcoder
552bf6c568 2009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
NetBSD memory map support.

	* include/grub/i386/bsd.h (NETBSD_BTINFO_MEMMAP): New definition.
	(grub_netbsd_btinfo_mmap_header): New structure.
	(grub_netbsd_btinfo_mmap_entry): Likewise.
	* loader/i386/bsd.c (grub_netbsd_boot): Pass memory map.
2009-08-26 00:32:57 +00:00
phcoder
1ae2078cd8 2009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
Enable bsd.mod on coreboot.

	* conf/i386-coreboot.rmk (pkglib_MODULES): Add bsd.mod.
	(bsd_mod_SOURCES): New variable.
	(bsd_mod_CFLAGS): Likewise.
	(bsd_mod_LDFLAGS): Likewise.
	(bsd_mod_ASFLAGS): Likewise.
	* loader/i386/bsd.c [!GRUB_MACHINE_PCBIOS]: Fix includes.
	(grub_bsd_get_device) [!GRUB_MACHINE_PCBIOS]: Set *biosdev to 0xff.
2009-08-25 23:18:48 +00:00
phcoder
beefc59841 2009-08-25 Vladimir Serbinenko <phcoder@gmail.com>
Cleanup NetBSD root support.

	* loader/i386/bsd.c (grub_netbsd_boot): Remove call to
	grub_bsd_get_device.
	Fix typo.
2009-08-25 19:57:18 +00:00
phcoder
dd103c4e04 2009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
Fix OpenBSD and NetBSD support.

	* include/grub/i386/bsd.h (GRUB_BSD_TEMP_BUFFER): Change to resolve
	memory address conflict.
	(OPENBSD_MMAP_ACPI): New definition.
	(OPENBSD_MMAP_NVS): Likewise.
	* loader/i386/bsd.c (grub_openbsd_boot): Support OPENBSD_MMAP_ACPI
	and OPENBSD_MMAP_NVS.
	Add memory map terminator
	Explicit cast when calling grub_unix_real_boot.
	(grub_nebsd_boot): Explicit cast when calling grub_unix_real_boot.
2009-08-24 13:20:24 +00:00
phcoder
16c84d744c 2009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
Let user specify NetBSD root device.

	* loader/i386/bsd.c (netbsd_root): New variable.
	(netbsd_opts): New option 'root'.
	(NETBSD_ROOT_ARG): New macro.
	(grub_netbsd_boot): Use 'netbsd_root'.
	(grub_bsd_unload): Free 'netbsd_root'.
	(grub_cmd_netbsd): Fill 'netbsd_root'.
2009-08-24 13:10:12 +00:00
phcoder
adb29902f3 2009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
Support for 64-bit NetBSD.

	* loader/i386/bsd.c (grub_bsd_load_elf): Apply correct mask to entry
	point when booting non-FreeBSD.
2009-08-24 12:59:48 +00:00
phcoder
f5ae9f745f 2009-08-24 Vladimir Serbinenko <phcoder@gmail.com>
Support --no-smp and --no-acpi for NetBSD.

	* include/grub/i386/bsd.h (NETBSD_AB_NOSMP): New definition.
	(NETBSD_AB_NOACPI): Likewise.
	* loader/i386/bsd.c (netbsd_opts): New entries no-smp and no-acpi.
	(netbsd_flags): Add NETBSD_AB_NOSMP, NETBSD_AB_NOACPI.
2009-08-24 12:55:19 +00:00
phcoder
c11fded5f2 2009-08-23 Vladimir Serbinenko <phcoder@gmail.com>
* loader/i386/bsd.c (freebsd_opts): Rewritten to use extcmd.
	(openbsd_opts): Likewise.
	(netbsd_opts): Likewise.
	(freebsd_flags): Added 0 terminator.
	(openbsd_flags): Likewise.
	(netbsd_flags): Likewise.
	(grub_bsd_parse_flags): Rewritten to use extcmd. All users updated.
	(grub_cmd_freebsd): Transformed into extended command.
	(grub_cmd_openbsd): Likewise.
	(grub_cmd_netbsd): Likewise.
	(cmd_freebsd): Changed type to grub_extcmd_t.
	(cmd_openbsd): Likewise.
	(cmd_netbsd): Likewise.
	(GRUB_MOD_INIT (bsd)): Register grub_cmd_freebsd, grub_cmd_netbsd and
	grub_cmd_openbsd as extended commands.
	(GRUB_MOD_FINI (bsd)): Use grub_unregister_extcmd for cmd_freebsd,
	cmd_netbsd and cmd_openbsd
2009-08-23 11:46:25 +00:00
robertmh
08aa61f0e2 2009-08-17 Robert Millan <rmh.grub@aybabtu.com>
* loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT)
        (DEFAULT_VIDEO_MODE): Remove macros.
        (grub_linux_boot): Remove assumption that Linux has FB support,
        and use "text" as default video mode.
2009-08-17 12:44:28 +00:00
phcoder
e1f39873bc 2009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
* loader/i386/multiboot.c (grub_multiboot): Don't pass filename to
	payload.
	(grub_module): Likewise.
2009-08-14 15:19:24 +00:00
phcoder
c166d79e62 2009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
* loader/i386/multiboot.c (grub_multiboot_unload): Don't free mbi and
	mbi->cmdline but free playground.
2009-08-14 15:15:33 +00:00
phcoder
d3539132cd 2009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
Framebuffer split.

	* commands/i386/pc/vbetest.c (grub_cmd_vbetest): Restore video
	subsystem at the end.
	* conf/common.rmk (pkglib_MODULES): Add video_fb.mod.
	(video_fb_mod_SOURCES): New variable.
	(video_fb_mod_CFLAGS): Likewise.
	(video_fb_mod_LDFLAGS): Likewise.
	* conf/i386-pc.rmk (vbe_mod_SOURCES): Remove video/i386/pc/vbeblit.c,
	video/i386/pc/vbefill.c and video/i386/pc/vbeutil.c.
	* video/i386/pc/vbeblit.c: Moved from here ...
	* video/fb/fbblit.c: ..here. Replaced 'vbe' with 'fb'.
	* video/i386/pc/vbefill.c: Moved from here ...
	* video/fb/fbfill.c: ..here. Replaced 'vbe' with 'fb'.
	* video/i386/pc/vbeutil.c: Moved from here ...
	* video/fb/fbutil.c: ..here. Replaced 'vbe' with 'fb'.
	* include/grub/i386/pc/vbeblit.h: Moved from here ...
	* include/grub/fbblit.h: ... here. Replaced 'vbe' with 'fb'.
	* include/grub/i386/pc/vbefill.h: Moved from here ...
	* include/grub/fbfill.h: ... here. Replaced 'vbe' with 'fb'.
	* include/grub/i386/pc/vbeutil.h: Moved from here ...
	* include/grub/fbutil.h: ... here. Replaced 'vbe' with 'fb'.
	* include/grub/i386/pc/vbe.h: Moved framebuffer part ...
	* include/grub/video_fb.h: ... here. Replaced 'vbe' with 'fb'.
	* include/grub/video.h (GRUB_VIDEO_RENDER_TARGET_FRONT_BUFFER): Removed.
	(GRUB_VIDEO_RENDER_TARGET_BACK_BUFFER): Likewise.
	(grub_video_adapter): Added 'get_info_and_fini'.
	(grub_video_get_info_and_fini): New prototype.
	(grub_video_set_mode): make modestring const char *.
	* loader/i386/linux.c (grub_linux_setup_video): Use
	grub_video_get_info_and_fini.
	(grub_linux_boot): Move modesetting just before booting.
	* loader/i386/pc/xnu.c (grub_xnu_set_video): Use
	grub_video_get_info_and_fini.
	* video/i386/pc/vbe.c: Moved framebuffer part ...
	* video/fb/video_fb.c: ... here. Replaced 'vbe' with 'fb'.
	* video/i386/pc/vbe.c (grub_vbe_set_video_mode): Use
	grub_video_fbstd_colors and grub_video_fb_set_palette.
	(grub_video_vbe_init): Clear 'framebuffer' variable and use
	grub_video_fb_init.
	(grub_video_vbe_fini): Use grub_video_fb_fini.
	(grub_video_vbe_setup): Use framebuffer.render_target instead of
	render_target and use grub_video_fb_set_active_render_target and
	grub_video_fb_set_palette.
	(grub_video_vbe_set_palette): Use grub_video_fb_set_palette.
	(grub_video_vbe_set_viewport): Use grub_video_fb_set_viewport.
	(grub_video_vbe_adapter): Use framebuffer.
	* video/video.c (grub_video_get_info_and_fini): New function.
	(grub_video_set_mode): Make modestring const char *.
	(GRUB_MOD_INIT(video_video)): Don't set variables to 0 since these
	values are already initialised.
2009-08-14 12:41:58 +00:00
robertmh
81623db677 2009-08-10 Robert Millan <rmh.grub@aybabtu.com>
* include/grub/i386/bsd.h (KERNEL_TYPE_NONE, KERNEL_TYPE_FREEBSD)
        (KERNEL_TYPE_OPENBSD, KERNEL_TYPE_NETBSD): Convert to ...
        (bsd_kernel_types): ... this enum.

        * loader/i386/bsd.c (grub_cmd_freebsd_loadenv, grub_cmd_freebsd_module)
        (grub_cmd_freebsd_module_elf): Abort with "You need to load the
        kernel first." when `kernel_type' is set to KERNEL_TYPE_NONE.

        (grub_bsd_load_aout, grub_bsd_load, grub_cmd_freebsd_loadenv)
        (grub_cmd_freebsd_module, grub_cmd_freebsd_module_elf)
        (GRUB_MOD_INIT (bsd)): Fix capitalization in a few error
        messages.
2009-08-10 15:42:39 +00:00
robertmh
388a7c7593 2009-07-28 Robert Millan <rmh.grub@aybabtu.com>
* loader/i386/linux.c (grub_cmd_linux): Use ',' rather than ';' as
        separator for the suggested gfxpayload string (';' collides with the
        parser and needs escaping).
2009-07-28 21:40:34 +00:00
phcoder
3bb7abcfbf 2009-07-28 Vladimir Serbinenko <phcoder@gmail.com>
* loader/i386/multiboot_helper.S (grub_multiboot_backward_relocator):
	Clear direction flag before jumping to OS.
	(grub_multiboot2_real_boot): Likewise.
2009-07-28 21:32:20 +00:00
proski
eab58da22c 2009-07-16 Pavel Roskin <proski@gnu.org>
* kern/mm.c (grub_zalloc): New function.
	(grub_debug_zalloc): Likewise.
	* include/grub/mm.h: Declare grub_zalloc() and
	grub_debug_zalloc().
	* util/misc.c (grub_zalloc): New function.
	* bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
	instead of grub_malloc(), remove unneeded initializations.
	* bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
	* commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
	* commands/parttool.c (grub_cmd_parttool): Likewise.
	* disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
	* disk/raid5_recover.c (grub_raid5_recover): Likewise.
	* disk/raid6_recover.c (grub_raid6_recover): Likewise.
	* disk/usbms.c (grub_usbms_finddevs): Likewise.
	* efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
	* efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
	(grub_cmd_efiemu_pnvram): Likewise.
	* fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
	* fs/iso9660.c (grub_iso9660_mount): Likewise.
	(grub_iso9660_iterate_dir): Likewise.
	* fs/jfs.c (grub_jfs_opendir): Likewise.
	* fs/ntfs.c (list_file): Likewise.
	(grub_ntfs_mount): Likewise.
	* kern/disk.c (grub_disk_open): Likewise.
	* kern/dl.c (grub_dl_load_core): Likewise.
	* kern/elf.c (grub_elf_file): Likewise.
	* kern/env.c (grub_env_context_open): Likewise.
	(grub_env_set): Likewise.
	(grub_env_set_data_slot): Likewise.
	* kern/file.c (grub_file_open): Likewise.
	* kern/fs.c (grub_fs_blocklist_open): Likewise.
	* loader/i386/multiboot.c (grub_module): Likewise.
	* loader/xnu.c (grub_xnu_create_key): Likewise.
	(grub_xnu_create_value): Likewise.
	* normal/main.c (grub_normal_add_menu_entry): Likewise.
	(read_config_file): Likewise.
	* normal/menu_entry.c (make_screen): Likewise.
	* partmap/sun.c (sun_partition_map_iterate): Likewise.
	* script/sh/lexer.c (grub_script_lexer_init): Likewise.
	* script/sh/script.c (grub_script_parse): Likewise.
	* video/bitmap.c (grub_video_bitmap_create): Likewise.
	* video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
	* video/readers/png.c (grub_png_output_byte): Likewise.
	(grub_video_reader_png): Likewise.
2009-07-16 22:14:09 +00:00
phcoder
59ade63d27 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
Make FreeBSD accept zpool.cache

	* loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
	type is /boot/zfs/zpool.cache
2009-07-15 22:51:47 +00:00
proski
44b5d87973 2009-07-13 Pavel Roskin <proski@gnu.org>
* include/grub/i386/coreboot/machine.h: Rename
	GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
	* loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
	multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
2009-07-13 23:57:11 +00:00
robertmh
b09db61ddd 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
* include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.

        * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
        assembly in final jump, using register constraints.

        (grub_linux_boot): For text mode, initialize `have_vga' using
        GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).

        Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
        right before the final jump.

        Set `video_mode' to 0x3.

        Document initialization of `video_page', `video_mode' and
        `video_ega_bx'.
2009-06-29 17:19:35 +00:00
robertmh
c6fe4d5328 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
* loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
        assembly in final jump, using register constraints.
2009-06-29 15:55:42 +00:00
robertmh
28333ad04f 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
* include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
        * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
        and set GRUB_LINUX_FLAG_QUIET appropiately.
2009-06-29 12:20:56 +00:00
robertmh
ad760f81b0 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
* loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
        `err'.
2009-06-27 17:37:07 +00:00
robertmh
87a4623bda 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
Revert r2338.

        * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
        file can't be opened.  grub_file_open() is already supposed to set
        grub_errno / grub_errmsg appropiately.
        * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
2009-06-27 12:21:18 +00:00
proski
c402ab1734 2009-06-26 Pavel Roskin <proski@gnu.org>
* include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
	* include/grub/elf.h: Define symbols without "32" or "64" based
	on GRUB_TARGET_WORDSIZE.
	* include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
	* efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
	ELF definitions.
	* efiemu/loadcore64.c: Likewise.
	* loader/i386/bsd32.c: Likewise.
	* loader/i386/bsd64.c: Likewise.
	* kern/dl.c: Remove own ELF definitions.
	* util/i386/efi/grub-mkimage.c: Likewise.
2009-06-27 03:01:42 +00:00
proski
c3cee41331 2009-06-21 Pavel Roskin <proski@gnu.org>
* loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
	to match nested functions.
	* loader/sparc64/ieee1275/linux.c: Likewise.
2009-06-21 23:55:23 +00:00
phcoder
3f3ec72b38 2009-06-21 Vladimir Serbinenko <phcoder@gmail.com>
Load BSD ELF modules

	* conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
	and loader/i386/bsd64.c
	* include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
	(FREEBSD_MODTYPE_ELF_MODULE): New definition
	(FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
	(grub_freebsd_load_elfmodule32): New declaration
	(grub_freebsd_load_elfmoduleobj64): Likewise
	(grub_freebsd_load_elf_meta32): Likewise
	(grub_freebsd_load_elf_meta64): Likewise
	(grub_freebsd_add_meta): Likewise
	(grub_freebsd_add_meta_module): Likewise
	* loader/i386/bsd.c (grub_freebsd_add_meta): Make global
	(grub_freebsd_add_meta_module): Likewise and move module-specific
	parts to grub_cmd_freebsd and grub_cmd_freebsd_module
	(grub_cmd_freebsd): Add elf-kernel specific parts
	based on grub_freebsd_add_meta_module
	(grub_cmd_freebsd_module): Add type parsing moved from
	grub_freebsd_add_meta_module
	(grub_cmd_freebsd_module_elf): New function
	(cmd_freebsd_module_elf): New variable
	(GRUB_MOD_INIT): Register freebsd_module_elf
	* loader/i386/bsd32.c: New file
	* loader/i386/bsd64.c: Likewise
	* loader/i386/bsdXX.c: Likewise
	* kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
	(grub_elf64_load): Likewise
	* include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
	All users updated
	(grub_elf64_load_hook_t): Likewise
2009-06-21 15:48:10 +00:00
fzielcke
05b129e0d3 2009-06-17 Felix Zielcke <fzielcke@z-51.de>
* loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
	file can't be found.
	* loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
2009-06-17 17:19:23 +00:00
phcoder
71c79a6b3b 2009-06-13 Vladimir Serbinenko <phcoder@gmail.com>
* loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition 
	handling
2009-06-13 21:09:11 +00:00
proski
3a4575d4ea 2009-06-11 Pavel Roskin <proski@gnu.org>
* loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
	`entry_lo' to fix variable shadowing.
2009-06-11 21:48:48 +00:00
proski
22cd079d3b 2009-06-11 Pavel Roskin <proski@gnu.org>
* loader/ieee1275/multiboot2.c [__i386__]: Include
	grub/cpu/multiboot.h.
2009-06-11 16:41:24 +00:00
phcoder
63963d17d0 2009-06-11 Vladimir Serbinenko <phcoder@gmail.com>
Drivemap fixes

	* commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
	new function
	(grub_get_root_biosnumber_saved): new variable
	(GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
	(GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
	* commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore 
	%dx after the call if necessary
	* conf/common.rmk (pkglib_MODULES): remove boot.mod
	(boot_mod_SOURCES): remove
	(boot_mod_CFLAGS): remove
	(boot_mod_LDFLAGS): remove
	* conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
	(boot_mod_SOURCES): new variable
	(boot_mod_CFLAGS): likewise
	(boot_mod_LDFLAGS): likewise
	* conf/i386-efi.rmk: likewise
	* conf/i386-ieee1275.rmk: likewise
	* conf/i386-pc.rmk: likewise
	* conf/powerpc-ieee1275.rmk: likewise
	* conf/sparc64-ieee1275.rmk: likewise
	* conf/x86_64-efi.rmk: likewise
	* include/grub/i386/pc/biosnum.h: new file
	* lib/i386/pc/biosnum.c: likewise
	* loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
	* loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
	* loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
2009-06-11 16:13:39 +00:00
proski
5c5215d5e2 2009-06-10 Pavel Roskin <proski@gnu.org>
* kern/file.c (grub_file_read): Use void pointer for the buffer.
	Adjust all callers.
2009-06-10 23:47:49 +00:00
fzielcke
b39f9d20a9 remove all trailing whitespace 2009-06-10 21:04:23 +00:00
proski
2763ac183d 2009-06-10 Pavel Roskin <proski@gnu.org>
* include/grub/multiboot2.h: Provide compatibility defines for
	multiboot2.h.
	* include/multiboot2.h: Include stdint.h only if needed, using
	angle brackets.
	* loader/i386/pc/multiboot2.c: Include multiboot2.h after
	grub/multiboot2.h.
	* loader/ieee1275/multiboot2.c: Likewise.
	* loader/multiboot2.c: Likewise.
	* loader/multiboot_loader.c: Likewise.
2009-06-10 20:11:12 +00:00
robertmh
9e172e3066 2009-06-08 Robert Millan <rmh.grub@aybabtu.com>
* loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
        as fallback an equivalent option without depth.
2009-06-08 16:12:58 +00:00
phcoder
e93cdc3db1 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
Address in trampolines based on 32-bit registers when compiled
	with Apple's CC

	* loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers 
	for addresses
	* loader/i386/linux_trampoline.S [APPLE_CC]: likewise
2009-06-04 21:21:31 +00:00
phcoder
cc6c3ac1bf 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC

	* efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
	temporary storage
	* include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when 
	using Apple's CC 
	(grub_cpu_is_tsc_supported): likewise
	* loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
2009-06-04 20:10:51 +00:00
phcoder
3eb5ed4ec0 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
gfxpayload support

	* commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
	* include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
	(grub_video_setup): remove
	(grub_video_set_mode): new prototype
	* loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
	(vid_mode): remove
	(linux_vesafb_res): compile only on PCBIOS
	(grub_linux_boot): support gfxpayload
	* loader/i386/pc/xnu.c (video_hook): new function
	(grub_xnu_set_video): support gfxpayload
	* term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
	(DEFAULT_VIDEO_HEIGHT): likewise
	(DEFAULT_VIDEO_FLAGS): likewise
	(DEFAULT_VIDEO_MODE): new definition
	(video_hook): new function
	(grub_gfxterm_init): use grub_video_set_mode
	* util/grub.d/30_os-prober.in: remove explicit modesetting before 
	loading xnu
	* video/video.c (grub_video_setup): removed
	(grub_video_set_mode): new function based on grub_gfxterm_init and 
	grub_video_setup
2009-06-04 18:22:45 +00:00
phcoder
76f3b6e6b9 ident 2009-05-19 15:24:48 +00:00