diff options
author | Anup Patel <anup.patel@wdc.com> | 2018-12-31 08:49:20 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2019-01-02 07:27:12 +0300 |
commit | e0d6914b3c40c1609ccf196fa448ea6880ff23d5 (patch) | |
tree | cb6636a9da04ea258adb177dbc5060e647ca72ae /include/sbi/sbi_scratch.h | |
parent | 24bfa687fc85f0c8b0b2ed60151e44e9b7c43d3b (diff) | |
download | opensbi-e0d6914b3c40c1609ccf196fa448ea6880ff23d5.tar.xz |
include: Move RISCV_SCRATCH_xyz defines to sbi_scratch.h
The struct sbi_scratch related defines RISCV_SCRATCH_xyz should
be in sbi_scratch.h so that we can keep these defines in-sync
with changes in struct sbi_scratch.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'include/sbi/sbi_scratch.h')
-rw-r--r-- | include/sbi/sbi_scratch.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/sbi/sbi_scratch.h b/include/sbi/sbi_scratch.h index d5c6f35..14c72a8 100644 --- a/include/sbi/sbi_scratch.h +++ b/include/sbi/sbi_scratch.h @@ -11,6 +11,21 @@ #define __SBI_SCRATCH_H__ #include <sbi/riscv_asm.h> + +#define SBI_SCRATCH_TMP0_OFFSET (0 * __SIZEOF_POINTER__) +#define SBI_SCRATCH_FW_START_OFFSET (1 * __SIZEOF_POINTER__) +#define SBI_SCRATCH_FW_SIZE_OFFSET (2 * __SIZEOF_POINTER__) +#define SBI_SCRATCH_NEXT_ARG1_OFFSET (3 * __SIZEOF_POINTER__) +#define SBI_SCRATCH_NEXT_ADDR_OFFSET (4 * __SIZEOF_POINTER__) +#define SBI_SCRATCH_NEXT_MODE_OFFSET (5 * __SIZEOF_POINTER__) +#define SBI_SCRATCH_WARMBOOT_ADDR_OFFSET (6 * __SIZEOF_POINTER__) +#define SBI_SCRATCH_PLATFORM_ADDR_OFFSET (7 * __SIZEOF_POINTER__) +#define SBI_SCRATCH_HARTID_TO_SCRATCH_OFFSET (8 * __SIZEOF_POINTER__) +#define SBI_SCRATCH_IPI_TYPE_OFFSET (9 * __SIZEOF_POINTER__) +#define SBI_SCRATCH_SIZE 256 + +#ifndef __ASSEMBLY__ + #include <sbi/sbi_types.h> struct sbi_scratch { @@ -33,3 +48,5 @@ struct sbi_scratch { ((void *)(sbi_scratch_thishart_ptr()->next_arg1)) #endif + +#endif |