Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 527C4C6FD1F for ; Sun, 19 Mar 2023 16:38:47 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5299B83CB4; Sun, 19 Mar 2023 17:38:45 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; secure) header.d=gmx.de header.i=xypron.glpk@gmx.de header.b="juZv8vrL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 249A3854D8; Sun, 19 Mar 2023 17:38:43 +0100 (CET) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DE13083AA4 for ; Sun, 19 Mar 2023 17:38:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1679243919; i=xypron.glpk@gmx.de; bh=y00QhM62UXbYl4jXsA5MszE9kwe9/zETILwRh8ITJ/M=; h=X-UI-Sender-Class:Date:Subject:To:References:From:In-Reply-To; b=juZv8vrLKhE/hdS61mvdr+VaSPvy1YH+cgkgSP5QIvBPKN1y0QBKeRwvTSZMpbVAB /OTAgJuSyLB0VtaCkZ7tG8etcB/MheaJPXAo3XB5DGtt8fEwaRvTJafSGuJTn6Ueva Qg2NF9UCfpoo8Ac640fTnGAMWKaHccGTlN7ZsxXr9ErTSTvbGGDDi88Dcvr0O+jt+F SxNc/73KaZZ77U/Lz0Diby0KQ0ME1H1+VlH0u7TiROaHrUm73uLkA9XYkc5Z74fP9U 4aWfuI+XL6hosKU9Q1ZKETvMLcdYZS/1OVE96hq+g1UXXsDeCF5rUD2TjGpLlkq9zP /tr5leI+qdFqg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.123.94] ([88.152.145.137]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1My36N-1qQn5742Od-00zVUS; Sun, 19 Mar 2023 17:38:39 +0100 Message-ID: Date: Sun, 19 Mar 2023 17:38:38 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH v2 09/12] doc: Add help for the efi command Content-Language: en-US To: Simon Glass , U-Boot Mailing List References: <20230310204903.416969-1-sjg@chromium.org> <20230310204903.416969-10-sjg@chromium.org> From: Heinrich Schuchardt In-Reply-To: <20230310204903.416969-10-sjg@chromium.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:vfgzoe3wdkifZXxUr51YCxlJzauVXuMfWTD/fZVJLb+9i9hdpuh PDph99Kfc5LJxcs3OH+NtT6PfOUVAXN+rVPfMmoeJfnwgZy/uEscB2iucVoOS0tEx3soiHz 2QRpk9AXGYkXtYZ/1sGYsT79COC9jU/zNuMub6izOcNE7Sj4B37BSQpRncT/xpJc6yBkrDC LiQWPXXoVXl4QEyjOTV6g== UI-OutboundReport: notjunk:1;M01:P0:gEZ0ucBJDhQ=;i3fRcojkot0xNlBfjBSGnsiVqZO GQROYe7AMuvJ1e1ygg4YQ6klj5l9qFKIv0eRSDBQVs14CdrM+o2/KMwomtHz1QcCcmHf5f6OO Bovh81rWJooqruCb7D+LiNWxPITIMoQhI1KQR6ySMkiHsYWXLJzVgtBDC4wZIq/77yVj0c8mp FWY69OgjkhSpaWZu6mLNtRFYRvEnAy7WG8URWQ9MB76Crk/klpWq0FRy/uVDL9RnvEzNBp6Sl zRiK+G0PC7GnnsZjza+VFL3UbuX18H/OURO24qO7mBEaTCo4i+zQPcB5MRpF96L0aaJKfq7AT NvurC7uSiPxoA/6d+sYvHm7h4NZaQNVHwHjQs1AV0PzoHW80b/sQ0boiBc74zo+ongoltswOO loDWL+Oo9ggAIWfl75u2tVz05GtMTj8oWnst15746OzWt0vSAiiw8J5UsiyndPNeg6knH1e/Y vPv4N9VVS9GauRr92ux4AP/RN7781MPriNYOw9NyNHCdMjZmFRIXd94L4iyJpus52pOBNy+WK qMc1tjr6BdzFrLF1dNxwNijvBFDUoNstcQ/LNG7E8iWWUrTGX3g7ChD5jvxezWDw6g2w7mUEI BnYZJVv6QkbQlbDRWDW9A7TpwGd0OvHcqO6ypyA7bz+2+w9fVStr3gW13sm+GQbkL9edJN9XB n8VVc4b7LPGDztKc/HKK4bkEZWgAuCn5VRulpeRT0jVcmOmTIBH4i2ggvGiM6NoAx7PJ3bW2p 1+JwEwi6aD5JB3XqrnoxZREUSbFHO4sPcd3GfjWSNjirlhcBLKXO5mbm7nGwv0EBRDge6Axke HcvOWz1b+/p9t/MBzPsFW+pJB4FWyvBJVYAltyFpinLnze+4sdIG/1haZfdn5qRsxf0lHEzKz zpDt8VBDchTDNP1YOnA6BeSdz9xC2/G/dlCJkiByYCzYRhkKsbiIzgLPXxEic+0G+EPxPFijw E32J1dOB8j98c9oLlcnzg7zmfpk= X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean On 3/10/23 21:48, Simon Glass wrote: > This command currently has no help. Add some. > > Signed-off-by: Simon Glass > --- > > (no changes since v1) > > doc/usage/cmd/efi.rst | 197 ++++++++++++++++++++++++++++++++++++++++++ > doc/usage/index.rst | 1 + > 2 files changed, 198 insertions(+) > create mode 100644 doc/usage/cmd/efi.rst > > diff --git a/doc/usage/cmd/efi.rst b/doc/usage/cmd/efi.rst > new file mode 100644 > index 00000000000..c029c423879 > --- /dev/null > +++ b/doc/usage/cmd/efi.rst > @@ -0,0 +1,197 @@ > +.. SPDX-License-Identifier: GPL-2.0+ > +.. Copyright 2020, Heinrich Schuchardt > + > +efi command > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +Synopsis > +-------- > + > +:: > + > + efi mem [all] > + > +Description > +----------- > + > +The *efi* command provides information about the EFI environment U-Boot= is > +running in, when it is started from EFI. > + > +When running as an EFI app, this command queries EFI boot services for = the > +information. When running as an EFI payload, EFI boot services have bee= n > +stopped, so it uses the information collected by the boot stub before t= hat > +happened. > + > +efi mem > +~~~~~~~ > + > +This shows the EFI memory map, sorted in order of physical address. > + > +This is normally a very large table. To help reduce the amount of detri= tus, > +boot-time memory is normally merged with conventional memory. Use the '= all' > +argument to show everything. > + > +The fields are as follows: > + > +# > + Entry number (sequentially from 0) > + > +Type > + Memory type. EFI has a large number of memory types. The type is sh= own in > + the format : where in is the format number in hex and is the > + name. > + > +Physical > + Physical address > + > +Virtual > + Virtual address > + > +Size > + Size of memory area in bytes > + > +Attributes > + Shows a code for memory attributes. The key for this is shown below= the > + table. > + > +Example > +------- > + > +:: > + > + =3D> efi mem > + EFI table at 0, memory map 000000001ad38b60, size 1260, key a79, ve= rsion 1, descr. size 0x30 > + # Type Physical Virtual Size Attributes > + 0 7:conv 0000000000 0000000000 00000a0000 f > + 00000a0000 0000060000 > + 1 7:conv 0000100000 0000000000 0000700000 f > + 2 a:acpi_nvs 0000800000 0000000000 0000008000 f > + 3 7:conv 0000808000 0000000000 0000008000 f > + 4 a:acpi_nvs 0000810000 0000000000 00000f0000 f > + 5 7:conv 0000900000 0000000000 001efef000 f > + 6 6:rt_data 001f8ef000 0000000000 0000100000 rf > + 7 5:rt_code 001f9ef000 0000000000 0000100000 rf > + 8 0:reserved 001faef000 0000000000 0000080000 f > + 9 9:acpi_reclaim 001fb6f000 0000000000 0000010000 f > + 10 a:acpi_nvs 001fb7f000 0000000000 0000080000 f > + 11 7:conv 001fbff000 0000000000 0000359000 f > + 12 6:rt_data 001ff58000 0000000000 0000020000 rf > + 13 a:acpi_nvs 001ff78000 0000000000 0000088000 f > + 0020000000 0090000000 > + 14 0:reserved 00b0000000 0000000000 0010000000 1 > + > + Attributes key: > + f: uncached, write-coalescing, write-through, write-back > + rf: uncached, write-coalescing, write-through, write-back, needs ru= ntime mapping > + 1: uncached > + *Some areas are merged (use 'all' to see) > + > + > + =3D> efi mem all > + EFI table at 0, memory map 000000001ad38bb0, size 1260, key a79, ve= rsion 1, descr. size 0x30 > + # Type Physical Virtual Size Attributes > + 0 3:bs_code 0000000000 0000000000 0000001000 f > + 1 7:conv 0000001000 0000000000 000009f000 f > + 00000a0000 0000060000 > + 2 7:conv 0000100000 0000000000 0000700000 f > + 3 a:acpi_nvs 0000800000 0000000000 0000008000 f > + 4 7:conv 0000808000 0000000000 0000008000 f > + 5 a:acpi_nvs 0000810000 0000000000 00000f0000 f > + 6 4:bs_data 0000900000 0000000000 0000c00000 f > + 7 7:conv 0001500000 0000000000 000aa36000 f > + 8 2:loader_data 000bf36000 0000000000 0010000000 f > + 9 4:bs_data 001bf36000 0000000000 0000020000 f > + 10 7:conv 001bf56000 0000000000 00021e1000 f > + 11 1:loader_code 001e137000 0000000000 00000c4000 f > + 12 7:conv 001e1fb000 0000000000 000009b000 f > + 13 1:loader_code 001e296000 0000000000 00000e2000 f > + 14 7:conv 001e378000 0000000000 000005b000 f > + 15 4:bs_data 001e3d3000 0000000000 000001e000 f > + 16 7:conv 001e3f1000 0000000000 0000016000 f > + 17 4:bs_data 001e407000 0000000000 0000016000 f > + 18 2:loader_data 001e41d000 0000000000 0000002000 f > + 19 4:bs_data 001e41f000 0000000000 0000828000 f > + 20 3:bs_code 001ec47000 0000000000 0000045000 f > + 21 4:bs_data 001ec8c000 0000000000 0000001000 f > + 22 3:bs_code 001ec8d000 0000000000 000000e000 f > + 23 4:bs_data 001ec9b000 0000000000 0000001000 f > + 24 3:bs_code 001ec9c000 0000000000 000002c000 f > + 25 4:bs_data 001ecc8000 0000000000 0000001000 f > + 26 3:bs_code 001ecc9000 0000000000 000000c000 f > + 27 4:bs_data 001ecd5000 0000000000 0000006000 f > + 28 3:bs_code 001ecdb000 0000000000 0000014000 f > + 29 4:bs_data 001ecef000 0000000000 0000001000 f > + 30 3:bs_code 001ecf0000 0000000000 000005b000 f > + 31 4:bs_data 001ed4b000 0000000000 000000b000 f > + 32 3:bs_code 001ed56000 0000000000 0000024000 f > + 33 4:bs_data 001ed7a000 0000000000 0000006000 f > + 34 3:bs_code 001ed80000 0000000000 0000010000 f > + 35 4:bs_data 001ed90000 0000000000 0000002000 f > + 36 3:bs_code 001ed92000 0000000000 0000025000 f > + 37 4:bs_data 001edb7000 0000000000 0000003000 f > + 38 3:bs_code 001edba000 0000000000 0000011000 f > + 39 4:bs_data 001edcb000 0000000000 0000008000 f > + 40 3:bs_code 001edd3000 0000000000 000002d000 f > + 41 4:bs_data 001ee00000 0000000000 0000201000 f > + 42 3:bs_code 001f001000 0000000000 0000024000 f > + 43 4:bs_data 001f025000 0000000000 0000002000 f > + 44 3:bs_code 001f027000 0000000000 0000009000 f > + 45 4:bs_data 001f030000 0000000000 0000005000 f > + 46 3:bs_code 001f035000 0000000000 000002f000 f > + 47 4:bs_data 001f064000 0000000000 0000001000 f > + 48 3:bs_code 001f065000 0000000000 0000005000 f > + 49 4:bs_data 001f06a000 0000000000 0000005000 f > + 50 3:bs_code 001f06f000 0000000000 0000007000 f > + 51 4:bs_data 001f076000 0000000000 0000007000 f > + 52 3:bs_code 001f07d000 0000000000 000000d000 f > + 53 4:bs_data 001f08a000 0000000000 0000001000 f > + 54 3:bs_code 001f08b000 0000000000 0000006000 f > + 55 4:bs_data 001f091000 0000000000 0000004000 f > + 56 3:bs_code 001f095000 0000000000 000000d000 f > + 57 4:bs_data 001f0a2000 0000000000 0000003000 f > + 58 3:bs_code 001f0a5000 0000000000 0000026000 f > + 59 4:bs_data 001f0cb000 0000000000 0000005000 f > + 60 3:bs_code 001f0d0000 0000000000 0000019000 f > + 61 4:bs_data 001f0e9000 0000000000 0000004000 f > + 62 3:bs_code 001f0ed000 0000000000 0000024000 f > + 63 4:bs_data 001f111000 0000000000 0000008000 f > + 64 3:bs_code 001f119000 0000000000 000000b000 f > + 65 4:bs_data 001f124000 0000000000 0000001000 f > + 66 3:bs_code 001f125000 0000000000 0000002000 f > + 67 4:bs_data 001f127000 0000000000 0000002000 f > + 68 3:bs_code 001f129000 0000000000 0000009000 f > + 69 4:bs_data 001f132000 0000000000 0000003000 f > + 70 3:bs_code 001f135000 0000000000 0000005000 f > + 71 4:bs_data 001f13a000 0000000000 0000003000 f > + 72 3:bs_code 001f13d000 0000000000 0000005000 f > + 73 4:bs_data 001f142000 0000000000 0000003000 f > + 74 3:bs_code 001f145000 0000000000 0000011000 f > + 75 4:bs_data 001f156000 0000000000 000000b000 f > + 76 3:bs_code 001f161000 0000000000 0000009000 f > + 77 4:bs_data 001f16a000 0000000000 0000400000 f > + 78 3:bs_code 001f56a000 0000000000 0000006000 f > + 79 4:bs_data 001f570000 0000000000 0000001000 f > + 80 3:bs_code 001f571000 0000000000 0000001000 f > + 81 4:bs_data 001f572000 0000000000 0000002000 f > + 82 3:bs_code 001f574000 0000000000 0000017000 f > + 83 4:bs_data 001f58b000 0000000000 0000364000 f > + 84 6:rt_data 001f8ef000 0000000000 0000100000 rf > + 85 5:rt_code 001f9ef000 0000000000 0000100000 rf > + 86 0:reserved 001faef000 0000000000 0000080000 f > + 87 9:acpi_reclaim 001fb6f000 0000000000 0000010000 f > + 88 a:acpi_nvs 001fb7f000 0000000000 0000080000 f > + 89 4:bs_data 001fbff000 0000000000 0000201000 f > + 90 7:conv 001fe00000 0000000000 00000e8000 f > + 91 4:bs_data 001fee8000 0000000000 0000020000 f > + 92 3:bs_code 001ff08000 0000000000 0000026000 f > + 93 4:bs_data 001ff2e000 0000000000 0000009000 f > + 94 3:bs_code 001ff37000 0000000000 0000021000 f > + 95 6:rt_data 001ff58000 0000000000 0000020000 rf > + 96 a:acpi_nvs 001ff78000 0000000000 0000088000 f > + 0020000000 0090000000 > + 97 0:reserved 00b0000000 0000000000 0010000000 1 Why should we use a different output format then in efi_debug memmap=3D We should avoid duplicate code. Best regrads Heinrich > + > + Attributes key: > + f: uncached, write-coalescing, write-through, write-back > + rf: uncached, write-coalescing, write-through, write-back, needs ru= ntime mapping > + 1: uncached > diff --git a/doc/usage/index.rst b/doc/usage/index.rst > index 840c20c934d..9f7a80e3bfe 100644 > --- a/doc/usage/index.rst > +++ b/doc/usage/index.rst > @@ -43,6 +43,7 @@ Shell commands > cmd/dm > cmd/ebtupdate > cmd/echo > + cmd/efi > cmd/eficonfig > cmd/env > cmd/event