Pull RISC-V fixes from Palmer Dabbelt: - A fix to align kexec'd kernels to PMD boundries - The T-Head dcache.cva encoding was incorrect, it has been fixed to invalidate all caches (as opposed to just the L1) * tag 'riscv-for-linus-6.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: errata: fix T-Head dcache.cva encoding riscv: kexec: Align the kexeced kernel entry
Unified · Split
| @@ -105,7 +105,7 @@ asm volatile(ALTERNATIVE( \ · 104 unmodified lines | ||
| 105 | 105 | * | 31 - 25 | 24 - 20 | 19 - 15 | 14 - 12 | 11 - 7 | 6 - 0 | |
| 106 | 106 | * 0000001 01001 rs1 000 00000 0001011 |
| 107 | 107 | * dcache.cva rs1 (clean, virtual address) |
| 108 | − * 0000001 00100 rs1 000 00000 0001011 | |
| 108 | + * 0000001 00101 rs1 000 00000 0001011 | |
| 109 | 109 | * |
| 110 | 110 | * dcache.cipa rs1 (clean then invalidate, physical address) |
| 111 | 111 | * | 31 - 25 | 24 - 20 | 19 - 15 | 14 - 12 | 11 - 7 | 6 - 0 | |
| @@ -118,7 +118,7 @@ asm volatile(ALTERNATIVE( \ · 6 unmodified lines | ||
| 118 | 118 | * 0000000 11001 00000 000 00000 0001011 |
| 119 | 119 | */ |
| 120 | 120 | #define THEAD_inval_A0 ".long 0x0265000b" |
| 121 | −#define THEAD_clean_A0 ".long 0x0245000b" | |
| 121 | +#define THEAD_clean_A0 ".long 0x0255000b" | |
| 122 | 122 | #define THEAD_flush_A0 ".long 0x0275000b" |
| 123 | 123 | #define THEAD_SYNC_S ".long 0x0190000b" |
| 124 | 124 | |
| @@ -98,7 +98,13 @@ static int elf_find_pbase(struct kimage *image, unsigned long kernel_len, · 97 unmodified lines | ||
| 98 | 98 | kbuf.image = image; |
| 99 | 99 | kbuf.buf_min = lowest_paddr; |
| 100 | 100 | kbuf.buf_max = ULONG_MAX; |
| 101 | − kbuf.buf_align = PAGE_SIZE; | |
| 101 | + | |
| 102 | + /* | |
| 103 | + * Current riscv boot protocol requires 2MB alignment for | |
| 104 | + * RV64 and 4MB alignment for RV32 | |
| 105 | + * | |
| 106 | + */ | |
| 107 | + kbuf.buf_align = PMD_SIZE; | |
| 102 | 108 | kbuf.mem = KEXEC_BUF_MEM_UNKNOWN; |
| 103 | 109 | kbuf.memsz = ALIGN(kernel_len, PAGE_SIZE); |
| 104 | 110 | kbuf.top_down = false; |