Skip to contentSkip to conversation

How can I submit patch for bug #42944 ?

DISCUSSION Rigoberto Corujo 5 participants 11 messages Oct 10, 2014 – Oct 21, 2014 Kbuild

lore
Share & tools
lore
#1 lore raw
Quoted 2 lines · Rigoberto Corujo

I attached a patch to bug #42944 and would like to know how I would go about getting it committed to the source tree?
https://savannah.gnu.org/bugs/?42944

I'd suggest attaching the patch to a mail here (not encased in a zip file). It's usually easier to get public review that way.

Signature · 1 line
Colin Watson                                       [[email protected]]
#2 lore raw

@Colin I dunno if it's worth it for GRUB but did u ever think about a gerrit instance?
It simplifies review a lot.

Quoted 16 lines · Colin Watson
Quoted 1 line · Rigoberto Corujo

I attached a patch to bug #42944 and would like to know how I would go

about getting it committed to the source tree?

Quoted 1 line

https://savannah.gnu.org/bugs/?42944

I'd suggest attaching the patch to a mail here (not encased in a zip file). It's usually easier to get public review that way.

--
Colin Watson [[email protected]]

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#3 lore raw
Quoted 4 lines · Michael Zimmermann

@Colin I dunno if it's worth it for GRUB but did u ever think about a gerrit instance?
It simplifies review a lot.

It doesn't. It only simplifies approval. I'd be opposed to gerrit unless there is a way to forbid non-admins to edit other people patches.

Quoted 27 lines

On Fri, Oct 10, 2014 at 11:23 PM, Colin Watson <[email protected] <mailto:[email protected]>> wrote:

On Fri, Oct 10, 2014 at 04:44:39PM +0000, Rigoberto Corujo wrote:
> I attached a patch to bug #42944 and would like to know how I would go about getting it committed to the source tree? > https://savannah.gnu.org/bugs/?42944

I'd suggest attaching the patch to a mail here (not encased in a zip file). It's usually easier to get public review that way.

--
Colin Watson
[[email protected] <mailto:[email protected]>]

_______________________________________________
Grub-devel mailing list [email protected] <mailto:[email protected]>
https://lists.gnu.org/mailman/listinfo/grub-devel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#4 lore raw
In reply to Colin Watson
Quoted 7 lines · Colin Watson
Quoted 2 lines · Rigoberto Corujo

I attached a patch to bug #42944 and would like to know how I would go about getting it committed to the source tree?
https://savannah.gnu.org/bugs/?42944

I'd suggest attaching the patch to a mail here (not encased in a zip file). It's usually easier to get public review that way.

I don't like to use EFI timers if we can avoid them, they've been known to hang. Attached is a patch to use pmtimer for calibration

=== modified file 'grub-core/Makefile.am'

Makefile.am +13 -7
@@ -88,29 +88,33 @@
 KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
 KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/pxe.h
 KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/int.h
-KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/acpi.h
 endif
 
 if COND_i386_efi
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
-KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/pci.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/acpi.h
 endif
 
 if COND_i386_coreboot
-KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
 KERNEL_HEADER_FILES += $(top_builddir)/include/grub/i386/pc/int.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/acpi.h
 endif
 
 if COND_i386_multiboot
-KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
 KERNEL_HEADER_FILES += $(top_builddir)/include/grub/i386/pc/int.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/acpi.h
 endif
 
 if COND_i386_qemu
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/pci.h
-KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
 endif
 
 if COND_i386_ieee1275
@@ -118,19 +122,21 @@
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
-KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
 endif
 
 if COND_x86_64_efi
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
-KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/pci.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/acpi.h
 endif
 
 if COND_ia64_efi
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/acpi.h
 endif
 
 if COND_mips

=== modified file 'grub-core/Makefile.core.def'

Makefile.core.def +10 -10
@@ -127,18 +127,26 @@
   i386_pc = term/i386/vga_common.c;
 
   x86 = kern/i386/pit.c;
+  x86 = kern/i386/tsc.c;
+
+  efi = kern/acpi.c;
+  i386_coreboot = kern/acpi.c;
+  i386_multiboot = kern/acpi.c;
+  i386_pc = kern/acpi.c;
+  i386_pc = kern/i386/pc/acpi.c;
+  i386_coreboot = kern/i386/pc/acpi.c;
+  i386_multiboot = kern/i386/pc/acpi.c;
 
   efi = disk/efi/efidisk.c;
   efi = kern/efi/efi.c;
   efi = kern/efi/init.c;
   efi = kern/efi/mm.c;
   efi = term/efi/console.c;
+  efi = kern/efi/acpi.c;
 
-  i386_efi = kern/i386/tsc.c;
   i386_efi = kern/i386/efi/init.c;
   i386_efi = bus/pci.c;
 
-  x86_64_efi = kern/i386/tsc.c;
   x86_64_efi = kern/x86_64/dl.c;
   x86_64_efi = kern/x86_64/efi/callwrap.S;
   x86_64_efi = kern/i386/efi/init.c;
@@ -151,19 +159,15 @@
 
   i386_pc = kern/i386/pc/init.c;
   i386_pc = kern/i386/pc/mmap.c;
-  i386_pc = kern/i386/tsc.c;
   i386_pc = term/i386/pc/console.c;
 
   i386_qemu = bus/pci.c;
   i386_qemu = kern/vga_init.c;
   i386_qemu = kern/i386/qemu/mmap.c;
-  i386_qemu = kern/i386/tsc.c;
 
   i386_coreboot = kern/i386/coreboot/mmap.c;
-  i386_coreboot = kern/i386/tsc.c;
 
   i386_multiboot = kern/i386/multiboot_mmap.c;
-  i386_multiboot = kern/i386/tsc.c;
 
   mips = kern/mips/cache.S;
   mips = kern/mips/dl.c;
