diff options
author | Yunsup Lee <yunsup@cs.berkeley.edu> | 2013-11-13 18:09:40 -0800 |
---|---|---|
committer | Yunsup Lee <yunsup@cs.berkeley.edu> | 2013-11-13 18:09:40 -0800 |
commit | f4e14a7a3a45ff4ef2af09696e0a2238f1227ca2 (patch) | |
tree | 9b514421529f3ee45f792627df4a7634fda9508a /env/p | |
parent | ecd97be4c4993b586cd15b5096ab614142fe4db4 (diff) | |
download | riscv-tests-f4e14a7a3a45ff4ef2af09696e0a2238f1227ca2.zip riscv-tests-f4e14a7a3a45ff4ef2af09696e0a2238f1227ca2.tar.gz riscv-tests-f4e14a7a3a45ff4ef2af09696e0a2238f1227ca2.tar.bz2 |
split out envs from riscv-tests
Diffstat (limited to 'env/p')
-rw-r--r-- | env/p/link.ld | 44 | ||||
-rw-r--r-- | env/p/riscv_test.h | 117 |
2 files changed, 0 insertions, 161 deletions
diff --git a/env/p/link.ld b/env/p/link.ld deleted file mode 100644 index 6b19389..0000000 --- a/env/p/link.ld +++ /dev/null @@ -1,44 +0,0 @@ -/*======================================================================*/ -/* Proxy kernel linker script */ -/*======================================================================*/ -/* This is the linker script used when building the proxy kernel. */ - -/*----------------------------------------------------------------------*/ -/* Setup */ -/*----------------------------------------------------------------------*/ - -/* The OUTPUT_ARCH command specifies the machine architecture where the - argument is one of the names used in the BFD library. More - specifically one of the entires in bfd/cpu-mips.c */ - -OUTPUT_ARCH( "riscv" ) - -/* The ENTRY command specifies the entry point (ie. first instruction - to execute). The symbol _start should be defined in each test. */ - -ENTRY( _start ) - -/*----------------------------------------------------------------------*/ -/* Sections */ -/*----------------------------------------------------------------------*/ - -SECTIONS -{ - - /* text: test code section */ - . = 0x00002000; - .text : - { - *(.text) - } - - /* data: Initialized data segment */ - .data : - { - *(.data) - } - - /* End of uninitalized data segement */ - _end = .; -} - diff --git a/env/p/riscv_test.h b/env/p/riscv_test.h deleted file mode 100644 index 8cc7955..0000000 --- a/env/p/riscv_test.h +++ /dev/null @@ -1,117 +0,0 @@ -#ifndef _ENV_PHYSICAL_SINGLE_CORE_H -#define _ENV_PHYSICAL_SINGLE_CORE_H - -#include "../pcr.h" -#include "../hwacha_xcpt.h" - -//----------------------------------------------------------------------- -// Begin Macro -//----------------------------------------------------------------------- - -#define RVTEST_RV64U \ - .macro init; \ - .endm - -#define RVTEST_RV64UF \ - .macro init; \ - RVTEST_FP_ENABLE; \ - .endm - -#define RVTEST_RV64UV \ - .macro init; \ - RVTEST_FP_ENABLE; \ - RVTEST_VEC_ENABLE; \ - .endm - -#define RVTEST_RV32U \ - .macro init; \ - RVTEST_32_ENABLE; \ - .endm - -#define RVTEST_RV32UF \ - .macro init; \ - RVTEST_32_ENABLE; \ - RVTEST_FP_ENABLE; \ - .endm - -#define RVTEST_RV32UV \ - .macro init; \ - RVTEST_32_ENABLE; \ - RVTEST_FP_ENABLE; \ - RVTEST_VEC_ENABLE; \ - .endm - -#define RVTEST_RV64S \ - .macro init; \ - .endm - -#define RVTEST_32_ENABLE \ - clearpcr status, SR_S64 \ - -#define RVTEST_FP_ENABLE \ - setpcr status, SR_EF; \ - mfpcr a0, status; \ - and a0, a0, SR_EF; \ - bnez a0, 2f; \ - RVTEST_PASS; \ -2:fssr x0; \ - -#define RVTEST_VEC_ENABLE \ - setpcr status, SR_EA; \ - mfpcr a0, status; \ - and a0, a0, SR_EA; \ - bnez a0, 2f; \ - RVTEST_PASS; \ -2: \ - -#define RISCV_MULTICORE_DISABLE \ - mfpcr a0, hartid; 1: bnez a0, 1b; \ - -#define EXTRA_INIT - -#define RVTEST_CODE_BEGIN \ - .text; \ - .align 4; \ - .global _start; \ -_start: \ - RISCV_MULTICORE_DISABLE; \ - init; \ - EXTRA_INIT; \ - -//----------------------------------------------------------------------- -// End Macro -//----------------------------------------------------------------------- - -#define RVTEST_CODE_END \ - -//----------------------------------------------------------------------- -// Pass/Fail Macro -//----------------------------------------------------------------------- - -#define RVTEST_PASS \ - fence; \ - li x1, 1; \ - mtpcr x1, tohost; \ -1: b 1b; \ - -#define RVTEST_FAIL \ - fence; \ - beqz x28, 1f; \ - sll x28, x28, 1; \ - or x28, x28, 1; \ - mtpcr x28, tohost; \ -1: b 1b; \ - -//----------------------------------------------------------------------- -// Data Section Macro -//----------------------------------------------------------------------- - -#define RVTEST_DATA_BEGIN EXTRA_DATA -#define RVTEST_DATA_END - -#define EXTRA_DATA - -//#define RVTEST_DATA_BEGIN .align 4; .global begin_signature; begin_signature: -//#define RVTEST_DATA_END .align 4; .global end_signature; end_signature: - -#endif |