ia64/xen-unstable
changeset 9750:bd264ded5bec
[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@valinux.co.jp>
print efi map descriptor infomation at bootup with the boot option efi_print.
default is off.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author | awilliam@xenbuild.aw |
---|---|
date | Fri Apr 21 09:11:46 2006 -0600 (2006-04-21) |
parents | 1774144596d5 |
children | bbf325d76768 |
files | xen/arch/ia64/xen/xensetup.c |
line diff
1.1 --- a/xen/arch/ia64/xen/xensetup.c Fri Apr 21 09:09:16 2006 -0600 1.2 +++ b/xen/arch/ia64/xen/xensetup.c Fri Apr 21 09:11:46 2006 -0600 1.3 @@ -165,6 +165,37 @@ struct ns16550_defaults ns16550_com2 = { 1.4 .stop_bits = 1 1.5 }; 1.6 1.7 +/* efi_print: print efi table at boot */ 1.8 +static int opt_efi_print = 0; 1.9 +boolean_param("efi_print", opt_efi_print); 1.10 + 1.11 +/* print EFI memory map: */ 1.12 +static void 1.13 +efi_print(void) 1.14 +{ 1.15 + void *efi_map_start, *efi_map_end; 1.16 + u64 efi_desc_size; 1.17 + 1.18 + efi_memory_desc_t *md; 1.19 + void *p; 1.20 + int i; 1.21 + 1.22 + if (!opt_efi_print) 1.23 + return; 1.24 + 1.25 + efi_map_start = __va(ia64_boot_param->efi_memmap); 1.26 + efi_map_end = efi_map_start + ia64_boot_param->efi_memmap_size; 1.27 + efi_desc_size = ia64_boot_param->efi_memdesc_size; 1.28 + 1.29 + for (i = 0, p = efi_map_start; p < efi_map_end; ++i, p += efi_desc_size) { 1.30 + md = p; 1.31 + printk("mem%02u: type=%u, attr=0x%lx, range=[0x%016lx-0x%016lx) (%luMB)\n", 1.32 + i, md->type, md->attribute, md->phys_addr, 1.33 + md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT), 1.34 + md->num_pages >> (20 - EFI_PAGE_SHIFT)); 1.35 + } 1.36 +} 1.37 + 1.38 void start_kernel(void) 1.39 { 1.40 unsigned char *cmdline; 1.41 @@ -268,6 +299,7 @@ void start_kernel(void) 1.42 - IA64_GRANULE_SIZE) >> PAGE_SHIFT; 1.43 printf("find_memory: last granule reserved for dom0; xen max_page=%lx\n", 1.44 max_page); 1.45 + efi_print(); 1.46 1.47 heap_start = memguard_init(ia64_imva(&_end)); 1.48 printf("Before heap_start: %p\n", heap_start);