[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [IA64] print efi map descriptor infomation at bootup



# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID bd264ded5becccb904ce64c771e3853cca6abeef
# Parent  1774144596d56f074999c28acd499794ba46071a
[IA64] print efi map descriptor infomation at bootup

print efi map descriptor infomation at bootup with the boot option efi_print.
default is off.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

diff -r 1774144596d5 -r bd264ded5bec xen/arch/ia64/xen/xensetup.c
--- a/xen/arch/ia64/xen/xensetup.c      Fri Apr 21 09:09:16 2006 -0600
+++ b/xen/arch/ia64/xen/xensetup.c      Fri Apr 21 09:11:46 2006 -0600
@@ -165,6 +165,37 @@ struct ns16550_defaults ns16550_com2 = {
     .stop_bits = 1
 };
 
+/* efi_print: print efi table at boot */
+static int opt_efi_print = 0;
+boolean_param("efi_print", opt_efi_print);
+
+/* print EFI memory map: */
+static void
+efi_print(void)
+{
+    void *efi_map_start, *efi_map_end;
+    u64 efi_desc_size;
+
+    efi_memory_desc_t *md;
+    void *p;
+    int i;
+
+    if (!opt_efi_print)
+        return;
+
+    efi_map_start = __va(ia64_boot_param->efi_memmap);
+    efi_map_end   = efi_map_start + ia64_boot_param->efi_memmap_size;
+    efi_desc_size = ia64_boot_param->efi_memdesc_size;
+
+    for (i = 0, p = efi_map_start; p < efi_map_end; ++i, p += efi_desc_size) {
+        md = p;
+        printk("mem%02u: type=%u, attr=0x%lx, range=[0x%016lx-0x%016lx) 
(%luMB)\n",
+               i, md->type, md->attribute, md->phys_addr,
+               md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT),
+               md->num_pages >> (20 - EFI_PAGE_SHIFT));
+    }
+}
+
 void start_kernel(void)
 {
     unsigned char *cmdline;
@@ -268,6 +299,7 @@ void start_kernel(void)
        - IA64_GRANULE_SIZE) >> PAGE_SHIFT;
     printf("find_memory: last granule reserved for dom0; xen max_page=%lx\n",
        max_page);
+    efi_print();
 
     heap_start = memguard_init(ia64_imva(&_end));
     printf("Before heap_start: %p\n", heap_start);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.