1 What: /sys/firmware/memmap/ 2 Date: June 2008 3 Contact: Bernhard Walle <bernhard.walle@ 4 Description: 5 On all platforms, the firmware 6 kernel reads. The resources fr 7 in the kernel resource tree an 8 /proc/iomem (together with oth 9 10 However, on most architectures 11 map is modified afterwards by 12 the kernel merges that memory 13 just because the user overwrit 14 line. 15 16 kexec needs the raw firmware-p 17 parameter segment of the kerne 18 kexec. Also, the raw memory ma 19 that reason, /sys/firmware/mem 20 the raw memory map to userspac 21 22 The structure is as follows: U 23 are subdirectories with the nu 24 25 /sys/firmware/memmap/0 26 /sys/firmware/memmap/1 27 /sys/firmware/memmap/2 28 /sys/firmware/memmap/3 29 ... 30 31 The maximum depends on the num 32 by the firmware. The order is 33 provides. 34 35 Each directory contains three 36 37 ======== ==================== 38 start The start address (a 39 '0x' prefix). 40 end The end address, inc 41 firmware provides in 42 type Type of the entry as 43 valid types. 44 ======== ==================== 45 46 So, for example:: 47 48 /sys/firmware/memmap/0 49 /sys/firmware/memmap/0 50 /sys/firmware/memmap/0 51 /sys/firmware/memmap/1 52 ... 53 54 Currently following types exis 55 56 - System RAM 57 - ACPI Tables 58 - ACPI Non-volatile Storage 59 - Unusable memory 60 - Persistent Memory (legacy) 61 - Persistent Memory 62 - Soft Reserved 63 - reserved 64 65 Following shell snippet can be 66 map in a human-readable format 67 68 #!/bin/bash 69 cd /sys/firmware/memmap 70 for dir in * ; do 71 start=$(cat $dir/start) 72 end=$(cat $dir/end) 73 type=$(cat $dir/type) 74 printf "%016x-%016x (%s) 75 done
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.