swh:1:snp:77163734605b0ec556b01d897b7bb4a7e30d46b6
Revision 818c7e866f920b145424c2c46deda4b27c3fb316 authored by Simon Horman on 26 February 2008, 06:24:04 UTC, committed by Tony Luck on 06 March 2008, 17:34:11 UTC
When EFI_DEBUG is defined to a non-zero value in arch/ia64/kernel/efi.c,
the efi memory regions are displayed. This patch enhances the
display code in a few ways:

1. Use TB, GB and MB as well as KB as units.
   Although this introduces rounding errors (KB doesn't as
   size is always a multiple of 4Kb), it does make
   things a lot more readable.

   Also as the range is also shown, it is possible to note the exact size
   if it is important. In my experience, the size field is mostly useful
   for getting a general idea of the size of a region.

   On the rx2620 that I use, there actually is an 8TB region (though not
   backed by physical memory, and 8TB really is a lot more readable than
   8589934592KB.

2. pad the size field with leading spaces to further improve readability

   ...
   ... (   8MB)
   ... ( 928MB)
   ... (   3MB)
   ...

   vs

   ...
   ... (8MB)
   ... (928MB)
   ... (3MB)
   ...

3. Pad the attr field out to 64bits using leading zeros,
   to further improve readability.

   ...
   mem05: type= 2, attr=0x0000000000000008, range=[0x0000000004000000-0x000000000481f000) (   8MB)
   mem06: type= 7, attr=0x0000000000000008, range=[0x000000000481f000-0x000000003e876000) ( 928MB)
   mem07: type= 5, attr=0x8000000000000008, range=[0x000000003e876000-0x000000003eb8e000) (   3MB)
   mem08: type= 4, attr=0x0000000000000008, range=[0x000000003eb8e000-0x000000003ee7a000) (   2MB)
   ...

   ...
   mem05: type= 2, attr=0x8, range=[0x0000000004000000-0x000000000481f000) (   8MB)
   mem06: type= 7, attr=0x8, range=[0x000000000481f000-0x000000003e876000) ( 928MB)
   mem07: type= 5, attr=0x8000000000000008, range=[0x000000003e876000-0x000000003eb8e000) (   3MB)
   mem08: type= 4, attr=0x8, range=[0x000000003eb8e000-0x000000003ee7a000) (   2MB)
   ...

4. Use %d instead of %u for the index field, as i is a signed int.

N.B: This code is not compiled unless EFI_DEBUG is non 0.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>
1 parent 1ab40ec
History
Tip revision: a4412fdd49dc011bcc2c0d81ac4cab7457092650 authored by Steven Rostedt (Google) on 21 November 2022, 15:44:03 UTC
error-injection: Add prompt for function error injection
Tip revision: a4412fd
File Mode Size
Documentation
arch
block
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
usr
virt
.gitignore -rw-r--r-- 644 bytes
.mailmap -rw-r--r-- 3.6 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 90.4 KB
Kbuild -rw-r--r-- 1.6 KB
MAINTAINERS -rw-r--r-- 95.1 KB
Makefile -rw-r--r-- 52.8 KB
README -rw-r--r-- 16.5 KB
REPORTING-BUGS -rw-r--r-- 3.1 KB

README

back to top