@@ -526,10 +530,6 @@
   name = acpi;
 
   common = commands/acpi.c;
-  efi = commands/efi/acpi.c;
-  i386_pc = commands/i386/pc/acpi.c;
-  i386_coreboot = commands/i386/pc/acpi.c;
-  i386_multiboot = commands/i386/pc/acpi.c;
 
   enable = efi;
   enable = i386_pc;

=== modified file 'grub-core/commands/acpi.c'

commands/acpi.c +0 -12
@@ -61,18 +61,6 @@
   {0, 0, 0, 0, 0, 0}
 };
 
-/* Simple checksum by summing all bytes. Used by ACPI and SMBIOS. */
-grub_uint8_t
-grub_byte_checksum (void *base, grub_size_t size)
-{
-  grub_uint8_t *ptr;
-  grub_uint8_t ret = 0;
-  for (ptr = (grub_uint8_t *) base; ptr < ((grub_uint8_t *) base) + size;
-       ptr++)
-    ret += *ptr;
-  return ret;
-}
-
 /* rev1 is 1 if ACPIv1 is to be generated, 0 otherwise.
    rev2 contains the revision of ACPIv2+ to generate or 0 if none. */
 static int rev1, rev2;

=== modified file 'grub-core/commands/acpihalt.c'

commands/acpihalt.c +29 -50

85 lines not on this page · raw message

=== added file 'grub-core/kern/acpi.c'

kern/acpi.c +119 -0

119 lines not on this page · raw message

=== renamed file 'grub-core/commands/efi/acpi.c' => 'grub-core/kern/efi/acpi.c' === renamed file 'grub-core/commands/i386/pc/acpi.c' => 'grub-core/kern/i386/pc/acpi.c' === modified file 'grub-core/kern/i386/tsc.c'

kern/i386/tsc.c +52 -12

92 lines not on this page · raw message

=== modified file 'grub-core/kern/ieee1275/init.c'

kern/ieee1275/init.c +8 -5
@@ -32,12 +32,17 @@
 #include <grub/ieee1275/ofdisk.h>
 #include <grub/ieee1275/ieee1275.h>
 #include <grub/net.h>
+#include <grub/loader.h>
 #include <grub/offsets.h>
 #include <grub/memory.h>
 #ifdef __sparc__
 #include <grub/machine/kernel.h>
 #endif
 
+#ifdef __i386__
+#include <grub/i386/tsc.h>
+#endif
+
 /* The minimal heap size we can live with. */
 #define HEAP_MIN_SIZE		(unsigned long) (2 * 1024 * 1024)
 
@@ -254,8 +259,6 @@
     }
 }
 
-static grub_uint64_t ieee1275_get_time_ms (void);
-
 grub_addr_t grub_modbase;
 
 void
@@ -273,7 +276,7 @@
 
   grub_parse_cmdline ();
 
-  grub_install_get_time_ms (ieee1275_get_time_ms);
+  grub_install_get_time_ms (grub_rtc_get_time_ms);
 }
 
 void
@@ -283,8 +286,8 @@
   grub_console_fini ();
 }
 
-static grub_uint64_t
-ieee1275_get_time_ms (void)
+grub_uint64_t
+grub_rtc_get_time_ms (void)
 {
   grub_uint32_t msecs = 0;
 

=== modified file 'grub-core/loader/i386/xnu.c'

loader/i386/xnu.c +3 -15
@@ -24,9 +24,8 @@
 #include <grub/mm.h>
 #include <grub/loader.h>
 #include <grub/autoefi.h>
+#include <grub/efi/api.h>
 #include <grub/i386/tsc.h>
-#include <grub/efi/api.h>
-#include <grub/i386/pit.h>
 #include <grub/misc.h>
 #include <grub/charset.h>
 #include <grub/term.h>
@@ -125,11 +124,8 @@
 {
   const grub_uint64_t sane_value = 100000000;
   grub_uint32_t manufacturer[3], max_cpuid, capabilities, msrlow;
-  grub_uint64_t start_tsc;
-  grub_uint64_t end_tsc;
-  grub_uint64_t tsc_ticks_per_ms;
 
-  if (! grub_cpu_is_cpuid_supported ())
+  if (!grub_tsc_ticks_per_ms)
     return sane_value;
 
 #ifdef __APPLE__
@@ -192,14 +188,6 @@
   if (! (capabilities & (1 << 7)))
     return sane_value;
 
-  /* Calibrate the TSC rate. */
-
-  start_tsc = grub_get_tsc ();
-  grub_pit_wait (0xffff);
-  end_tsc = grub_get_tsc ();
-
-  tsc_ticks_per_ms = grub_divmod64 (end_tsc - start_tsc, 55, 0);
-
   /* Read the multiplier. */
   asm volatile ("movl $0x198, %%ecx\n"
 		"rdmsr"
@@ -207,7 +195,7 @@
 		:
 		: "%ecx", "%eax");
 
-  return grub_divmod64 (2000 * tsc_ticks_per_ms,
+  return grub_divmod64 (2000 * grub_tsc_ticks_per_ms,
 			((msrlow >> 7) & 0x3e) + ((msrlow >> 14) & 1), 0);
 }
 

=== modified file 'include/grub/acpi.h'

grub/acpi.h +26 -5
@@ -60,16 +60,34 @@
 struct grub_acpi_fadt
 {
   struct grub_acpi_table_header hdr;
+  /* 36 */
   grub_uint32_t facs_addr;
   grub_uint32_t dsdt_addr;
+  /* 44 */
   grub_uint8_t somefields1[20];
+  /* 64 */
   grub_uint32_t pm1a;
-  grub_uint8_t somefields2[64];
+  /* 68 */
+  grub_uint8_t somefields2[8];
+  /* 76 */
+  grub_uint32_t pmtimer;
+  /* 80 */
+  grub_uint8_t somefields3[32];
+  /* 112 */
+  grub_uint32_t flags;
+  /* 116 */
+  grub_uint8_t somefields4[16];
+  /* 132 */
   grub_uint64_t facs_xaddr;
   grub_uint64_t dsdt_xaddr;
-  grub_uint8_t somefields3[96];
+  grub_uint8_t somefields5[96];
 } __attribute__ ((packed));
 
+enum
+  {
+    GRUB_ACPI_FADT_FLAGS_LONG_PMTIMER = (1 << 8)
+  };
+
 #define GRUB_ACPI_MADT_SIGNATURE "APIC"
 
 struct grub_acpi_madt_entry_header
@@ -144,9 +162,9 @@
 #ifndef GRUB_DSDT_TEST
 struct grub_acpi_rsdp_v10 *grub_acpi_get_rsdpv1 (void);
 struct grub_acpi_rsdp_v20 *grub_acpi_get_rsdpv2 (void);
-struct grub_acpi_rsdp_v10 *grub_machine_acpi_get_rsdpv1 (void);
-struct grub_acpi_rsdp_v20 *grub_machine_acpi_get_rsdpv2 (void);
-grub_uint8_t grub_byte_checksum (void *base, grub_size_t size);
+struct grub_acpi_rsdp_v10 *EXPORT_FUNC(grub_machine_acpi_get_rsdpv1) (void);
+struct grub_acpi_rsdp_v20 *EXPORT_FUNC(grub_machine_acpi_get_rsdpv2) (void);
+grub_uint8_t EXPORT_FUNC(grub_byte_checksum) (void *base, grub_size_t size);
 
 grub_err_t grub_acpi_create_ebda (void);
 
@@ -179,4 +197,7 @@
     GRUB_ACPI_EXTOPCODE_INDEX_FIELD_OP = 0x86,
   };
 
+struct grub_acpi_fadt *
+EXPORT_FUNC(grub_acpi_find_fadt) (void);
+
 #endif /* ! GRUB_ACPI_HEADER */

=== modified file 'include/grub/i386/pit.h'

grub/i386/pit.h +1 -1
@@ -22,6 +22,6 @@
 #include <grub/types.h>
 #include <grub/err.h>
 
-void EXPORT_FUNC(grub_pit_wait) (grub_uint16_t tics);
+void grub_pit_wait (grub_uint16_t tics);
 
 #endif /* ! KERNEL_CPU_PIT_HEADER */

=== modified file 'include/grub/i386/tsc.h'

grub/i386/tsc.h +2 -1
@@ -136,6 +136,7 @@
 }
 
 void grub_tsc_init (void);
