Robert Elliott
c79c59f129
lsefimmap: support persistent memory and other UEFI 2.5 features
This should accompany
76ce1de740 Translate UEFI persistent memory type
1. Add a string for the EfiPersistentMemory type 14 that was
added in UEFI 2.5.
2. Decode the memory attributes that were added in UEFI 2.5:
* NV (non-volatile)
* MORE_RELIABLE (higher reliable, e.g., mirrored memory in a system
with partial memory mirroring)
* RO (read-only)
3. Use proper IEC binary units (KiB, MiB, etc.) for power-of-two
values rather than misusing SI power-of-ten units (KB, MB, etc.)
4. The lsmmap command only decodes memory ranges sizes up to GiB scale
units. Persistent memory ranges will reach into the TiB scale.
Since 64-bit size field supports TiB, PiB, and EiB, decode all of
them for completeness.
5. In the lsefimmap command, rewrite the print statements to
* avoid rounding
* avoid a big nested if/else tree.
For example: In the sixth entry below, the value of 309MB implies
316416KB but is really reporting 316436KB.
Widen the size column to 6 digits to accommodate typical cases.
The worst case value would require 14 digits; if that happens,
let the columns get out of sync.
Old format:
Type Physical start - end #Pages Size Attributes
conv-mem 0000000000000000-0000000000092fff 00000093 588KB UC WC WT WB
reserved 0000000000093000-0000000000093fff 00000001 4KB UC WC WT WB
conv-mem 0000000000094000-000000000009ffff 0000000c 48KB UC WC WT WB
conv-mem 0000000000100000-000000000fffffff 0000ff00 255MB UC WC WT WB
BS-code 0000000010000000-0000000010048fff 00000049 292KB UC WC WT WB
conv-mem 0000000010049000-000000002354dfff 00013505 309MB UC WC WT WB
ldr-data 000000002354e000-000000003ecfffff 0001b7b2 439MB UC WC WT WB
BS-data 000000003ed00000-000000003ed7ffff 00000080 512KB UC WC WT WB
conv-mem 000000003ed80000-000000006af5ffff 0002c1e0 705MB UC WC WT WB
reserved 000000006af60000-000000006b55ffff 00000600 6MB UC WC WT WB
BS-data 000000006b560000-000000006b560fff 00000001 4KB UC WC WT WB
RT-data 000000006b561000-000000006b5e1fff 00000081 516KB RT UC WC WT WB
BS-data 000000006b5e2000-000000006ecfafff 00003719 55MB UC WC WT WB
BS-code 000000006ecfb000-000000006ecfbfff 00000001 4KB UC WC WT WB
conv-mem 000000006ecfc000-00000000711fafff 000024ff 36MB UC WC WT WB
BS-data 00000000711fb000-000000007128dfff 00000093 588KB UC WC WT WB
Unk 0d 0000000880000000-0000000e7fffffff 00600000 24GB UC WC WT WB NV
reserved 0000001680000000-0000001c7fffffff 00600000 24GB UC WC WT WB NV
New format:
Type Physical start - end #Pages Size Attributes
conv-mem 0000000000000000-0000000000092fff 00000093 588KiB UC WC WT WB
reserved 0000000000093000-0000000000093fff 00000001 4KiB UC WC WT WB
conv-mem 0000000000094000-000000000009ffff 0000000c 48KiB UC WC WT WB
conv-mem 0000000000100000-000000000fffffff 0000ff00 255MiB UC WC WT WB
BS-code 0000000010000000-0000000010048fff 00000049 292KiB UC WC WT WB
conv-mem 0000000010049000-000000002354dfff 00013505 316436KiB UC WC WT WB
ldr-data 000000002354e000-000000003ecfffff 0001b7b2 450248KiB UC WC WT WB
BS-data 000000003ed00000-000000003ed7ffff 00000080 512KiB UC WC WT WB
conv-mem 000000003ed80000-000000006af5ffff 0002c1e0 722816KiB UC WC WT WB
reserved 000000006af60000-000000006b55ffff 00000600 6MiB UC WC WT WB
BS-data 000000006b560000-000000006b560fff 00000001 4KiB UC WC WT WB
RT-data 000000006b561000-000000006b5e1fff 00000081 516KiB RT UC WC WT WB
BS-data 000000006b5e2000-000000006ecfafff 00003719 56420KiB UC WC WT WB
BS-code 000000006ecfb000-000000006ecfbfff 00000001 4KiB UC WC WT WB
conv-mem 000000006ecfc000-0000000071222fff 00002527 38044KiB UC WC WT WB
BS-data 0000000071223000-00000000712ddfff 000000bb 748KiB UC WC WT WB
persist 0000000880000000-0000000e7fffffff 00600000 24GiB UC WC WT WB NV
reserved 0000001680000000-0000001c7fffffff 00600000 24GiB UC WC WT WB NV
2015-12-17 21:00:44 +03:00
..
2015-10-11 13:20:26 +02:00
2015-06-20 23:38:19 +03:00
2015-12-17 21:00:44 +03:00
2015-11-12 09:23:02 -02:00
2014-01-18 21:22:57 +04:00
2015-01-27 17:17:58 +01:00
2015-11-09 03:24:04 +01:00
2013-11-24 07:08:18 +01:00
2013-11-07 01:01:47 +01:00
2015-11-13 21:54:19 +03:00
2015-03-05 20:19:47 +03:00
2012-03-03 13:05:08 +01:00
2011-11-11 21:03:49 +01:00
2015-02-26 22:10:09 +01:00
2015-12-16 21:20:30 +03:00
2015-12-16 07:57:18 +03:00
2015-11-27 19:52:16 +03:00
2015-12-15 10:25:34 +03:00
2015-12-07 20:52:27 +03:00
2015-12-16 19:20:10 +03:00
2015-11-18 22:23:58 +03:00
2015-08-22 21:22:41 +02:00
2012-03-05 16:42:26 +01:00
2015-01-28 20:35:28 +03:00
2015-10-27 23:30:54 +03:00
2015-03-03 20:50:37 +01:00
2015-02-26 21:27:32 +01:00
2013-10-14 03:40:20 +02:00
2014-01-18 23:15:40 +04:00
2014-01-18 23:15:40 +04:00
2013-12-16 13:18:48 +01:00
2015-11-08 20:00:27 +01:00
2013-11-11 23:05:53 +01:00
2013-04-27 02:00:16 +02:00
2013-03-01 11:15:09 +01:00
2014-09-21 18:23:23 +02:00
2013-04-11 21:12:46 +02:00
2013-04-11 21:12:46 +02:00
2013-04-11 21:12:46 +02:00
2013-04-11 21:12:46 +02:00
2015-11-27 11:39:55 +01:00
2015-11-27 11:39:55 +01:00
2015-03-27 12:18:25 +01:00