]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
EFI debug
authorVladimir Serbinenko <phcoder@gmail.com>
Sun, 22 Dec 2013 22:15:43 +0000 (23:15 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Sun, 22 Dec 2013 22:15:43 +0000 (23:15 +0100)
grub-core/disk/efi/efidisk.c
grub-core/kern/arm/cache_armv6.S
grub-core/kern/file.c
grub-core/kern/uboot/init.c
grub-core/loader/efi/chainloader.c
grub-core/normal/main.c

index e04203fe0b1d67d867f55bdece04f83a18967404..4a2811c59b0ff6f6ed26655d0ade5e982617a96a 100644 (file)
@@ -654,6 +654,7 @@ grub_efidisk_get_device_handle (grub_disk_t disk)
 
     case 'h':
       /* If this is the whole disk, just return its own data.  */
+      grub_printf ("parent handle = %p\n", d->handle);
       if (! disk->partition)
        return d->handle;
 
@@ -664,13 +665,24 @@ grub_efidisk_get_device_handle (grub_disk_t disk)
        struct grub_efidisk_data *c;
 
        devices = make_devices ();
-       FOR_CHILDREN (c, devices)
+       grub_efi_print_device_path (d->device_path);
+       for (c = devices; c; c = c->next)
          {
            grub_efi_hard_drive_device_path_t *hd;
 
            hd = (grub_efi_hard_drive_device_path_t *) c->last_device_path;
 
-           if ((GRUB_EFI_DEVICE_PATH_TYPE (c->last_device_path)
+           grub_efi_print_device_path (c->device_path);
+           grub_printf ("part %d = %x, %x, %x, %x, %x, %x\n",
+                        is_child (c, d),
+                        (int) GRUB_EFI_DEVICE_PATH_TYPE (c->last_device_path),
+                        (int) GRUB_EFI_DEVICE_PATH_SUBTYPE (c->last_device_path),
+                        (int) hd->partition_start, (int) hd->partition_size,
+                        (int) grub_partition_get_start (disk->partition),
+                        (int) grub_partition_get_len (disk->partition));
+
+           if (is_child (c, d)
+               && (GRUB_EFI_DEVICE_PATH_TYPE (c->last_device_path)
                 == GRUB_EFI_MEDIA_DEVICE_PATH_TYPE)
                && (GRUB_EFI_DEVICE_PATH_SUBTYPE (c->last_device_path)
                    == GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE)
index c8f94abcfdc5ba84686a1ea02c730091407a638c..239a30780665abcf9a8d011383e4afa352a8ba8b 100644 (file)
@@ -41,4 +41,12 @@ FUNCTION(grub_arm_main_id)
 
 FUNCTION(grub_arm_cache_type)
        mrc     p15, 0, r0, c0, c0, 1
-       bx lr
\ No newline at end of file
+       bx lr
+
+FUNCTION(grub_arm_cache_enable)
+       mrc     p15, 0, r0, c1, c0, 0
+       orr     r0, r0, #(1 << 12)
+       orr     r0, r0, #(1 << 2)
+       orr     r0, r0, #(1 << 0)
+       mcr     p15, 0, r0, c1, c0, 0
+       bx      lr
index 24da12bb99d12bbde0e2e4673e85ad78ce793558..de4ede470c8bdde7c4ead762543cb59faef95638 100644 (file)
@@ -67,6 +67,8 @@ grub_file_open (const char *name)
   const char *file_name;
   grub_file_filter_id_t filter;
 
+  grub_boot_time ("Opening '%s'", name);
+
   device_name = grub_file_get_device_name (name);
   if (grub_errno)
     goto fail;
index c7ad73dafe37d932ebf0abd44525f6d3c80972ce..02aaa164912645cdc94a049a9c68c6e91e8243bd 100644 (file)
@@ -83,6 +83,8 @@ rpi_timer_ms (void)
 }
 #endif
 
+void grub_arm_cache_enable (void);
+
 void
 grub_machine_init (void)
 {
@@ -101,6 +103,10 @@ grub_machine_init (void)
       grub_uboot_puts ("invalid U-Boot API version\n");
     }
 
+#ifdef __arm__
+  grub_arm_cache_enable ();
+#endif
+
   /* Initialize the console so that GRUB can display messages.  */
   grub_console_init_early ();
 
index 233237018b5be163f5f434d49e88c6bd9360b584..90aefea215ab17a41e571c95e5e6621690b7617c 100644 (file)
@@ -249,7 +249,8 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
 
   if (! dp)
     {
-      grub_error (GRUB_ERR_BAD_DEVICE, "not a valid root device");
+      grub_error (GRUB_ERR_BAD_DEVICE, "not a valid root device (%p, %p)",
+                 dev_handle, dp);
       goto fail;
     }
 
index c36663f738ca9db88c67a3936f3b0a863676cb14..062aeed5267f288e342cb5cadc6cf08b48cd357f 100644 (file)
@@ -230,12 +230,18 @@ read_lists (const char *val)
 {
   if (! grub_no_modules)
     {
+      grub_boot_time ("Reading commands");
       read_command_list (val);
+      grub_boot_time ("Reading filesystems");
       read_fs_list (val);
+      grub_boot_time ("Reading crypto");
       read_crypto_list (val);
+      grub_boot_time ("Reading terminal");
       read_terminal_list (val);
     }
+  grub_boot_time ("Reading gettext");
   grub_gettext_reread_prefix (val);
+  grub_boot_time ("Lists reread");
 }
 
 static char *