linux_dsm_epyc7002/arch/riscv
Paul Walmsley 474efecb65 riscv: modify the Image header to improve compatibility with the ARM64 header
Part of the intention during the definition of the RISC-V kernel image
header was to lay the groundwork for a future merge with the ARM64
image header.  One error during my original review was not noticing
that the RISC-V header's "magic" field was at a different size and
position than the ARM64's "magic" field.  If the existing ARM64 Image
header parsing code were to attempt to parse an existing RISC-V kernel
image header format, it would see a magic number 0.  This is
undesirable, since it's our intention to align as closely as possible
with the ARM64 header format.  Another problem was that the original
"res3" field was not being initialized correctly to zero.

Address these issues by creating a 32-bit "magic2" field in the RISC-V
header which matches the ARM64 "magic" field.  RISC-V binaries will
store "RSC\x05" in this field.  The intention is that the use of the
existing 64-bit "magic" field in the RISC-V header will be deprecated
over time.  Increment the minor version number of the file format to
indicate this change, and update the documentation accordingly.  Fix
the assembler directives in head.S to ensure that reserved fields are
properly zero-initialized.

Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
Reported-by: Palmer Dabbelt <palmer@sifive.com>
Reviewed-by: Palmer Dabbelt <palmer@sifive.com>
Cc: Atish Patra <atish.patra@wdc.com>
Cc: Karsten Merker <merker@debian.org>
Link: https://lore.kernel.org/linux-riscv/194c2f10c9806720623430dbf0cc59a965e50448.camel@wdc.com/T/#u
Link: https://lore.kernel.org/linux-riscv/mhng-755b14c4-8f35-4079-a7ff-e421fd1b02bc@palmer-si-x1e/T/#t
2019-09-13 19:03:52 -07:00
..
boot riscv: dts: fu540-c000: drop "timebase-frequency" 2019-07-31 12:26:10 -07:00
configs riscv: defconfig: Update the defconfig 2019-08-13 19:26:42 -07:00
include riscv: modify the Image header to improve compatibility with the ARM64 header 2019-09-13 19:03:52 -07:00
kernel riscv: modify the Image header to improve compatibility with the ARM64 header 2019-09-13 19:03:52 -07:00
lib RISC-V: Remove udivdi3 2019-08-08 16:05:38 -07:00
mm RISC-V updates for v5.3 2019-07-18 12:26:59 -07:00
net bpf, riscv: Enable zext optimization for more RV64G ALU ops 2019-07-05 23:55:41 +02:00
Kconfig RISC-V updates for v5.3 2019-07-18 12:26:59 -07:00
Kconfig.debug RISC-V: Remove EARLY_PRINTK support 2018-12-17 10:23:46 -08:00
Kconfig.socs riscv: select SiFive platform drivers with SOC_SIFIVE 2019-07-01 13:20:01 -07:00
Makefile riscv: drop unneeded -Wall addition 2019-07-17 10:25:10 +09:00