-grub_uint64_t grub_tsc_get_time_ms (void);
+
+extern grub_uint64_t EXPORT_VAR(grub_tsc_ticks_per_ms);
 
 #endif /* ! KERNEL_CPU_TSC_HEADER */

=== modified file 'po/POTFILES.in'

POTFILES.in +10 -8
@@ -29,7 +29,6 @@
 ./grub-core/commands/configfile.c
 ./grub-core/commands/date.c
 ./grub-core/commands/echo.c
-./grub-core/commands/efi/acpi.c
 ./grub-core/commands/efi/fixvideo.c
 ./grub-core/commands/efi/loadbios.c
 ./grub-core/commands/efi/lsefimmap.c
@@ -44,7 +43,6 @@
 ./grub-core/commands/hexdump.c
 ./grub-core/commands/i386/cmostest.c
 ./grub-core/commands/i386/cpuid.c
-./grub-core/commands/i386/pc/acpi.c
 ./grub-core/commands/i386/pc/drivemap.c
 ./grub-core/commands/i386/pc/halt.c
 ./grub-core/commands/i386/pc/lsapm.c
@@ -106,6 +104,7 @@
 ./grub-core/disk/luks.c
 ./grub-core/disk/lvm.c
 ./grub-core/disk/mdraid1x_linux.c
+./grub-core/disk/mdraid_linux_be.c
 ./grub-core/disk/mdraid_linux.c
 ./grub-core/disk/memdisk.c
 ./grub-core/disk/pata.c
@@ -147,8 +146,11 @@
 ./grub-core/fs/hfsplus.c
 ./grub-core/fs/iso9660.c
 ./grub-core/fs/jfs.c
+./grub-core/fs/minix2_be.c
 ./grub-core/fs/minix2.c
+./grub-core/fs/minix3_be.c
 ./grub-core/fs/minix3.c
+./grub-core/fs/minix_be.c
 ./grub-core/fs/minix.c
 ./grub-core/fs/newc.c
 ./grub-core/fs/nilfs2.c
@@ -290,11 +292,13 @@
 ./grub-core/io/gzio.c
 ./grub-core/io/lzopio.c
 ./grub-core/io/xzio.c
+./grub-core/kern/acpi.c
 ./grub-core/kern/command.c
 ./grub-core/kern/corecmd.c
 ./grub-core/kern/device.c
 ./grub-core/kern/disk.c
 ./grub-core/kern/dl.c
+./grub-core/kern/efi/acpi.c
 ./grub-core/kern/efi/efi.c
 ./grub-core/kern/efi/init.c
 ./grub-core/kern/efi/mm.c
@@ -320,6 +324,7 @@
 ./grub-core/kern/i386/dl.c
 ./grub-core/kern/i386/efi/init.c
 ./grub-core/kern/i386/multiboot_mmap.c
+./grub-core/kern/i386/pc/acpi.c
 ./grub-core/kern/i386/pc/init.c
 ./grub-core/kern/i386/pc/mmap.c
 ./grub-core/kern/i386/pit.c
@@ -557,6 +562,7 @@
 ./grub-core/term/i386/pc/vga_text.c
 ./grub-core/term/i386/vga_common.c
 ./grub-core/term/ieee1275/console.c
