1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * XIP fixup macros, only useful in assembly.
5 #ifndef _ASM_RISCV_XIP_FIXUP_H
6 #define _ASM_RISCV_XIP_FIXUP_H
8 #include <linux/pgtable.h>
10 #ifdef CONFIG_XIP_KERNEL
11 .macro XIP_FIXUP_OFFSET reg
15 .macro XIP_FIXUP_FLASH_OFFSET reg
17 REG_L t1, _xip_phys_offset
22 _xip_fixup: .dword CONFIG_PHYS_RAM_BASE - CONFIG_XIP_PHYS_ADDR - XIP_OFFSET
23 _xip_phys_offset: .dword CONFIG_XIP_PHYS_ADDR + XIP_OFFSET
25 .macro XIP_FIXUP_OFFSET reg
27 .macro XIP_FIXUP_FLASH_OFFSET reg
29 #endif /* CONFIG_XIP_KERNEL */