spi-topcliff-pch: Fix issue for transmitting over 4KByte
[zen-stable.git] / Documentation / ABI / testing / sysfs-firmware-memmap
blobeca0d65087dc4239352add5f2167a85ae7a179e8
1 What:           /sys/firmware/memmap/
2 Date:           June 2008
3 Contact:        Bernhard Walle <bernhard.walle@gmx.de>
4 Description:
5                 On all platforms, the firmware provides a memory map which the
6                 kernel reads. The resources from that memory map are registered
7                 in the kernel resource tree and exposed to userspace via
8                 /proc/iomem (together with other resources).
10                 However, on most architectures that firmware-provided memory
11                 map is modified afterwards by the kernel itself, either because
12                 the kernel merges that memory map with other information or
13                 just because the user overwrites that memory map via command
14                 line.
16                 kexec needs the raw firmware-provided memory map to setup the
17                 parameter segment of the kernel that should be booted with
18                 kexec. Also, the raw memory map is useful for debugging. For
19                 that reason, /sys/firmware/memmap is an interface that provides
20                 the raw memory map to userspace.
22                 The structure is as follows: Under /sys/firmware/memmap there
23                 are subdirectories with the number of the entry as their name:
25                         /sys/firmware/memmap/0
26                         /sys/firmware/memmap/1
27                         /sys/firmware/memmap/2
28                         /sys/firmware/memmap/3
29                         ...
31                 The maximum depends on the number of memory map entries provided
32                 by the firmware. The order is just the order that the firmware
33                 provides.
35                 Each directory contains three files:
37                 start   : The start address (as hexadecimal number with the
38                           '0x' prefix).
39                 end     : The end address, inclusive (regardless whether the
40                           firmware provides inclusive or exclusive ranges).
41                 type    : Type of the entry as string. See below for a list of
42                           valid types.
44                 So, for example:
46                         /sys/firmware/memmap/0/start
47                         /sys/firmware/memmap/0/end
48                         /sys/firmware/memmap/0/type
49                         /sys/firmware/memmap/1/start
50                         ...
52                 Currently following types exist:
54                   - System RAM
55                   - ACPI Tables
56                   - ACPI Non-volatile Storage
57                   - reserved
59                 Following shell snippet can be used to display that memory
60                 map in a human-readable format:
62                 -------------------- 8< ----------------------------------------
63                   #!/bin/bash
64                   cd /sys/firmware/memmap
65                   for dir in * ; do
66                       start=$(cat $dir/start)
67                       end=$(cat $dir/end)
68                       type=$(cat $dir/type)
69                       printf "%016x-%016x (%s)\n" $start $[ $end +1] "$type"
70                   done
71                 -------------------- >8 ----------------------------------------