diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ia64/kernel/efi.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c index 78f50e81cd95..728d7247a1a6 100644 --- a/arch/ia64/kernel/efi.c +++ b/arch/ia64/kernel/efi.c | |||
@@ -543,12 +543,30 @@ efi_init (void) | |||
543 | for (i = 0, p = efi_map_start; p < efi_map_end; | 543 | for (i = 0, p = efi_map_start; p < efi_map_end; |
544 | ++i, p += efi_desc_size) | 544 | ++i, p += efi_desc_size) |
545 | { | 545 | { |
546 | const char *unit; | ||
547 | unsigned long size; | ||
548 | |||
546 | md = p; | 549 | md = p; |
547 | printk("mem%02u: type=%u, attr=0x%lx, " | 550 | size = md->num_pages << EFI_PAGE_SHIFT; |
548 | "range=[0x%016lx-0x%016lx) (%luMB)\n", | 551 | |
552 | if ((size >> 40) > 0) { | ||
553 | size >>= 40; | ||
554 | unit = "TB"; | ||
555 | } else if ((size >> 30) > 0) { | ||
556 | size >>= 30; | ||
557 | unit = "GB"; | ||
558 | } else if ((size >> 20) > 0) { | ||
559 | size >>= 20; | ||
560 | unit = "MB"; | ||
561 | } else { | ||
562 | size >>= 10; | ||
563 | unit = "KB"; | ||
564 | } | ||
565 | |||
566 | printk("mem%02d: type=%2u, attr=0x%016lx, " | ||
567 | "range=[0x%016lx-0x%016lx) (%4lu%s)\n", | ||
549 | i, md->type, md->attribute, md->phys_addr, | 568 | i, md->type, md->attribute, md->phys_addr, |
550 | md->phys_addr + efi_md_size(md), | 569 | md->phys_addr + efi_md_size(md), size, unit); |
551 | md->num_pages >> (20 - EFI_PAGE_SHIFT)); | ||
552 | } | 570 | } |
553 | } | 571 | } |
554 | #endif | 572 | #endif |