Skip to content

Commit 1d5c17e

Browse files
Atish PatraJonathan Corbet
authored andcommitted
RISC-V: Typo fixes in image header and documentation.
There are some typos in boot image header and riscv boot documentation. Fix the typos. Signed-off-by: Atish Patra <atish.patra@wdc.com> Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com> Link: https://lore.kernel.org/r/20191009010637.9955-1-atish.patra@wdc.com Signed-off-by: Jonathan Corbet <corbet@lwn.net>
1 parent eb43135 commit 1d5c17e

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎Documentation/riscv/boot-image-header.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The following 64-byte header is present in decompressed Linux kernel image::
2222
u64 res2 = 0; /* Reserved */
2323
u64 magic = 0x5643534952; /* Magic number, little endian, "RISCV" */
2424
u32 magic2 = 0x05435352; /* Magic number 2, little endian, "RSC\x05" */
25-
u32 res4; /* Reserved for PE COFF offset */
25+
u32 res3; /* Reserved for PE COFF offset */
2626

2727
This header format is compliant with PE/COFF header and largely inspired from
2828
ARM64 header. Thus, both ARM64 & RISC-V header can be combined into one common
@@ -34,7 +34,7 @@ Notes
3434
- This header can also be reused to support EFI stub for RISC-V in future. EFI
3535
specification needs PE/COFF image header in the beginning of the kernel image
3636
in order to load it as an EFI application. In order to support EFI stub,
37-
code0 should be replaced with "MZ" magic string and res5(at offset 0x3c) should
37+
code0 should be replaced with "MZ" magic string and res3(at offset 0x3c) should
3838
point to the rest of the PE/COFF header.
3939

4040
- version field indicate header version number

‎arch/riscv/include/asm/image.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
* @res2: reserved
4343
* @magic: Magic number (RISC-V specific; deprecated)
4444
* @magic2: Magic number 2 (to match the ARM64 'magic' field pos)
45-
* @res4: reserved (will be used for PE COFF offset)
45+
* @res3: reserved (will be used for PE COFF offset)
4646
*
4747
* The intention is for this header format to be shared between multiple
4848
* architectures to avoid a proliferation of image header formats.
@@ -59,7 +59,7 @@ struct riscv_image_header {
5959
u64 res2;
6060
u64 magic;
6161
u32 magic2;
62-
u32 res4;
62+
u32 res3;
6363
};
6464
#endif /* __ASSEMBLY__ */
6565
#endif /* _ASM_RISCV_IMAGE_H */

0 commit comments

Comments
 (0)