+./grub-core/term/ieee1275/escc.c
 ./grub-core/term/ieee1275/serial.c
 ./grub-core/term/ns8250.c
 ./grub-core/term/serial.c
@@ -567,6 +573,7 @@
 ./grub-core/tests/lib/functional_test.c
 ./grub-core/tests/lib/test.c
 ./grub-core/tests/test_blockarg.c
+./grub-core/unidata.c
 ./grub-core/video/bitmap.c
 ./grub-core/video/bitmap_scale.c
 ./grub-core/video/bochs.c
@@ -631,7 +638,6 @@
 ./include/grub/efi/memory.h
 ./include/grub/efi/pci.h
 ./include/grub/efi/pe32.h
-./include/grub/efi/time.h
 ./include/grub/efi/uga_draw.h
 ./include/grub/elf.h
 ./include/grub/elfload.h
@@ -676,7 +682,6 @@
 ./include/grub/i386/efiemu.h
 ./include/grub/i386/efi/memory.h
 ./include/grub/i386/efi/serial.h
-./include/grub/i386/efi/time.h
 ./include/grub/i386/floppy.h
 ./include/grub/i386/freebsd_linker.h
 ./include/grub/i386/freebsd_reboot.h
@@ -684,7 +689,6 @@
 ./include/grub/i386/ieee1275/ieee1275.h
 ./include/grub/i386/ieee1275/memory.h
 ./include/grub/i386/ieee1275/serial.h
-./include/grub/i386/ieee1275/time.h
 ./include/grub/i386/io.h
 ./include/grub/i386/linux.h
 ./include/grub/i386/macho.h
@@ -820,7 +824,6 @@
 ./include/grub/pci.h
 ./include/grub/pciutils.h
 ./include/grub/powerpc/ieee1275/ieee1275.h
-./include/grub/powerpc/ieee1275/time.h
 ./include/grub/powerpc/kernel.h
 ./include/grub/powerpc/memory.h
 ./include/grub/powerpc/relocator.h
@@ -843,7 +846,6 @@
 ./include/grub/sparc64/ieee1275/boot.h
 ./include/grub/sparc64/ieee1275/ieee1275.h
 ./include/grub/sparc64/ieee1275/kernel.h
-./include/grub/sparc64/ieee1275/time.h
 ./include/grub/sparc64/setjmp.h
 ./include/grub/sparc64/time.h
 ./include/grub/sparc64/types.h
@@ -874,7 +876,6 @@
 ./include/grub/x86_64/efi/loader.h
 ./include/grub/x86_64/efi/memory.h
 ./include/grub/x86_64/efi/serial.h
-./include/grub/x86_64/efi/time.h
 ./include/grub/x86_64/io.h
 ./include/grub/x86_64/linux.h
 ./include/grub/x86_64/macho.h
@@ -906,6 +907,7 @@
 ./include/grub/zfs/zio.h
 ./include/multiboot2.h
 ./include/multiboot.h
+./tests/cmp_unit_test.c
 ./tests/example_unit_test.c
 ./tests/lib/unit_test.c
 ./tests/printf_unit_test.c
#5 lore raw

В Sat, 11 Oct 2014 10:44:20 +0200
Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> пишет:

Quoted 10 lines · Colin Watson
Quoted 7 lines · Rigoberto Corujo
Quoted 2 lines

I attached a patch to bug #42944 and would like to know how I would go about getting it committed to the source tree?
https://savannah.gnu.org/bugs/?42944

I'd suggest attaching the patch to a mail here (not encased in a zip file). It's usually easier to get public review that way.

I don't like to use EFI timers if we can avoid them, they've been known to hang. Attached is a patch to use pmtimer for calibration

What about systems without ACPI? Does it explicitly exclude them?

#6 lore raw

В Sat, 11 Oct 2014 12:58:29 +0400
Andrei Borzenkov <[email protected]> пишет:

Quoted 8 lines

В Sat, 11 Oct 2014 10:44:20 +0200
Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> пишет:

Quoted 5 lines · Colin Watson
Quoted 4 lines · Rigoberto Corujo
Quoted 2 lines

I attached a patch to bug #42944 and would like to know how I would go about getting it committed to the source tree?
https://savannah.gnu.org/bugs/?42944

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

I'd suggest attaching the patch to a mail here (not encased in a zip file). It's usually easier to get public review that way.

I don't like to use EFI timers if we can avoid them, they've been known to hang. Attached is a patch to use pmtimer for calibration

What about systems without ACPI? Does it explicitly exclude them?

OK, I stay corrected. Still, this patch adds over 1K to kernel on i386-pc and about 0.5K to common core.img with ext2:

-rw-r--r-- 1 bor bor 26848 Oct 12 20:09 /tmp/core.img-pmtimer -rw-r--r-- 1 bor bor 26320 Oct 12 18:50 /tmp/core.img-vanilla -rwxr-xr-x 1 bor bor 29224 Oct 12 20:08 /tmp/kernel.img-pmtimer -rwxr-xr-x 1 bor bor 28060 Oct 12 10:12 /tmp/kernel.img-vanilla

I think it's too much for something that so far is needed only on very specific platform. May be we could restrict it to EFI only where size does not matter that much?

Attached rebased patch (I briefly checked and it still boots on i386-pc and apparently correctly handles timeouts, but I cannot check other platforms).

From: Andrei Borzenkov <[email protected]>
Subject: [PATCH] e/pmtimer

<patch description>

