1. 08 Sep, 2014 1 commit
    • Colin Watson's avatar
      Support grub-emu on x32 (ILP32 but with x86-64 instruction set) · 2a5a532c
      Colin Watson authored
      * configure.ac: Remove -m64 from checks for -mcmodel=large and
      -mno-red-zone.  These are always either unnecessary (x86_64-emu) or
      already in TARGET_CFLAGS at this point, and they produce incorrect
      results when building for x32.
      * grub-core/kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Cast
      pointers to Elf64_Xword via grub_addr_t, in order to work on x32.
      * include/grub/x86_64/types.h (GRUB_TARGET_SIZEOF_VOID_P,
      GRUB_TARGET_SIZEOF_LONG): Define to 4 on x32.
      2a5a532c
  2. 18 Dec, 2013 1 commit
  3. 17 Dec, 2013 1 commit
  4. 16 Dec, 2013 1 commit
  5. 15 Dec, 2013 1 commit
  6. 10 Dec, 2013 1 commit
  7. 10 Nov, 2013 1 commit
  8. 18 Oct, 2013 1 commit
  9. 12 Jun, 2012 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      Remove non-functional EFI grub_get_rtc. Put a better fatal message · 7da036bb
      Vladimir 'phcoder' Serbinenko authored
      	than current grub_get_rtc() not implemented when booted with
      	coreboot without TSC.
      
      	* grub-core/Makefile.am: Exclude efi/time.h from kernel headers.
      	Add machine/time.h to kernel headers on loongson.
      	* grub-core/Makefile.core.def (kernel): Remove
      	kern/generic/rtc_get_time_ms.c on qemu-multiboot-coreboot.
      	* grub-core/kern/efi/efi.c (grub_rtc_get_time_ms): Removed.
      	(grub_get_rtc): Likewise.
      	* grub-core/kern/generic/rtc_get_time_ms.c: Include grub/machine/time.h.
      	* grub-core/kern/i386/coreboot/init.c (grub_get_rtc): Removed.
      	* grub-core/kern/i386/pc/init.c: Include grub/machine/init.h.
      	* grub-core/kern/i386/tsc.c (grub_tsc_init)
      	[!GRUB_MACHINE_PCBIOS && !GRUB_MACHINE_IEEE1275]: Call grub_fatal
      	rather than installing known non-working time source.
      	* grub-core/kern/ieee1275/init.c (grub_get_rtc): Removed.
      	* grub-core/kern/mips/loongson/init.c: Include grub/machine/time.h.
      	* include/grub/time.h: Don't include machine/time.h.
      	* include/grub/efi/time.h: Removed.
      	* include/grub/i386/efi/time.h: Likewise.
      	* include/grub/i386/ieee1275/time.h: Likewise.
      	* include/grub/powerpc/ieee1275/time.h: Likewise.
      	* include/grub/sparc64/ieee1275/time.h: Likewise.
      	* include/grub/x86_64/efi/time.h: Likewise.
      7da036bb
  10. 14 Dec, 2011 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      Fix video on platforms where unaligned access is forbidden. · 12e9d4d1
      Vladimir 'phcoder' Serbinenko authored
      	Make several optimisations while on it.
      
      	* grub-core/video/fb/fbblit.c (grub_video_fbblit_replace_directN):
      	Optimise and use GRUB_VIDEO_FB_ADVANCE_POINTER.
      	(grub_video_fbblit_replace_32bit_1bit): Likewise.
      	(grub_video_fbblit_replace_24bit_1bit) [!GRUB_HAVE_UNALIGNED_ACCESS]:
      	Disable.
      	(grub_video_fbblit_replace_16bit_1bit):
      	Optimise and use GRUB_VIDEO_FB_ADVANCE_POINTER.
      	(grub_video_fbblit_replace_8bit_1bit): Likewise.
      	(grub_video_fbblit_replace_BGRX8888_RGBX8888): Likewise.
      	(grub_video_fbblit_replace_BGRX8888_RGB888): Likewise.
      	(grub_video_fbblit_replace_BGR888_RGBX8888): Likewise.
      	(grub_video_fbblit_replace_BGR888_RGBX8888): Likewise.
      	(grub_video_fbblit_replace_BGR888_RGB888): Likewise.
      	(grub_video_fbblit_replace_RGBX8888_RGB88): Likewise.
      	(grub_video_fbblit_replace_RGB888_RGBX888): Likewise.
      	(grub_video_fbblit_replace_RGB888_RGBX8888): Likewise.
      	(grub_video_fbblit_replace_index_RGBX8888): Likewise.
      	(grub_video_fbblit_replace_index_RGB888): Likewise.
      	(grub_video_fbblit_blend_BGRA8888_RGBA8888): Likewise.
      	(grub_video_fbblit_blend_BGR888_RGBA8888): Likewise.
      	(grub_video_fbblit_blend_RGBA8888_RGBA8888): Likewise.
      	(grub_video_fbblit_blend_RGB888_RGBA8888): Likewise.
      	(grub_video_fbblit_blend_index_RGBA8888): Likewise.
      	(grub_video_fbblit_blend_XXXA8888_1bit): Likewise.
      	(grub_video_fbblit_blend_XXX888_1bit) [!GRUB_HAVE_UNALIGNED_ACCESS]:
      	Disable.
      	(grub_video_fbblit_blend_XXX565_1bit):
      	Optimise and use GRUB_VIDEO_FB_ADVANCE_POINTER.
      	* grub-core/video/fb/fbfill.c (grub_video_fbfill_direct32): Likewise.
      	* grub-core/video/fb/fbutil.c (grub_video_fb_get_video_ptr): Return
      	void *.
      	* grub-core/video/fb/video_fb.c (common_blitter)
      	[!GRUB_HAVE_UNALIGNED_ACCESS]: Skip disabled blitters.
      	(grub_video_fb_create_render_target_from_pointer)
      	[!GRUB_HAVE_UNALIGNED_ACCESS]: Check alignment.
      	* include/grub/fbutil.h (grub_video_fb_get_video_ptr): Return void *.
      	* include/grub/i386/types.h (GRUB_HAVE_UNALIGNED_ACCESS): New
      	definition.
      	* include/grub/x86_64/types.h (GRUB_HAVE_UNALIGNED_ACCESS): Likewise.
      12e9d4d1
  11. 17 Aug, 2010 1 commit
  12. 06 May, 2010 1 commit
  13. 27 Apr, 2010 1 commit
  14. 26 Apr, 2010 1 commit
  15. 25 Apr, 2010 1 commit
  16. 08 Feb, 2010 1 commit
  17. 20 Jan, 2010 1 commit
  18. 16 Jan, 2010 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      2010-01-15 Vladimir Serbinenko <phcoder@gmail.com> · a0b766fc
      Vladimir 'phcoder' Serbinenko authored
      	Enable multiboot on non-pc.
      
      	* conf/i386-coreboot.rmk, conf/i386-pc.rmk (pkglib_MODULES): Move
      	multiboot.mod and multiboot2.mod to ...
      	* conf/i386.rmk (pkglib_MODULES): ... here.
      	* conf/i386-coreboot.rmk, conf/i386-pc.rmk (multiboot_mod_SOURCES):
      	Moved to ...
      	* conf/i386.rmk (multiboot_mod_SOURCES): .. here.
      	* conf/i386-coreboot.rmk, conf/i386-pc.rmk (multiboot_mod_CFLAGS):
      	Moved to ...
      	* conf/i386.rmk (multiboot_mod_CFLAGS): .. here.
      	* conf/i386-coreboot.rmk, conf/i386-pc.rmk (multiboot_mod_ASFLAGS):
      	Moved to ...
      	* conf/i386.rmk (multiboot_mod_ASFLAGS): .. here.
      	* conf/i386-coreboot.rmk, conf/i386-pc.rmk (multiboot_mod_LDFLAGS):
      	Moved to ...
      	* conf/i386.rmk (multiboot_mod_LDFLAGS): .. here.
      	* conf/x86_64-efi.rmk (pkglib_MODULES): Remove ata.mod and
      	relocator.mod.
      	(ata_mod_SOURCES): Removed.
      	(ata_mod_CFLAGS): Likewise.
      	(ata_mod_LDFLAGS): Likewise.
      	(relocator_mod_SOURCES): Removed.
      	(relocator_mod_CFLAGS): Likewise.
      	(relocator_mod_ASFLAGS): Likewise.
      	(relocator_mod_LDFLAGS): Likewise.
      	Include i386.mk.
      	* include/grub/x86_64/multiboot.h: New file.
      	* loader/i386/multiboot.c (grub_multiboot_boot) [GRUB_MACHINE_EFI]:
      	Terminate EFI.
      a0b766fc
  19. 27 Nov, 2009 1 commit
  20. 23 Nov, 2009 1 commit
    • Robert Millan's avatar
      Cheery-pick grub-emu split from experimental (rev 1361) · f84b481b
      Robert Millan authored
      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.
      f84b481b
  21. 19 Nov, 2009 1 commit
  22. 17 May, 2009 1 commit
    • phcoder's avatar
      2009-05-17 Vladimir Serbinenko <phcoder@gmail.com> · 22f53a96
      phcoder authored
      	trampoline for linux on 64-bit platform
      
      	* conf/x86_64-efi.rmk (linux_mod_SOURCES): added 
      	loader/i386/efi/linux_trampoline.S 
      	* include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed 
      	declration
      	* kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from here
      	* loader/i386/linux_trampoline.S: moved here
      	* loader/i386/efi/linux.c (allocate_pages): reserve space for trampoline
      	(jumpvector): removed
      	(grub_linux_trampoline_start): new declaration
      	(grub_linux_trampoline_end): likewise
      	(grub_linux_boot): use trampoline when on 64-bit platform
      	* loader/i386/linux.c: likewise
      
      22f53a96
  23. 03 May, 2009 2 commits
    • phcoder's avatar
      2009-05-03 Vladimir Serbinenko <phcoder@gmail.com> · bbee0f2b
      phcoder authored
      	xnu support
      
      	* conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
      	(pkglib_MODULES): add xnu.mod
      	(xnu_mod_SOURCES): new variable
      	(xnu_mod_CFLAGS): likewise
      	(xnu_mod_LDFLAGS): likewise
      	(xnu_mod_ASFLAGS): likewise
      	* conf/i386-pc.rmk: likewise
      	* conf/x86_64-efi.rmk: likewise
      	* include/grub/efi/efi.h (grub_efi_finish_boot_services): 
      	new declaration
      	* include/grub/i386/macho.h: new file
      	* include/grub/i386/xnu.h: likewise
      	* include/grub/macho.h: likewise
      	* include/grub/machoload.h: likewise
      	* include/grub/x86_64/macho.h: likewise
      	* include/grub/x86_64/xnu.h: likewise
      	* include/grub/xnu.h: likewise
      	* kern/efi/efi.c (grub_efi_finish_boot_services): new function
      	* kern/efi/mm.c (MAX_HEAP_SIZE): increase
      	* loader/i386/efi/xnu.c: new file
      	* loader/i386/pc/xnu.c: likewise
      	* loader/i386/xnu.c: likewise
      	* loader/i386/xnu_helper.S: likewise
      	* loader/macho.c: likewise
      	* loader/xnu.c: likewise
      	* loader/xnu_resume.c: likewise
      	* util/grub-dumpdevtree: likewise
      	* include/grub/i386/pit.h: include grub/err.h
      	(grub_pit_wait): export
      	* util/grub.d/30_os-prober.in: support Darwin/Mac OS X
      	
      bbee0f2b
    • phcoder's avatar
      2009-05-02 Vladimir Serbinenko <phcoder@gmail.com> · 09d842b9
      phcoder authored
      	Mmap services
      
      	* loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
      	* loader/i386/linux.c (find_mmap_size): likewise
      	(allocate_pages): likewise
      	* loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
      	(grub_fill_multiboot_mmap): likewise
      	(grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
      	* loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
      	* include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
      	(OPENBSD_MMAP_RESERVED): likewise
      	* include/grub/i386/pc/memory.h: include grub/memory.h
      	(grub_lower_mem): removed
      	(grub_upper_mem): likewise
      	(GRUB_MACHINE_MEMORY_ACPI): new definition
      	(GRUB_MACHINE_MEMORY_NVS): likewise
      	(GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
      	(GRUB_MACHINE_MEMORY_HOLE): likewise
      	(grub_machine_mmap_register): likewise
      	(grub_machine_mmap_unregister): likewise
      	(grub_machine_get_upper): likewise
      	(grub_machine_get_lower): likewise
      	(grub_machine_get_post64): likewise
      	* include/grub/i386/efi/memory.h: new file
      	* include/grub/x86_64/efi/memory.h: likewise
      	* include/grub/efi/memory.h: likewise
      	* conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
      	(mmap_mod_SOURCES): new variable
      	(mmap_mod_LDFLAGS): likewise
      	(mmap_mod_ASFLAGS): likewise
      	* conf/i386-coreboot.rmk: likewise
      	* conf/i386-ieee1275.rmk: likewise
      	* conf/i386-efi.rmk: likewise
      	* conf/x86_64-efi.rmk: likewise
      	* include/grub/types.h (UINT_TO_PTR): new macro
      	(PTR_TO_UINT32): likewise
      	(PTR_TO_UINT64): likewise
      	* include/grub/memory.h: new file
      	* mmap/i386/pc/mmap.c: likewise
      	* mmap/i386/pc/mmap_helper.S: likewise
      	* mmap/i386/uppermem.c: likewise
      	* mmap/mmap.c: likewise
      	* mmap/efi/mmap.c: likewise
      	* kern/i386/coreboot/init.c (grub_machine_init): don't use 
      	grub_upper_mem
      	* kern/i386/pc/init.c (grub_lower_mem): removed variable
      	(grub_upper_mem): likewise
      	(grub_machine_init): don't use grub_upper_mem,
      	make grub_lower_mem local
      	* loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
      	grub_mmap_iterate and grub_mmap_get_upper
      	(grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
      
      09d842b9
  24. 01 Apr, 2009 1 commit
    • robertmh's avatar
      2009-04-01 David S. Miller <davem@davemloft.net> · 5270cec8
      robertmh authored
      	* normal/sparc64/setjmp.S: Fix setjmp implementation.
      	* include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
      	(grub_setjmp): Mark with 'returns_twice' attribute.
      	* include/grub/i386/setjmp.h (grub_setjmp): Likewise
      	* include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
      	* include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
      5270cec8
  25. 21 Mar, 2009 1 commit
    • bean's avatar
      2009-03-21 Bean <bean123ch@gmail.com> · b1b797cb
      bean authored
      	* commands/blocklist.c: Add include file <grub/command.h>, remove
      	<grub/normal.h> and <grub/arg.h>.
      	(grub_cmd_blocklist): Use the new command interface.
      	(GRUB_MOD_INIT): Likewise.
      	(GRUB_MOD_FINI): Likewise.
      	* commands/boot.c: Likewise.
      	* commands/cat.c: Likewise.
      	* commands/cmp.c: Likewise.
      	* commands/configfile.c: Likewise.
      	* commands/crc.c: Likewise.
      	* commands/echo.c: Likewise.
      	* commands/halt.c: Likewise.
      	* commands/handler.c: Likewise.
      	* commands/hdparm.c: Likewise.
      	* commands/help.c: Likewise.
      	* commands/hexdump.c: Likewise.
      	* commands/loadenv.c: Likewise.
      	* commands/ls.c: Likewise.
      	* commands/lsmmap.c: Likewise.
      	* commands/lspci.c: Likewise.
      	* commands/loadenv.c: Likewise.
      	* commands/read.c: Likewise.
      	* commands/reboot.c: Likewise.
      	* commands/search.c: Likewise.
      	* commands/sleep.c: Likewise.
      	* commands/test.c: Likewise.
      	* commands/usbtest.c: Likewise.
      	* commands/videotest.c: Likewise.
      	* commands/i386/cpuid.c: Likewise.
      	* commands/i386/pc/halt.c: Likewise.
      	* commands/i386/pc/play.c: Likewise.
      	* commands/i386/pc/pxecmd.c: Likewise.
      	* commands/i386/pc/vbeinfo.c: Likewise.
      	* commands/i386/pc/vbetest.c: Likewise.
      	* commands/ieee1275/suspend.c: Likewise.
      	* disk/loopback.c: Likewise.
      	* font/font_cmd.c: Likewise.
      	* hello/hello.c: Likewise.
      	* loader/efi/appleloader.c: Likewise.
      	* loader/efi/chainloader.c: Likewise.
      	* loader/i386/bsd.c: Likewise.
      	* loader/i386/efi/linux.c: Likewise.
      	* loader/i386/ieee1275/linux.c: Likewise.
      	* loader/i386/linux.c: Likewise.
      	* loader/i386/pc/chainloader.c: Likewise.
      	* loader/i386/pc/linux.c: Likewise.
      	* loader/powerpc/ieee1275/linux.c: Likewise.
      	* loader/multiboot_loader.c: Likewise.
      	* term/gfxterm.c: Likewise.
      	* term/i386/pc/serial.c: Likewise.
      	* term/terminfo.c: Likewise.
      
      	* term/i386/pc/vesafb.c: Removed <grub/arg.h>.
      	* term/i386/pc/vga.c: Likewise.
      	* video/readers/jpeg.c: Likewise.
      	* video/readers/png.c: Likewise.
      	* video/readers/tga.c: Likewise.
      
      	* util/grub-fstest (cmd_loopback): Removed.
      	(cmd_blocklist): Likewise.
      	(cmd_ls): Likewise.
      	(grub_register_command): Likewise.
      	(grub_unregister_command): Likewise.
      	(execute_command): Use grub_command_find to locate command and execute
      	it.
      
      	* include/grub/efi/chainloader.h: Removed.
      	* loader/efi/chainloader_normal.c: Likewise.
      	* loader/i386/bsd_normal.c: Likewise.
      	* loader/i386/pc/chainloader_normal.c: Likewise.
      	* loader/i386/pc/multiboot_normal.c: Likewise.
      	* loader/linux_normal.c: Likewise.
      	* loader/multiboot_loader_normal.c: Likewise.
      	* loader/powerpc/ieee1275/linux_normal.c: Likewise.
      
      	* gencmdlist.sh: Scan new registration command grub_register_extcmd
      	and grub_register_command_p1.
      
      	* conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
      	kern/command.c, lib/arg.c and commands/extcmd.c.
      	(pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
      	(minicmd_mod_SOURCES): New variable.
      	(minicmd_mod_CFLAGS): Likewise.
      	(minicmd_mod_LDFLAGS): Likewise.
      	(extcmd_mod_SOURCES): Likewise.
      	(extcmd_mod_CFLAGS): Likewise.
      	(extcmd_mod_LDFLAGS): Likewise.
      	(boot_mod_SOURCES): Removed.
      	(boot_mod_CFLAGS): Likewise.
      	(boot_mod_LDFLAGS): Likewise.
      
      	* conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
      	kern/corecmd.c.
      	(kernel_img_HEADERS): Add command.h.
      	(grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
      	commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
      	and lib/arg.c.
      	(pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
      	_multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
      	remove the corresponding normal mode command.
      	(normal_mod_SOURCES): Remove normal/arg.c.
      	* conf/i386-coreboot.rmk: Likewise.
      	* conf/i386-efi.rmk: Likewise.
      	* conf/i386-ieee1275.rmk: Likewise.
      	* conf/powerpc-ieee1275.rmk: Likewise.
      	* conf/x86_64-efi.rmk: Likewise.
      
      	* include/grub/arg.h: Move from here ...
      	* include/grub/lib/arg.h: ... to here.
      
      	* normal/arg.c: Move from here ...
      	* lib/arg.c: ... to here.
      
      	* commands/extcmd.c: New file.
      	* commands/minicmd.c: Likewise.
      	* include/grub/command.h: Likewise.
      	* include/grub/extcmd.h: Likewise.
      	* kern/command.c: Likewise.
      	* kern/corecmd.c: Likewise.
      
      	* kern/list.c (grub_list_iterate): Return int instead of void.
      	(grub_list_insert): New function.
      	(grub_prio_list_insert): Likewise.
      
      	* kern/rescue.c (grub_rescue_command): Removed.
      	(grub_rescue_command_list): Likewise.
      	(grub_rescue_register_command): Likewise.
      	(grub_rescue_unregister_command): Likewise.
      	(grub_rescue_cmd_boot): Move to minicmd.c
      	(grub_rescue_cmd_help): Likewise.
      	(grub_rescue_cmd_info): Likewise.
      	(grub_rescue_cmd_boot): Likewise.
      	(grub_rescue_cmd_testload): Likewise.
      	(grub_rescue_cmd_dump): Likewise.
      	(grub_rescue_cmd_rmmod): Likewise.
      	(grub_rescue_cmd_lsmod): Likewise.
      	(grub_rescue_cmd_exit): Likewise.
      	(grub_rescue_print_devices): Moved to corecmd.c.
      	(grub_rescue_print_files): Likewise.
      	(grub_rescue_cmd_ls): Likewise.
      	(grub_rescue_cmd_insmod): Likewise.
      	(grub_rescue_cmd_set): Likewise.
      	(grub_rescue_cmd_unset): Likewise.
      	(attemp_normal_mode): Use grub_command_find to get normal module.
      	(grub_enter_rescue_mode): Use grub_register_core_commands to register
      	commands, remove grub_rescue_regiter_command calls.
      
      	* normal/command.c (grub_regiser_command): Removed.
      	(grub_unregister_command): Likewise.
      	(grub_command_find): Likewise.
      	(grub_iterate_commands): Likewise.
      	(rescue_command): Likewise.
      	(export_command): Moved to corecmd.c.
      	(set_command): Removed.
      	(unset_command): Likewise.
      	(insmod_command): Likewise.
      	(rmmod_command): Likewise.
      	(lsmod_command): Likewise.
      	(grub_command_init): Likewise.
      
      	* normal/completion.c (iterate_command): Use cmd->prio to check for
      	active command.
      	(complete_arguments): Use grub_extcmd_t structure to find options.
      	(grub_normal_do_completion): Change function grub_iterate_commands to
      	grub_command_iterate.
      
      	* normal/execute.c (grub_script_execute_cmd): No need to parse
      	argument here.
      
      	* normal/main.c (grub_dyncmd_dispatcher): New function.
      	(read_command_list): Register unload commands as dyncmd.
      	(grub_cmd_normal): Use new command interface, register rescue,
      	unregister normal at entry, register normal, unregister rescue at exit.
      
      	* include/grub/list.h (grub_list_test_t): New type.
      	(grub_list_iterate): Return int instead of void.
      	(grub_list_insert): New function.
      	(GRUB_AS_NAMED_LIST_P): New macro.
      	(GRUB_AS_PRIO_LIST): Likewise.
      	(GRUB_AS_PRIO_LIST_P): Likewise.
      	(GRUB_PRIO_LIST_PRIO_MASK): New constant.
      	(GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
      	(grub_prio_list): New structure.
      	(grub_prio_list_insert): New function.
      	(grub_prio_list_remove): New inline function.
      
      	* include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
      	(GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
      	(GRUB_COMMAND_FLAG_MENU): Likewise.
      	(GRUB_COMMAND_FLAG_BOTH): Likewise.
      	(GRUB_COMMAND_FLAG_TITLE): Likewise.
      	(GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
      	(GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
      	(GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
      	(grub_command): Likewise.
      	(grub_register_command): Likewise.
      	(grub_command_find): Likewise.
      	(grub_iterate_commands): Likewise.
      	(grub_command_init): Likewise.
      	(grub_arg_parse): Likewise.
      	(grub_arg_show_help): Likewise.
      
      	* include/grub/rescue.h (grub_rescue_register_command): Removed.
      	(grub_rescue_unregister_command): Likewise.
      
      	* include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
      	grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
      	grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
      
      	* include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
      	grub_rescue_cmd_initrd.
      	* include/grub/i386/loader.h: Likewise.
      	* include/grub/x86_64/loader.h: Likewise.
      
      	* include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
      b1b797cb
  26. 18 Aug, 2008 1 commit
  27. 08 Aug, 2008 1 commit
  28. 03 Aug, 2008 1 commit
    • robertmh's avatar
      2008-08-03 Robert Millan <rmh@aybabtu.com> · dd19c7d7
      robertmh authored
              Make PCI available on all i386 architectures.
      
              * include/grub/i386/pc/pci.h: Move from here ...
              * include/grub/i386/pci.h: ... to here.
      
              * include/grub/i386/pc/pci.h: Remove.
              * include/grub/i386/efi/pci.h: Remove.
              * include/grub/x86_64/efi/pci.h: Remove.
      
              * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
              `<grub/cpu/pci.h>'.
      
              * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
              (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
              (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
      
              * conf/i386-ieee1275.rmk: Likewise.
      dd19c7d7
  29. 17 Jul, 2008 1 commit
    • bean's avatar
      2008-07-17 Bean <bean123ch@gmail.com> · 20011694
      bean authored
      	* conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
      	(appleldr_mod_SOURCE): New variavle.
      	(appleldr_mod_CFLAGS): Likewise.
      	(appleldr_mod_LDFLAGS): Likewise.
      	(pci_mod_SOURCES): Likewise.
      	(pci_mod_CFLAGS): Likewise.
      	(pci_mod_LDFLAGS): Likewise.
      	(lspci_mod_SOURCES): Likewise.
      	(lspci_mod_CFLAGS): Likewise.
      	(lspci_mod_LDFLAGS): Likewise.
      
      	* conf/x86_64-efi.rmk: New file.
      
      	* disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
      	macro.
      	(grub_efidisk_write): Likewise.
      
      	* include/efi/api.h (efi_call_0): New macro.
      	(efi_call_1): Likewise.
      	(efi_call_2): Likewise.
      	(efi_call_3): Likewise.
      	(efi_call_4): Likewise.
      	(efi_call_5): Likewise.
      	(efi_call_6): Likewise.
      
      	* include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
      	grub_rescue_cmd_chainloader.
      
      	* include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
      	(grub_pe32_optional_header): Change some fields based on i386 or
      	x86_64 platform.
      	(GRUB_PE32_PE32_MAGIC): Likewise.
      
      	* include/grub/efi/uga_draw.h: New file.
      
      	* include/grub/elf.h (STN_ABS): New constant.
      	(R_X86_64_NONE): Relocation constant for x86_64.
      	(R_X86_64_64): Likewise.
      	(R_X86_64_PC32): Likewise.
      	(R_X86_64_GOT32): Likewise.
      	(R_X86_64_PLT32): Likewise.
      	(R_X86_64_COPY): Likewise.
      	(R_X86_64_GLOB_DAT): Likewise.
      	(R_X86_64_JUMP_SLOT): Likewise.
      	(R_X86_64_RELATIVE): Likewise.
      	(R_X86_64_GOTPCREL): Likewise.
      	(R_X86_64_32): Likewise.
      	(R_X86_64_32S): Likewise.
      	(R_X86_64_16): Likewise.
      	(R_X86_64_PC16): Likewise.
      	(R_X86_64_8): Likewise.
      	(R_X86_64_PC8): Likewise.
      
      	* include/grub/i386/efi/pci.h: New file.
      
      	* include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
      	Change it value based on platform.
      	(GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
      	(GRUB_E820_RAM): Likewise.
      	(GRUB_E820_RESERVED): Likewise.
      	(GRUB_E820_ACPI): Likewise.
      	(GRUB_E820_NVS): Likewise.
      	(GRUB_E820_EXEC_CODE): Likewise.
      	(GRUB_E820_MAX_ENTRY): Likewise.
      	(grub_e820_mmap): New structure.
      	(linux_kernel_header): Change the efi field according to different
      	kernel version, also field from linux_kernel_header.
      
      	* include/grub/kernel.h (grub_module_info): Add padding for x86_64.
      
      	* include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
      	(GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
      	(GRUB_PCI_ADDR_SPACE_IO): Likewise.
      	(GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
      	(GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
      	(GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
      	(GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
      	(GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
      	(GRUB_PCI_ADDR_MEM_MASK): Likewise.
      	(GRUB_PCI_ADDR_IO_MASK): Likewise.
      
      	* include/grub/x86_64/efi/kernel.h: New file.
      
      	* include/grub/x86_64/efi/loader.h: Likewise.
      
      	* include/grub/x86_64/efi/machine.h: Likewise.
      
      	* include/grub/x86_64/efi/pci.h: Likewise.
      
      	* include/grub/x86_64/efi/time.h: Likewise.
      
      	* include/grub/x86_64/linux.h: Likewise.
      
      	* include/grub/x86_64/setjmp.h: Likewise.
      
      	* include/grub/x86_64/time.h: Likewise.
      
      	* include/grub/x86_64/types.h: Likewise.
      
      	* kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
      	 GRUB_TARGET_SIZEOF_VOID_P.
      
      	* kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
      	(grub_efi_locate_handle): Likewise.
      	(grub_efi_open_protocol): Likewise.
      	(grub_efi_set_text_mode): Likewise.
      	(grub_efi_stall): Likewise.
      	(grub_exit): Likewise.
      	(grub_reboot): Likewise.
      	(grub_halt): Likewise.
      	(grub_efi_exit_boot_services): Likewise.
      	(grub_get_rtc): Likewise.
      
      	* kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
      	(GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
      	(grub_efi_allocate_pages): Wrap efi calls.
      	(grub_efi_free_pages): Wrap efi calls.
      	(grub_efi_get_memory_map): Wrap efi calls.
      
      	* kern/x86_64/dl.c: New file.
      
      	* kern/x86_64/efi/callwrap.S: Likewise.
      
      	* kern/x86_64/efi/startup.S: Likewise.
      
      	* loader/efi/appleloader.c: Likewise.
      
      	* loader/efi/chainloader.c (cmdline): New variable.
      	(grub_chainloader_unload): Wrap efi calls.
      	(grub_chainloader_boot): Likewise.
      	(grub_rescue_cmd_chainloader): Wrap efi calls, handle
      	command line.
      
      	* loader/efi/chainloader_normal.c (chainloader_command):
      	Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
      	command line.
      
      	* loader/i386/efi/linux.c (allocate_pages): Change allocation
      	method.
      	(grub_e820_add_region): New function.
      	(grub_linux_boot): Construct e820 map from efi map, handle x86_64
      	booting.
      	(grub_find_video_card): New function.
      	(grub_linux_setup_video): New function.
      	(grub_rescue_cmd_linux): Probe for video information.
      
      	* normal/x86_64/setjmp.S: New file.
      
      	* term/efi/console.c (map_char): New function.
      	(grub_console_putchar): Map unicode char.
      	(grub_console_checkkey): Wrap efi calls.
      	(grub_console_getkey): Likewise.
      	(grub_console_getwh): Likewise.
      	(grub_console_gotoxy): Likewise.
      	(grub_console_cls): Likewise.
      	(grub_console_setcolorstate): Likewise.
      	(grub_console_setcursor): Likewise.
      
      	* util/i386/efi/grub-mkimage.c: Add support for x86_64.
      20011694