mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 15:22:39 +00:00
EFI debug
This commit is contained in:
1 parent
d5edef1a77
commit
4b03082fa9
6 files changed
+38
-3
No files matched your search
@@ -654,6 +654,7 @@ grub_efidisk_get_device_handle (grub_disk_t disk)
|
|||||||
|
|
||||||
case 'h':
|
case 'h':
|
||||||
/* If this is the whole disk, just return its own data. */
|
/* If this is the whole disk, just return its own data. */
|
||||||
|
grub_printf ("parent handle = %p\n", d->handle);
|
||||||
if (! disk->partition)
|
if (! disk->partition)
|
||||||
return d->handle;
|
return d->handle;
|
||||||
|
|
||||||
@@ -664,13 +665,24 @@ grub_efidisk_get_device_handle (grub_disk_t disk)
|
|||||||
struct grub_efidisk_data *c;
|
struct grub_efidisk_data *c;
|
||||||
|
|
||||||
devices = make_devices ();
|
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;
|
grub_efi_hard_drive_device_path_t *hd;
|
||||||
|
|
||||||
hd = (grub_efi_hard_drive_device_path_t *) c->last_device_path;
|
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_MEDIA_DEVICE_PATH_TYPE)
|
||||||
&& (GRUB_EFI_DEVICE_PATH_SUBTYPE (c->last_device_path)
|
&& (GRUB_EFI_DEVICE_PATH_SUBTYPE (c->last_device_path)
|
||||||
== GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE)
|
== GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE)
|
||||||
|
|||||||
@@ -42,3 +42,11 @@ FUNCTION(grub_arm_main_id)
|
|||||||
FUNCTION(grub_arm_cache_type)
|
FUNCTION(grub_arm_cache_type)
|
||||||
mrc p15, 0, r0, c0, c0, 1
|
mrc p15, 0, r0, c0, c0, 1
|
||||||
bx lr
|
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
|
||||||
@@ -67,6 +67,8 @@ grub_file_open (const char *name)
|
|||||||
const char *file_name;
|
const char *file_name;
|
||||||
grub_file_filter_id_t filter;
|
grub_file_filter_id_t filter;
|
||||||
|
|
||||||
|
grub_boot_time ("Opening '%s'", name);
|
||||||
|
|
||||||
device_name = grub_file_get_device_name (name);
|
device_name = grub_file_get_device_name (name);
|
||||||
if (grub_errno)
|
if (grub_errno)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|||||||
@@ -83,6 +83,8 @@ rpi_timer_ms (void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void grub_arm_cache_enable (void);
|
||||||
|
|
||||||
void
|
void
|
||||||
grub_machine_init (void)
|
grub_machine_init (void)
|
||||||
{
|
{
|
||||||
@@ -101,6 +103,10 @@ grub_machine_init (void)
|
|||||||
grub_uboot_puts ("invalid U-Boot API version\n");
|
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. */
|
/* Initialize the console so that GRUB can display messages. */
|
||||||
grub_console_init_early ();
|
grub_console_init_early ();
|
||||||
|
|
||||||
|
|||||||
@@ -249,7 +249,8 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
|
|||||||
|
|
||||||
if (! dp)
|
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;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -230,12 +230,18 @@ read_lists (const char *val)
|
|||||||
{
|
{
|
||||||
if (! grub_no_modules)
|
if (! grub_no_modules)
|
||||||
{
|
{
|
||||||
|
grub_boot_time ("Reading commands");
|
||||||
read_command_list (val);
|
read_command_list (val);
|
||||||
|
grub_boot_time ("Reading filesystems");
|
||||||
read_fs_list (val);
|
read_fs_list (val);
|
||||||
|
grub_boot_time ("Reading crypto");
|
||||||
read_crypto_list (val);
|
read_crypto_list (val);
|
||||||
|
grub_boot_time ("Reading terminal");
|
||||||
read_terminal_list (val);
|
read_terminal_list (val);
|
||||||
}
|
}
|
||||||
|
grub_boot_time ("Reading gettext");
|
||||||
grub_gettext_reread_prefix (val);
|
grub_gettext_reread_prefix (val);
|
||||||
|
grub_boot_time ("Lists reread");
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
|
|||||||
Reference in new issue
Block a user