---
 grub-core/Makefile.am             |   6 ++
 grub-core/Makefile.core.def       |  13 +++--
 grub-core/commands/acpi.c         |  12 ----
 grub-core/commands/acpihalt.c     |  66 ++++++---------------
 grub-core/commands/efi/acpi.c     |  59 -------------------
 grub-core/commands/i386/pc/acpi.c |  81 --------------------------
 grub-core/kern/acpi.c             | 119 ++++++++++++++++++++++++++++++++++++++
 grub-core/kern/efi/acpi.c         |  59 +++++++++++++++++++
 grub-core/kern/i386/pc/acpi.c     |  81 ++++++++++++++++++++++++++
 grub-core/kern/i386/tsc.c         |  43 +++++++++++++-
 include/grub/acpi.h               |  31 ++++++++--
 11 files changed, 361 insertions(+), 209 deletions(-)
grub-core/Makefile.am +6 -0
index 5c087c8..da18dc5 100644
@@ -93,6 +93,7 @@ KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
 KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/pxe.h
 KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/int.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/acpi.h
 endif
 
 if COND_i386_efi
@@ -100,6 +101,7 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/pci.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/acpi.h
 endif
 
 if COND_i386_coreboot
@@ -110,10 +112,12 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/video_fb.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/gfxterm.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/font.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/bufio.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/acpi.h
 endif
 
 if COND_i386_multiboot
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/acpi.h
 endif
 
 if COND_i386_qemu
@@ -152,11 +156,13 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/pci.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/acpi.h
 endif
 
 if COND_ia64_efi
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/acpi.h
 endif
 
 if COND_mips
grub-core/Makefile.core.def +9 -4
index 42443bc..27ee48a 100644
@@ -173,9 +173,18 @@ kernel = {
   efi = kern/efi/init.c;
   efi = kern/efi/mm.c;
   efi = term/efi/console.c;
+  efi = kern/efi/acpi.c;
 
   x86 = kern/i386/tsc.c;
 
+  efi = kern/acpi.c;
+  i386_coreboot = kern/acpi.c;
+  i386_multiboot = kern/acpi.c;
+  i386_pc = kern/acpi.c;
+  i386_pc = kern/i386/pc/acpi.c;
+  i386_coreboot = kern/i386/pc/acpi.c;
+  i386_multiboot = kern/i386/pc/acpi.c;
+
   i386_efi = kern/i386/efi/init.c;
   i386_efi = bus/pci.c;
 
@@ -683,10 +692,6 @@ module = {
   name = acpi;
 
   common = commands/acpi.c;
-  efi = commands/efi/acpi.c;
-  i386_pc = commands/i386/pc/acpi.c;
-  i386_coreboot = commands/i386/pc/acpi.c;
-  i386_multiboot = commands/i386/pc/acpi.c;
 
   enable = efi;
   enable = i386_pc;
grub-core/commands/acpi.c +0 -12
index 97c2cf2..2aaa202 100644
@@ -61,18 +61,6 @@ static const struct grub_arg_option options[] = {
   {0, 0, 0, 0, 0, 0}
 };
 
-/* Simple checksum by summing all bytes. Used by ACPI and SMBIOS. */
-grub_uint8_t
-grub_byte_checksum (void *base, grub_size_t size)
-{
-  grub_uint8_t *ptr;
-  grub_uint8_t ret = 0;
-  for (ptr = (grub_uint8_t *) base; ptr < ((grub_uint8_t *) base) + size;
-       ptr++)
-    ret += *ptr;
-  return ret;
-}
-
 /* rev1 is 1 if ACPIv1 is to be generated, 0 otherwise.
    rev2 contains the revision of ACPIv2+ to generate or 0 if none. */
 static int rev1, rev2;
grub-core/commands/acpihalt.c +19 -47

82 lines not on this page · raw message

grub-core/commands/efi/acpi.c deleted +0 -59

59 lines not on this page · raw message

grub-core/commands/i386/pc/acpi.c deleted +0 -81

81 lines not on this page · raw message

grub-core/kern/acpi.c new file +119 -0

119 lines not on this page · raw message

grub-core/kern/efi/acpi.c new file +59 -0

59 lines not on this page · raw message

grub-core/kern/i386/pc/acpi.c new file +81 -0

81 lines not on this page · raw message

grub-core/kern/i386/tsc.c +42 -1

66 lines not on this page · raw message

include/grub/acpi.h +26 -5
index f6e6a11..fc189c2 100644
@@ -63,16 +63,34 @@ struct grub_acpi_table_header
 struct grub_acpi_fadt
 {
   struct grub_acpi_table_header hdr;
+  /* 36 */
   grub_uint32_t facs_addr;
   grub_uint32_t dsdt_addr;
+  /* 44 */
   grub_uint8_t somefields1[20];
+  /* 64 */
   grub_uint32_t pm1a;
-  grub_uint8_t somefields2[64];
+  /* 68 */
+  grub_uint8_t somefields2[8];
+  /* 76 */
+  grub_uint32_t pmtimer;
+  /* 80 */
+  grub_uint8_t somefields3[32];
+  /* 112 */
+  grub_uint32_t flags;
+  /* 116 */
+  grub_uint8_t somefields4[16];
+  /* 132 */
   grub_uint64_t facs_xaddr;
   grub_uint64_t dsdt_xaddr;
-  grub_uint8_t somefields3[96];
+  grub_uint8_t somefields5[96];
 } GRUB_PACKED;
 
+enum
+  {
+    GRUB_ACPI_FADT_FLAGS_LONG_PMTIMER = (1 << 8)
+  };
+
 #define GRUB_ACPI_MADT_SIGNATURE "APIC"
 
 struct grub_acpi_madt_entry_header
@@ -176,9 +194,9 @@ enum
 #ifndef GRUB_DSDT_TEST
 struct grub_acpi_rsdp_v10 *grub_acpi_get_rsdpv1 (void);
 struct grub_acpi_rsdp_v20 *grub_acpi_get_rsdpv2 (void);
-struct grub_acpi_rsdp_v10 *grub_machine_acpi_get_rsdpv1 (void);
-struct grub_acpi_rsdp_v20 *grub_machine_acpi_get_rsdpv2 (void);
-grub_uint8_t grub_byte_checksum (void *base, grub_size_t size);
+struct grub_acpi_rsdp_v10 *EXPORT_FUNC(grub_machine_acpi_get_rsdpv1) (void);
+struct grub_acpi_rsdp_v20 *EXPORT_FUNC(grub_machine_acpi_get_rsdpv2) (void);
+grub_uint8_t EXPORT_FUNC(grub_byte_checksum) (void *base, grub_size_t size);
 
 grub_err_t grub_acpi_create_ebda (void);
 
@@ -234,4 +252,7 @@ enum
     GRUB_ACPI_EXTOPCODE_BANK_FIELD_OP = 0x87,
   };
 
+struct grub_acpi_fadt *
+EXPORT_FUNC(grub_acpi_find_fadt) (void);
+
 #endif /* ! GRUB_ACPI_HEADER */
Signature · 1 line
tg: (77063f4..) e/pmtimer (depends on: master)
#7 lore raw

--------------------------------------------
On Sun, 10/12/14, Andrei Borzenkov <[email protected]> wrote:

Subject: Re: How can I submit patch for bug #42944 ?
To: "Andrei Borzenkov" <[email protected]>
Cc: "The development of GNU GRUB" <[email protected]>, [email protected]
Date: Sunday, October 12, 2014, 12:24 PM

В Sat, 11 Oct 2014
12:58:29 +0400
Andrei Borzenkov <[email protected]>
пишет:

Quoted 1 line

В Sat, 11

Oct 2014 10:44:20 +0200

Quoted 1 line

Vladimir

'φ-coder/phcoder' Serbinenko <[email protected]>
пишет:

Quoted 2 lines
Quoted 2 lines
Quoted 1 line · Colin Watson
Quoted 1 line
Quoted 1 line

On Fri, Oct 10, 2014 at

Quoted 1 line · Rigoberto Corujo
Quoted 1 line
Quoted 1 line
Quoted 1 line

I attached a patch to bug

#42944 and would like to know how I would go about getting it committed to the source tree?

Quoted 4 lines
Quoted 4 lines

https://savannah.gnu.org/bugs/?42944

Quoted 2 lines

I'd suggest attaching the patch to a mail here (not encased in a zip

Quoted 1 line
Quoted 1 line
Quoted 1 line

file).

