From: Vladimir Serbinenko Date: Sun, 22 Dec 2013 22:15:43 +0000 (+0100) Subject: EFI debug X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b03082fa912974a98a2acc24eb7eaa48629743c;p=thirdparty%2Fgrub.git EFI debug --- diff --git a/grub-core/disk/efi/efidisk.c b/grub-core/disk/efi/efidisk.c index e04203fe0..4a2811c59 100644 --- a/grub-core/disk/efi/efidisk.c +++ b/grub-core/disk/efi/efidisk.c @@ -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) diff --git a/grub-core/kern/arm/cache_armv6.S b/grub-core/kern/arm/cache_armv6.S index c8f94abcf..239a30780 100644 --- a/grub-core/kern/arm/cache_armv6.S +++ b/grub-core/kern/arm/cache_armv6.S @@ -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 diff --git a/grub-core/kern/file.c b/grub-core/kern/file.c index 24da12bb9..de4ede470 100644 --- a/grub-core/kern/file.c +++ b/grub-core/kern/file.c @@ -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; diff --git a/grub-core/kern/uboot/init.c b/grub-core/kern/uboot/init.c index c7ad73daf..02aaa1649 100644 --- a/grub-core/kern/uboot/init.c +++ b/grub-core/kern/uboot/init.c @@ -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 (); diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c index 233237018..90aefea21 100644 --- a/grub-core/loader/efi/chainloader.c +++ b/grub-core/loader/efi/chainloader.c @@ -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; } diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c index c36663f73..062aeed52 100644 --- a/grub-core/normal/main.c +++ b/grub-core/normal/main.c @@ -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 *