1. 17 Dec, 2015 1 commit
    • Robert Elliott's avatar
      lsefimmap: support persistent memory and other UEFI 2.5 features · c79c59f1
      Robert Elliott authored
      This should accompany
      	76ce1de7 Translate UEFI persistent memory type
      
      1. Add a string for the EfiPersistentMemory type 14 that was
      added in UEFI 2.5.
      
      2. Decode the memory attributes that were added in UEFI 2.5:
      * NV (non-volatile)
      * MORE_RELIABLE (higher reliable, e.g., mirrored memory in a system
        with partial memory mirroring)
      * RO (read-only)
      
      3. Use proper IEC binary units (KiB, MiB, etc.) for power-of-two
      values rather than misusing SI power-of-ten units (KB, MB, etc.)
      
      4. The lsmmap command only decodes memory ranges sizes up to GiB scale
      units.  Persistent memory ranges will reach into the TiB scale.
      Since 64-bit size field supports TiB, PiB, and EiB, decode all of
      them for completeness.
      
      5. In the lsefimmap command, rewrite the print statements to
      * avoid rounding
      * avoid a big nested if/else tree.
      
      For example: In the sixth entry below, the value of 309MB implies
      316416KB but is really reporting 316436KB.
      
      Widen the size column to 6 digits to accommodate typical cases.
      The worst case value would require 14 digits; if that happens,
      let the columns get out of sync.
      
      Old format:
      Type      Physical start  - end             #Pages     Size Attributes
      conv-mem  0000000000000000-0000000000092fff 00000093  588KB UC WC WT WB
      reserved  0000000000093000-0000000000093fff 00000001    4KB UC WC WT WB
      conv-mem  0000000000094000-000000000009ffff 0000000c   48KB UC WC WT WB
      conv-mem  0000000000100000-000000000fffffff 0000ff00  255MB UC WC WT WB
      BS-code   0000000010000000-0000000010048fff 00000049  292KB UC WC WT WB
      conv-mem  0000000010049000-000000002354dfff 00013505  309MB UC WC WT WB
      ldr-data  000000002354e000-000000003ecfffff 0001b7b2  439MB UC WC WT WB
      BS-data   000000003ed00000-000000003ed7ffff 00000080  512KB UC WC WT WB
      conv-mem  000000003ed80000-000000006af5ffff 0002c1e0  705MB UC WC WT WB
      reserved  000000006af60000-000000006b55ffff 00000600    6MB UC WC WT WB
      BS-data   000000006b560000-000000006b560fff 00000001    4KB UC WC WT WB
      RT-data   000000006b561000-000000006b5e1fff 00000081  516KB RT UC WC WT WB
      BS-data   000000006b5e2000-000000006ecfafff 00003719   55MB UC WC WT WB
      BS-code   000000006ecfb000-000000006ecfbfff 00000001    4KB UC WC WT WB
      conv-mem  000000006ecfc000-00000000711fafff 000024ff   36MB UC WC WT WB
      BS-data   00000000711fb000-000000007128dfff 00000093  588KB UC WC WT WB
      Unk 0d    0000000880000000-0000000e7fffffff 00600000   24GB UC WC WT WB NV
      reserved  0000001680000000-0000001c7fffffff 00600000   24GB UC WC WT WB NV
      
      New format:
      Type      Physical start  - end             #Pages        Size Attributes
      conv-mem  0000000000000000-0000000000092fff 00000093    588KiB UC WC WT WB
      reserved  0000000000093000-0000000000093fff 00000001      4KiB UC WC WT WB
      conv-mem  0000000000094000-000000000009ffff 0000000c     48KiB UC WC WT WB
      conv-mem  0000000000100000-000000000fffffff 0000ff00    255MiB UC WC WT WB
      BS-code   0000000010000000-0000000010048fff 00000049    292KiB UC WC WT WB
      conv-mem  0000000010049000-000000002354dfff 00013505 316436KiB UC WC WT WB
      ldr-data  000000002354e000-000000003ecfffff 0001b7b2 450248KiB UC WC WT WB
      BS-data   000000003ed00000-000000003ed7ffff 00000080    512KiB UC WC WT WB
      conv-mem  000000003ed80000-000000006af5ffff 0002c1e0 722816KiB UC WC WT WB
      reserved  000000006af60000-000000006b55ffff 00000600      6MiB UC WC WT WB
      BS-data   000000006b560000-000000006b560fff 00000001      4KiB UC WC WT WB
      RT-data   000000006b561000-000000006b5e1fff 00000081    516KiB RT UC WC WT WB
      BS-data   000000006b5e2000-000000006ecfafff 00003719  56420KiB UC WC WT WB
      BS-code   000000006ecfb000-000000006ecfbfff 00000001      4KiB UC WC WT WB
      conv-mem  000000006ecfc000-0000000071222fff 00002527  38044KiB UC WC WT WB
      BS-data   0000000071223000-00000000712ddfff 000000bb    748KiB UC WC WT WB
      persist   0000000880000000-0000000e7fffffff 00600000     24GiB UC WC WT WB NV
      reserved  0000001680000000-0000001c7fffffff 00600000     24GiB UC WC WT WB NV
      c79c59f1
  2. 15 Dec, 2015 1 commit
  3. 14 Nov, 2015 1 commit
  4. 25 Oct, 2015 1 commit
  5. 16 Jun, 2015 1 commit
    • Andrei Borzenkov's avatar
      efinet: enable hardware filters when opening interface · f348aee7
      Andrei Borzenkov authored
      Exclusive open on SNP will close all existing protocol instances which
      may disable all receive filters on interface. Reinstall them after we
      opened protocol exclusively.
      
      Also follow UEFI specification recommendation and stop interfaces when
      closing them:
      
      Unexpected system errors, reboots and hangs can occur if an OS is loaded
      and the network devices are not Shutdown() and Stopped().
      
      Also by: Mark Salter <msalter@redhat.com>
      Closes: 45204
      f348aee7
  6. 07 May, 2015 1 commit
  7. 24 Dec, 2013 3 commits
  8. 23 Dec, 2013 1 commit
  9. 18 Dec, 2013 2 commits
  10. 16 Dec, 2013 2 commits
  11. 15 Dec, 2013 3 commits
  12. 11 Dec, 2013 2 commits
  13. 17 Nov, 2013 1 commit
  14. 08 Nov, 2013 1 commit
  15. 28 Apr, 2013 1 commit
  16. 07 Apr, 2013 1 commit
  17. 12 Sep, 2012 1 commit
  18. 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
  19. 22 Jul, 2012 1 commit
  20. 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
  21. 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
  22. 26 May, 2012 1 commit
    • Matthew Garrett's avatar
      * grub-core/term/efi/console.c (grub_efi_console_init): Set text mode. · 4ce776d2
      Matthew Garrett authored
      	(grub_efi_console_fini): Likewise.
      	* grub-core/video/efi_gop.c (framebuffer): New field offscreen.
      	(grub_video_gop_fill_mode_info): Rename to ...
      	(grub_video_gop_fill_real_mode_info): ... this.
      	(grub_video_gop_fill_mode_info): New function.
      	(grub_video_gop_setup): Setup double framebuffer.
      	(grub_video_gop_get_info_and_fini): Use original framebuffer.
      	Free offscreen.
      	(grub_video_gop_swap_buffers): Copy framebuffer.
      	(grub_video_gop_fini): Free offscreen buffer.
      	* include/grub/efi/graphics_output.h (grub_efi_gop_blt_operation_t):
      	New enum.
      	(grub_efi_gop_blt_pixel): New struct.
      4ce776d2
  23. 11 Mar, 2012 1 commit
  24. 04 Mar, 2012 3 commits
  25. 27 Feb, 2012 3 commits
  26. 26 Feb, 2012 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      Implement serial on IEEE1275 and EFI. · a9c7fd1c
      Vladimir 'phcoder' Serbinenko authored
      	* docs/grub.texi (Platform-specific limitations): Fix the columen video
      	on emu. Mention arc and emu as the only platforms without serial
      	support.
      	* grub-core/Makefile.core.def (serial): Enable on all terminfomodule and
      	ieee1275 platforms.
      	* grub-core/term/efi/serial.c: New file.
      	* grub-core/term/ieee1275/serial.c: Likewise.
      	* grub-core/term/serial.c (grub_serial_find): Disable direct port
      	specification if no ns8250 driver is available.
      	(grub_cmd_serial): Likewise.
      	(GRUB_MOD_INIT) [GRUB_MACHINE_IEEE1275]: Init ofserial.
      	(GRUB_MOD_INIT) [GRUB_MACHINE_EFI]: Init efiserial.
      	* include/grub/efi/api.h (GRUB_EFI_SERIAL_IO_GUID): New define.
      	(grub_efi_parity_type_t): New type.
      	(grub_efi_stop_bits_t): Likewise.
      	(grub_efi_serial_io_interface): New struct.
      	* include/grub/serial.h (grub_serial_port): Make 'broken' field
      	available for all interfaces.
      	Add EFI and IEEE1275 fields.
      	(grub_ofserial_init): New proto.
      	(grub_efiserial_init): Likeiwse.
      	* util/grub.d/00_header.in: Don't check for the presence of serial
      	module.
      a9c7fd1c
  27. 14 Dec, 2011 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      * include/grub/efi/api.h (grub_efi_memory_descriptor): Add packed · e739d698
      Vladimir 'phcoder' Serbinenko authored
      	attribute as the structure isn't guaranteed to be properly aligned.
      	(grub_efi_pci_device_path): Likewise.
      	(grub_efi_pccard_device_path): Likewise.
      	(grub_efi_memory_mapped_device_path): Likewise. Additionaly explicitly
      	specify the size of `memory_type'.
      	(grub_efi_vendor_device_path): Likewise.
      	(grub_efi_controller_device_path): Likewise.
      	(grub_efi_acpi_device_path): Likewise.
      	(grub_efi_expanded_acpi_device_path): Likewise.
      	(grub_efi_atapi_device_path): Likewise.
      	(grub_efi_scsi_device_path): Likewise.
      	(grub_efi_fibre_channel_device_path): Likewise.
      	(grub_efi_1394_device_path): Likewise.
      	(grub_efi_usb_device_path): Likewise.
      	(grub_efi_usb_class_device_path): Likewise.
      	(grub_efi_i2o_device_path): Likewise.
      	(grub_efi_mac_address_device_path): Likewise.
      	(grub_efi_ipv4_device_path): Likewise.
      	(grub_efi_ipv6_device_path): Likewise.
      	(grub_efi_infiniband_device_path): Likewise.
      	(grub_efi_uart_device_path): Likewise.
      	(grub_efi_vendor_messaging_device_path): Likewise.
      	(grub_efi_hard_drive_device_path): Likewise.
      	(grub_efi_cdrom_device_path): Likewise.
      	(grub_efi_vendor_media_device_path): Likewise.
      	(grub_efi_file_path_device_path): Likewise.
      	(grub_efi_protocol_device_path): Likewise.
      	(grub_efi_piwg_device_path): Likewise.
      	(grub_efi_bios_device_path): Likewise.
      e739d698
  28. 13 Dec, 2011 1 commit
  29. 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