It's usually easier to get public review that way.

Quoted 2 lines
Quoted 2 lines
Quoted 1 line

I

don't like to use EFI timers if we can avoid them, they've been known

Quoted 1 line
Quoted 1 line

to hang.

Attached is a patch to use pmtimer for calibration

Quoted 2 lines

What about systems

without ACPI? Does it explicitly exclude them?

OK, I stay corrected. Still,
this patch adds over 1K to kernel on
i386-pc
and about 0.5K to common core.img with ext2:

-rw-r--r-- 1 bor bor 26848 Oct
12 20:09 /tmp/core.img-pmtimer
-rw-r--r-- 1
bor bor 26320 Oct 12 18:50 /tmp/core.img-vanilla
-rwxr-xr-x 1 bor bor 29224 Oct 12 20:08
/tmp/kernel.img-pmtimer
-rwxr-xr-x 1 bor bor
28060 Oct 12 10:12 /tmp/kernel.img-vanilla

I think it's too much for
something that so far is needed only on very
specific platform. May be we could restrict it
to EFI only where size
does not matter that
much?

Attached rebased
patch (I briefly checked and it still boots on i386-pc and apparently correctly handles timeouts, but I cannot check other
platforms).
-----Inline Attachment Follows-----

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Thank you very much for the patch. I will test it on Hyper-V Generation 2 and other physical UEFI servers and let you know the results. Regarding the concern that was expressed about SetTimer() sometimes hanging on UEFI systems, the following two files are already using SetTimer().

./grub-core/kern/arm/efi/init.c
./grub-core/kern/ia64/efi/init.c

Is it less likely that the hang occurs on those processors?

Thank you,

Rigoberto Corujo

#8 lore raw

--------------------------------------------
On Mon, 10/13/14, Rigoberto Corujo <[email protected]> wrote:

Subject: Re: How can I submit patch for bug #42944 ?
To: "Andrei Borzenkov" <[email protected]>, "The development of GNU GRUB" <[email protected]>
Cc: "The development of GNU GRUB" <[email protected]>, [email protected]
Date: Monday, October 13, 2014, 12:35 PM

--------------------------------------------
On Sun, 10/12/14, Andrei Borzenkov <[email protected]> wrote:

Subject: Re: How
can I submit patch for bug #42944 ?
To:
"Andrei Borzenkov" <[email protected]>
Cc: "The development of GNU GRUB"
<[email protected]>,
[email protected]
Date: Sunday, October 12, 2014, 12:24 PM

В Sat, 11 Oct 2014
12:58:29 +0400
Andrei
Borzenkov <[email protected]>
пишет:

Quoted 1 line

В Sat, 11

Oct 2014 10:44:20 +0200

Quoted 1 line

Vladimir

'φ-coder/phcoder' Serbinenko <[email protected]>
пишет:

Quoted 2 lines
Quoted 2 lines
Quoted 1 line · Colin Watson
Quoted 1 line
Quoted 1 line
Quoted 1 line · Rigoberto Corujo
Quoted 1 line
Quoted 1 line
Quoted 1 line

I attached a patch to bug
#42944 and would
like to know how I would go about getting

it committed to the source tree?

Quoted 6 lines
Quoted 5 lines

https://savannah.gnu.org/bugs/?42944

Quoted 1 line

I'd suggest attaching the patch to
a mail here (not
encased in a zip

Quoted 1 line
Quoted 1 line
Quoted 1 line

file).

