Linux_SDK_V1.3.3

Signed-off-by: thead_admin <occ_thead@service.alibaba.com>
This commit is contained in:
thead_admin
2023-11-14 01:42:23 +00:00
committed by Han Gao/Revy/Rabenda
parent d16b0e0a00
commit d35408efb1
16 changed files with 660 additions and 24 deletions

View File

@@ -162,6 +162,19 @@ void csr_write_num(int csr_num, unsigned long val);
__asm__ __volatile__("ebreak" ::: "memory"); \
} while (0)
#define dcache_call() \
do { \
asm volatile(".long 0x0010000b\n"); \
} while (0)
#define dcache_ciall() \
do { \
asm volatile(".long 0x0030000b\n"); \
} while (0)
#define sync_is() asm volatile (".long 0x01b0000b")
/* Get current HART id */
#define current_hartid() ((unsigned int)csr_read(CSR_MHARTID))

View File

@@ -98,7 +98,7 @@ int sbi_scratch_init(struct sbi_scratch *scratch);
* @return zero on failure and non-zero (>= SBI_SCRATCH_EXTRA_SPACE_OFFSET)
* on success
*/
unsigned long sbi_scratch_alloc_offset(unsigned long size, const char *owner);
unsigned long sbi_scratch_alloc_offset(unsigned long size);
/** Free-up extra space in sbi_scratch */
void sbi_scratch_free_offset(unsigned long offset);