1. 27 Nov, 2015 1 commit
  2. 24 Jul, 2015 1 commit
  3. 23 Jul, 2015 1 commit
  4. 12 Jun, 2015 1 commit
    • Mark Salter's avatar
      Fix exit to EFI firmware · c945ca75
      Mark Salter authored
      The current code for EFI grub_exit() calls grub_efi_fini() before
      returning to firmware. In the case of ARM, this leaves a timer
      event running which could lead to a firmware crash. This patch
      changes this so that grub_machine_fini() is called with a NORETURN
      flag. This allows machine-specific shutdown to happen as well
      as the shutdown done by grub_efi_fini().
      Signed-off-by: 's avatarMark Salter <msalter@redhat.com>
      c945ca75
  5. 07 May, 2015 1 commit
  6. 21 Jan, 2015 1 commit
  7. 17 Nov, 2014 1 commit
    • Leif Lindholm's avatar
      efi: check *path non-null before grub_strrchr · 004a2b1e
      Leif Lindholm authored
      The EFI version of grub_machine_get_bootlocation crops the boot image
      name back to the last / in order to get a directory path. However, it
      does not check that *name is actually set before calling grub_strrchr
      to do this, and neither does grub_strrchr before dereferencing a NULL
      pointer.
      
      Parent function, grub_set_prefix_and_root, does check the pointer
      before using.
      004a2b1e
  8. 18 Jan, 2014 1 commit
  9. 24 Dec, 2013 3 commits
  10. 15 Dec, 2013 2 commits
  11. 11 Dec, 2013 1 commit
  12. 10 Dec, 2013 1 commit
  13. 04 Dec, 2013 1 commit
  14. 22 Nov, 2013 1 commit
  15. 14 Nov, 2013 1 commit
  16. 01 Nov, 2013 1 commit
  17. 27 Oct, 2013 1 commit
  18. 26 Mar, 2013 1 commit
  19. 13 Jan, 2013 1 commit
    • Colin Watson's avatar
      Remove nested functions from PCI iterators. · ca3a7446
      Colin Watson authored
      * grub-core/bus/pci.c (grub_pci_iterate): Add hook_data argument,
      passed to hook.  Update all callers to pass appropriate hook data.
      * grub-core/bus/emu/pci.c (grub_pci_iterate): Likewise.
      * include/grub/pci.h (grub_pci_iteratefunc_t): Add data argument.
      Remove NESTED_FUNC_ATTR from here and from all users.
      (grub_pci_iterate): Update prototype.
      * grub-core/bus/cs5536.c (grub_cs5536_find: hook): Make static
      instead of nested.  Rename to ...
      (grub_cs5536_find_iter): ... this.
      * grub-core/kern/efi/mm.c (stop_broadcom: find_card): Likewise.
      * grub-core/kern/mips/loongson/init.c (init_pci: set_card):
      Likewise.
      * grub-core/kern/vga_init.c (grub_qemu_init_cirrus: find_card):
      Likewise.
      * grub-core/video/bochs.c (grub_video_bochs_setup: find_card):
      Likewise.
      * grub-core/video/cirrus.c (grub_video_cirrus_setup: find_card):
      Likewise.
      * grub-core/video/efi_uga.c (find_framebuf: find_card): Likewise.
      * grub-core/video/radeon_fuloong2e.c
      (grub_video_radeon_fuloong2e_setup: find_card): Likewise.
      * grub-core/video/sis315pro.c (grub_video_sis315pro_setup:
      find_card): Likewise.
      * grub-core/video/sm712.c (grub_video_sm712_setup: find_card):
      Likewise.
      ca3a7446
  20. 08 Sep, 2012 1 commit
    • Peter Jones's avatar
      * grub-core/Makefile.core.def (efifwsetup): New module. · c5052c81
      Peter Jones authored
      	* grub-core/commands/efi/efifwsetup.c: New file.
      	* grub-core/kern/efi/efi.c (grub_efi_set_variable): New function
      	* include/grub/efi/api.h (GRUB_EFI_OS_INDICATIONS_BOOT_TO_FW_UI):
      	New define.
      	* include/grub/efi/efi.h (grub_efi_set_variable): New proto.
      c5052c81
  21. 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
  22. 09 Jun, 2012 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      Use ITC on IA64 rather than broken routine based on daytime. · 9e5e66d1
      Vladimir 'phcoder' Serbinenko authored
      	* grub-core/kern/efi/efi.c (grub_rtc_get_time_ms) [__ia64__]: Remove on
      	ia64.
      	(grub_get_rtc) [__ia64__]: Likewise.
      	* grub-core/kern/ia64/efi/init.c (divisor): New variable.
      	(get_itc): New function.
      	(grub_rtc_get_time_ms): Likewise.
      	(grub_machine_init): Calibrate ITC.
      	* include/grub/efi/time.h (grub_get_rtc), (GRUB_TICKS_PER_SECOND):
      	Keep only on non-ia64. Don't export since it's broken and used only
      	if TSC is unavailable.
      9e5e66d1
  23. 03 May, 2012 1 commit
    • Matthew Garrett's avatar
      Suspend broadcom cards in order to stop their DMA. · 9d34bb85
      Matthew Garrett authored
      	* grub-core/Makefile.am (KERNEL_HEADER_FILES): Add pci.h on x86 EFI.
      	* grub-core/Makefile.core.def (kernel): Add pci.c on x86 EFI.
      	(pci): Don't build on x86 EFI.
      	* grub-core/bus/pci.c (grub_pci_find_capability): New function.
      	* grub-core/kern/efi/mm.c (stop_broadcom) [__i386__ || __x86_64__]:
      	New function.
      	(grub_efi_finish_boot_services) [__i386__ || __x86_64__]: Call
      	stop_broadcom if running on EFI.
      	* include/grub/pci.h (GRUB_PCI_CLASS_NETWORK): New enum value.
      	(GRUB_PCI_CAP_POWER_MANAGEMENT): Likewise.
      	(GRUB_PCI_VENDOR_BROADCOM): Likewise.
      	(grub_pci_find_capability): New proto.
      Also-By: 's avatarVladimir Serbinenko <phcoder@gmail.com>
      9d34bb85
  24. 04 Mar, 2012 1 commit
    • Matthew Garrett's avatar
      Use EDID on EFI. · 3935dde2
      Matthew Garrett authored
      	* grub-core/kern/efi/efi.c (grub_efi_get_variable): New argument
      	datasize_out.
      	* grub-core/video/efi_gop.c (check_protocol): Check that GOP has usable
      	modes. Set gop_handle.
      	(grub_video_gop_get_edid): New function.
      	(grub_gop_get_preferred_mode): Likewise.
      	(grub_video_gop_setup): Use grub_gop_get_preferred_mode.
      	(grub_video_efi_gop_adapter): Set .get_edid.
      	* include/grub/efi/edid.h: New file.
      	* include/grub/efi/efi.h (grub_efi_get_variable): Update proto.
      Also-By: 's avatarVladimir Serbinenko <phcoder@gmail.com>
      3935dde2
  25. 27 Feb, 2012 1 commit
    • Matthew Garrett's avatar
      * grub-core/kern/efi/efi.c (grub_efi_get_variable): Add new function. · c5988629
      Matthew Garrett authored
      	* include/grub/efi/efi.h: Likewise.
      	* include/grub/efi/api.h: Add guid for EFI-specified variables.
      	* include/grub/charset.h (GRUB_MAX_UTF16_PER_UTF8): New definition.
      	* grub-core/normal/charset.c (grub_utf8_process): Move from here ...
      	* include/grub/charset.h (grub_utf8_process): ... to here. Inline.
      	* grub-core/normal/charset.c (grub_utf8_to_utf16): Move from here ...
      	* include/grub/charset.h (grub_utf8_to_utf16): ... to here. Inline.
      c5988629
  26. 10 Feb, 2012 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      Increase warning level. · ebcecdf1
      Vladimir 'phcoder' Serbinenko authored
      	* 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.
      ebcecdf1
  27. 19 Oct, 2011 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      Move grub_reboot out of the kernel. · 544c2487
      Vladimir 'phcoder' Serbinenko authored
      	* grub-core/Makefile.core.def (reboot): Add platform-specific files.
      	* grub-core/kern/efi/efi.c (grub_reboot): Moved to ...
      	* grub-core/lib/efi/reboot.c: ... here.
      	* grub-core/kern/i386/efi/startup.S: Remove including of realmode.S.
      	* grub-core/kern/i386/ieee1275/startup.S: Likewise.
      	* grub-core/kern/i386/pc/startup.S (grub_exit): Inline cold_reboot.
      	* grub-core/kern/i386/realmode.S (grub_reboot): Moved to...
      	* grub-core/lib/i386/reboot_trampoline.S: ... here.
      	* grub-core/kern/ieee1275/openfw.c (grub_reboot): Moved to...
      	* grub-core/lib/ieee1275/reboot.c: ... here.
      	* grub-core/kern/mips/arc/init.c (grub_reboot): Moved to...
      	* grub-core/lib/mips/arc/reboot.c: ... here.
      	* grub-core/kern/mips/loongson/init.c (grub_reboot): Moved to...
      	* grub-core/lib/mips/loongson/reboot.c: ...here.
      	* grub-core/kern/mips/qemu_mips/init.c (grub_reboot): Moved to...
      	* grub-core/lib/mips/qemu_mips/reboot.c: ... here.
      	* include/grub/emu/misc.h (grub_reboot): New function declaration.
      	* include/grub/i386/reboot.h: New file.
      	* include/grub/mips/loongson/ec.h: Fix includes.
      	* include/grub/mips/qemu_mips/kernel.h (grub_reboot): Removed.
      	* include/grub/misc.h (grub_reboot): Don't mark as kernel function.
      	* grub-core/lib/i386/reboot.c: New file.
      544c2487
  28. 16 Oct, 2011 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      Replace grub_module_iterate with FOR_MODULES. · 39705fad
      Vladimir 'phcoder' Serbinenko authored
      	* grub-core/disk/memdisk.c (GRUB_MOD_INIT): Switched to new interface.
      	* grub-core/kern/efi/efi.c (grub_arch_modules_addr): Renamed to...
      	(grub_efi_modules_addr): ...this.
      	* grub-core/kern/efi/init.c (grub_modbase): New variable.
      	(grub_efi_init): Set grub_modbase.
      	* grub-core/kern/emu/main.c (grub_arch_modules_addr): Removed.
      	(grub_modbase): New variable.
      	* grub-core/kern/i386/coreboot/init.c (grub_arch_modules_addr): Removed.
      	(grub_modbase): New variable.
      	(grub_machine_init): Set grub_modbase.
      	* grub-core/kern/i386/pc/init.c (grub_arch_modules_addr): Removed.
      	(grub_modbase): New variable.
      	(grub_machine_init): Set grub_modbase.
      	* grub-core/kern/ieee1275/init.c (grub_arch_modules_addr): Removed.
      	(grub_modbase): New variable.
      	(grub_machine_init): Set grub_modbase.
      	* grub-core/kern/main.c (grub_module_iterate): Remove.
      	(grub_modules_get_end): Use grub_modbase.
      	(grub_load_modules): Use FOR_MODULES.
      	(grub_load_config): Likewise.
      	* grub-core/kern/mips/arc/init.c (grub_arch_modules_addr): Removed.
      	(grub_modbase): New variable.
      	(grub_machine_init): Set grub_modbase.
      	* grub-core/kern/mips/loongson/init.c (grub_arch_modules_addr): Removed.
      	(grub_modbase): New variable.
      	(grub_machine_init): Set grub_modbase.
      	* grub-core/kern/mips/qemu_mips/init.c (grub_arch_modules_addr):
      	Removed.
      	(grub_modbase): New variable.
      	(grub_machine_init): Set grub_modbase.
      	* include/grub/efi/efi.h (grub_efi_modules_addr): New declaration.
      	* include/grub/kernel.h (grub_arch_modules_addr): Removed.
      	(grub_module_iterate): Likewise.
      	(grub_modbase): New variable declaration.
      	(FOR_MODULES): New macro.
      39705fad
  29. 02 Jul, 2011 2 commits
  30. 08 May, 2011 1 commit
  31. 11 Jan, 2011 1 commit
  32. 16 Oct, 2010 2 commits
  33. 08 Sep, 2010 1 commit
  34. 06 May, 2010 1 commit