It's usually easier to get public review that way.

Quoted 2 lines
Quoted 2 lines
Quoted 1 line

I
don't like to use EFI timers if we
can avoid them,
they've been known

Quoted 1 line
Quoted 1 line

to hang.

Attached
is a patch to use pmtimer for calibration

Quoted 2 lines

What about systems

without ACPI? Does it explicitly exclude
them?

OK, I stay
corrected. Still,
this patch adds over 1K
to kernel on
i386-pc
and
about 0.5K to common core.img with ext2:

-rw-r--r-- 1 bor bor 26848 Oct
12 20:09 /tmp/core.img-pmtimer
-rw-r--r-- 1
bor bor 26320
Oct 12 18:50 /tmp/core.img-vanilla

-rwxr-xr-x 1 bor bor 29224 Oct 12 20:08

/tmp/kernel.img-pmtimer
-rwxr-xr-x 1 bor
bor
28060 Oct 12 10:12
/tmp/kernel.img-vanilla

I
think it's too much for
something that
so far is needed only on very
specific
platform. May be we could restrict it
to
EFI only where size
does not matter that
much?

Attached rebased
patch (I briefly checked
and it still boots on i386-pc
and
apparently correctly handles timeouts, but

I cannot check other
platforms).
-----Inline Attachment Follows-----

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Thank you
very much for the patch.  I will test it on Hyper-V Generation 2 and other physical UEFI servers and let you know the results.  Regarding the concern that was expressed about SetTimer() sometimes hanging on UEFI systems, the following two files are already using SetTimer().

./grub-core/kern/arm/efi/init.c
./grub-core/kern/ia64/efi/init.c

Is it less likely that the
hang occurs on those processors?

Thank you,

Rigoberto Corujo

--------------------------------------------------------------------------

I tried the pmtimer patch on Microsoft Hyper-V Generation 2, as well as a physical UEFI server, and it worked well.

Please let me know if this patch is going to be submitted.

Thank you,

Rigoberto Corujo

#9 lore raw

Hi,

Any update on this?

Thanks,

Rigoberto

--------------------------------------------
On Mon, 10/13/14, Rigoberto Corujo <[email protected]> wrote:

Subject: Re: How can I submit patch for bug #42944 ?
To: "Andrei Borzenkov" <[email protected]>, "The development of GNU GRUB" <[email protected]>
Cc: "The development of GNU GRUB" <[email protected]>, [email protected]
Date: Monday, October 13, 2014, 8:06 PM

--------------------------------------------
On Mon, 10/13/14, Rigoberto Corujo <[email protected]> wrote:

Subject: Re: How
can I submit patch for bug #42944 ?
To:
"Andrei Borzenkov" <[email protected]>, "The development of GNU GRUB" <[email protected]>
Cc: "The development of GNU GRUB"
<[email protected]>,
[email protected]
Date: Monday, October 13, 2014, 12:35 PM

--------------------------------------------
On Sun, 10/12/14, Andrei Borzenkov <[email protected]> wrote:


Subject: Re: How
can I submit patch for bug
#42944 ?
  To:

"Andrei Borzenkov" <[email protected]>
  Cc: "The development of GNU
GRUB"
<[email protected]>,
[email protected]
  Date: Sunday, October 12, 2014, 12:24 PM

  В Sat, 11 Oct 2014
  12:58:29 +0400
  Andrei
Borzenkov <[email protected]>
  пишет:

Quoted 1 line

В Sat, 11

  Oct 2014 10:44:20 +0200

Quoted 1 line

Vladimir

'φ-coder/phcoder' Serbinenko <[email protected]>
  пишет:
  >
  > >
  On
10.10.2014
23:23, Colin Watson wrote:
  > > >
On Fri, Oct
10, 2014 at
  04:44:39PM +0000,
Rigoberto Corujo wrote:

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

I attached a patch to
bug
  #42944 and would

like to know how I would go about getting

it committed to the source tree?
  >

Quoted 1 line

  >> https://savannah.gnu.org/bugs/?42944
  > > >
  >

Quoted 2 lines

  I'd
suggest attaching the patch to
a mail here
(not
  encased in a zip

Quoted 1 line
Quoted 1 line
Quoted 1 line

file).

It's usually easier to get public review that way. > > >
  >

Quoted 1 line

I
  don't like to
use EFI timers if we
can avoid them,
  they've been known

Quoted 1 line
Quoted 1 line

to hang.

  Attached
is a patch to use pmtimer for calibration

Quoted 1 line

Quoted 1 line

What about systems

  without ACPI?
Does it explicitly exclude
them?

  OK, I stay
corrected. Still,
  this
patch adds over 1K
to kernel on
  i386-pc
  and
about 0.5K to common core.img with ext2:


-rw-r--r-- 1 bor bor 26848 Oct
  12 20:09
/tmp/core.img-pmtimer
  -rw-r--r-- 1
  bor bor 26320
Oct 12 18:50
/tmp/core.img-vanilla

-rwxr-xr-x 1 bor bor 29224 Oct 12 20:08

/tmp/kernel.img-pmtimer

-rwxr-xr-x 1 bor
bor

28060 Oct 12 10:12

/tmp/kernel.img-vanilla

  I
think it's too much
for
  something that
so
far is needed only on very
  specific
platform. May be we could restrict it
  to
EFI only where size
  does not matter that

much?

Attached rebased
  patch (I briefly
checked
and it still boots on i386-pc
  and
apparently correctly
handles timeouts, but

I
cannot check other
  platforms).
  -----Inline Attachment Follows-----

_______________________________________________
  Grub-devel mailing list

[email protected]
  https://lists.gnu.org/mailman/listinfo/grub-devel

Thank
you
very much for the patch.  I will test
it on Hyper-V
Generation 2 and other
physical UEFI servers and let you
know the
results.  Regarding the concern that was expressed
about SetTimer() sometimes hanging on UEFI
systems, the
following two files are
already using SetTimer().

./grub-core/kern/arm/efi/init.c

./grub-core/kern/ia64/efi/init.c

Is it less likely that the

hang occurs on those processors?

Thank you,

Rigoberto Corujo

--------------------------------------------------------------------------

I tried the pmtimer patch on
Microsoft Hyper-V Generation 2, as well as a physical UEFI server, and it worked well.

Please let me know if this patch is going to be
submitted.

Thank you,

Rigoberto Corujo

#10 lore raw

Hi,

Has a decision been made whether the GRUB2 project is going to go with my proposed patch that uses the UEFI SetTimer() function or whether the pmtimer patch will be used for the Hyper-V Generation 2 PXE boot issue?

Thank you,

Rigoberto

--------------------------------------------
On Fri, 10/17/14, Rigoberto Corujo <[email protected]> wrote:

Subject: Re: How can I submit patch for bug #42944 ?
To: "Andrei Borzenkov" <[email protected]>, "The development of GNU GRUB" <[email protected]>
Cc: "The development of GNU GRUB" <[email protected]>, [email protected]
Date: Friday, October 17, 2014, 10:29 AM

Hi,

Any update on this?

Thanks,

Rigoberto

--------------------------------------------
On Mon, 10/13/14, Rigoberto Corujo <[email protected]> wrote:

Subject: Re: How can I
submit patch for bug #42944 ?
To:
"Andrei Borzenkov" <[email protected]>, "The development of GNU GRUB" <[email protected]>
Cc: "The development of GNU GRUB"
<[email protected]>,
[email protected]
Date: Monday, October 13, 2014, 8:06 PM

--------------------------------------------
On Mon, 10/13/14, Rigoberto Corujo <[email protected]> wrote:


Subject: Re: How
can I submit patch for bug
#42944 ?
  To:

"Andrei Borzenkov" <[email protected]>,
"The development of GNU GRUB" <[email protected]>
  Cc: "The development of GNU
GRUB"
<[email protected]>,
[email protected]
  Date: Monday, October 13, 2014, 12:35 PM

--------------------------------------------
  On Sun, 10/12/14, Andrei Borzenkov <[email protected]> wrote:


Subject: Re: How
  can
I submit patch for bug
#42944 ?
  To:

"Andrei Borzenkov" <[email protected]>
  Cc: "The development of GNU
GRUB"
  <[email protected]>,
  [email protected]
  Date: Sunday, October 12, 2014, 12:24 PM

  В Sat, 11 Oct 2014
  12:58:29 +0400

Andrei
  Borzenkov <[email protected]>
  пишет:


  > В Sat, 11
  Oct 2014 10:44:20 +0200

Quoted 1 line

Vladimir

'φ-coder/phcoder'
Serbinenko <[email protected]>
  пишет:
  >
  > >
  On
10.10.2014
  23:23, Colin
Watson wrote:
  > > >
  On Fri, Oct
10, 2014 at
  04:44:39PM +0000,

Rigoberto Corujo wrote:

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

  I attached a patch
to
bug
  #42944 and
would

like to know how I
would go about getting

  it committed to the source tree?
  >
  >
  >> https://savannah.gnu.org/bugs/?42944
  > > >
  >

Quoted 1 line

  >

  I'd
suggest attaching the patch
to
  a mail here
(not
  encased in a zip

Quoted 1 line
Quoted 1 line
Quoted 1 line

file).

It's usually easier to
get public review that way.
  > >

Quoted 1 line

  >

Quoted 1 line

  I
  don't like to
use EFI timers if we
  can
avoid them,
  they've been known

Quoted 1 line
Quoted 1 line

to hang.

  Attached
  is a patch to
use pmtimer for calibration

  >

Quoted 1 line

What about systems

  without ACPI?
Does it explicitly exclude

them?

  OK, I stay
  corrected. Still,

this
patch adds over 1K

to kernel on
  i386-pc

and
  about 0.5K to common core.img with
ext2:



-rw-r--r-- 1 bor bor 26848
Oct
  12 20:09

/tmp/core.img-pmtimer
  -rw-r--r-- 1
  bor bor 26320
  Oct 12
18:50
/tmp/core.img-vanilla

-rwxr-xr-x 1 bor bor 29224 Oct 12 20:08

  /tmp/kernel.img-pmtimer


-rwxr-xr-x 1 bor

bor

28060 Oct 12
10:12

/tmp/kernel.img-vanilla

  I
  think it's too
much
for
  something
that
  so
far is needed
only on very
  specific

platform. May be we could restrict it

to
  EFI only where size

  does not matter that

much?

Attached rebased
  patch (I briefly

checked
  and it still boots on i386-pc
  and
  apparently
correctly
handles timeouts, but

  I

cannot check other
  platforms).
  -----Inline Attachment Follows-----

_______________________________________________
  Grub-devel mailing list


[email protected]
  https://lists.gnu.org/mailman/listinfo/grub-devel



Thank
you
  very much for
the patch.  I will test
it on Hyper-V
  Generation 2 and other

physical UEFI servers and let you
  know
the
results.  Regarding the concern that
was expressed
  about SetTimer() sometimes
hanging on UEFI
systems, the
  following two files are

already using SetTimer().

./grub-core/kern/arm/efi/init.c

./grub-core/kern/ia64/efi/init.c

  Is it less likely that
the

hang occurs on those
processors?

  Thank
you,

Rigoberto Corujo

--------------------------------------------------------------------------

I tried the pmtimer patch
on
Microsoft Hyper-V Generation 2, as well
as a physical UEFI
server, and it worked
well.

Please let me know
if this patch is going to be
submitted.

Thank you,

Rigoberto Corujo