summaryrefslogtreecommitdiff
path: root/cheri
AgeCommit message (Collapse)Author
2018-04-18fix bug in permissions test of ctestsubset.Robert Norton
2018-04-12remove cheri128 backwards compatibility hack that extended ↵Robert Norton
access_system_regs perm into bits 14-11 -- it looks like spec is heading that way.
2018-04-12implement new permit_unseal used for CUnseal instead of permit_seal.Robert Norton
2018-04-12add a cheri_trace target for conveniently building a debug build.Robert Norton
2018-04-12Add implementations of CReadHwr and CWriteHwrRobert Norton
2018-04-09cheri: compute virtual address mod 2^64 when doing bounds check to avoid ↵Robert Norton
failures with negative (i.e. large positive) offsets.
2018-04-04Fix another infinite loop in cast bit_to_bool. Following introduction of ↵Robert Norton
eq_bool this was preferred over eq_bit when compiling the match on bit in bit_to_bool... Fix is to overload == before including flow.sail but feels a bit inelegant.
2018-03-27remove some unneeded else clauses.Robert Norton
2018-03-22Fix cheri MakefileAlasdair Armstrong
2018-03-22Fix C compilation for CHERI and MIPSAlasdair Armstrong
First, the specialisation of option types has been fixed by allowing the specialisation of constructor return types - this essentially means that a constructor, such as Some : 'a -> option('a) can get specialised to int -> option(int), rather than int -> option('a). This means that these constructors are treated like GADTs internally. Since this only happens just before the C translation, I haven't put much effort into making this very robust so far. Second, there was a bug in C compilation for the typing of return expressions in non-unit contexts, which has been fixed. Finally support for vector literals that are non-bitvectors has been added.
2018-03-21Patch AST datatypes in generated Isabelle theoriesThomas Bauereiss
Deactivate plugins of the datatype package except for the size plugin in order to keep processing time reasonable. This is currently only needed for the big AST datatypes, so we just patch this using a sed command.
2018-03-15Some CHERI compilation fixesThomas Bauereiss
2018-03-14Add and use execute_branch and execute_branch_pcc functions to align code ↵Robert Norton
with existing MIPS and CHERI specs.
2018-03-14rename EXTS and EXTZ to sign_extend and zero_extend because it is more ↵Robert Norton
obviosu and to more closely match existing cheri pseudocode.
2018-03-14Fix Lem generation for CHERI-MIPS and Aarch64Thomas Bauereiss
- Update Lem bindings and extras files - Rewrite Nexp_var's if they are bound to a constant, similar to Nexp_id's (used for cap_size in the CHERI spec) - Add Lem and Isabelle Makefile targets for CHERI
2018-03-14minor cleanup of load -- we no longer need to separate out by access size ↵Robert Norton
because the type checker is more clever.
2018-03-14add extract of ccseal instruction.Robert Norton
2018-03-14Add extract of some new instructions for including into CHERI documentation.Robert Norton
2018-03-08rename mips_new_tc to mipsRobert Norton
2018-03-08make HighestSetBit return option now that it can type check.Robert Norton
2018-03-07Fix cheri and mips following 1fe8f33fce5aaaaea82fc54b6d198ffc9d7e1eeb which ↵Robert Norton
requires syntax change for unit constructors of union types.
2018-03-06Add missing checks for permit_load and permit_store in capability load/store ↵Robert Norton
instructions. Fixes fairly long-standing hole in architecture spotted by Kyndylan.
2018-03-06Check tag of pcc in TranslatePC. This could happen after an ERET with ↵Robert Norton
untagged EPCC. ISA says this results in undefined behaviour but it should probably not permit execution of code with untagged PCC.
2018-03-06overload shift operators so they can be used with integer shifts in cheri128 ↵Robert Norton
definitions.
2018-03-06finish port of cheri128 spec. to sail2.Robert Norton
2018-03-02remove workaround for #8 now that it is fixed.Robert Norton
2018-03-02work around bug in ocaml foreach generation -- end point not included in ↵Robert Norton
loop (see #8).
2018-03-02add a cp2_next_pc function to update cheri state in fde loop and a stub ↵Robert Norton
version for mips.
2018-03-02add space in cap dump format to match that expected by test framework.Robert Norton
2018-03-02cheri tests expect reserved permission bits to be initialised to one.Robert Norton
2018-03-01Add support for read_tag and write_tag in sail_lib.ml. and support for ↵Robert Norton
intialising and dumping CHERI state. Somewhat working cheri sail2 model.
2018-03-01cheri wip.Robert Norton
2018-02-06immediate for CIncOffsetImmediate must be treated as signed (fixes ↵Robert Norton
test_cp2_rep_underflow).
2017-12-06Make CHERI spec type-check againThomas Bauereiss
2017-11-30Merge branch 'master' into experimentsAlasdair Armstrong
2017-11-07Declare prelude functions as externThomas Bauereiss
Also, rename a few functions for uniformity, e.g. bool_and -> and_bool
2017-11-01workaound for another odd interpreter error where top level let variable got ↵Robert Norton
truncated to 64 bits...
2017-10-31work around interpreter crash by adding cast. Likely this kind of thing will ↵Robert Norton
be resolved by merge of new_tc branch.
2017-10-31cheri: throw an exception if there is an attempt to access C26/IDC in the ↵Robert Norton
delay slot of a ccall selector 1 call.
2017-10-31cheri: ccall selector 1 should have a branch delay slot. TODO we need to ↵Robert Norton
throw exception for access to IDC/C26 in branch delay slot.
2017-10-24fix default cap value on cheri128 following previous changes -- E stored in ↵Robert Norton
registers is no longer xored with 48 so need to initialise it. Also use E and T values used by CHERI hw and adjust decoding functions appropriately. Fix shift functions for ocaml shallow embedding which failed to handle shifts greater than vector length.
2017-10-23cheri: Null capability should have maximum length, because in cheri128 we ↵Robert Norton
want all offsets to be representable. To maintain all-zeros as the in-memory representation of the null capability we xor memory bits with null capability when loading and storing.
2017-10-16add CTestSubset instruction.Robert Norton
2017-10-16add missing new encodings for CJR and CJALR.Robert Norton
2017-10-16implement CMove as an alias for cmovz with zero register.Robert Norton
2017-10-16add support for CIncOffsetImmediate and CSetBoundsImmediate.Robert Norton
2017-10-16add support for capability branch null instructions.Robert Norton
2017-10-13Add support for new cheri instruction encodings. The order of pattern ↵Robert Norton
matching is now significant because register no. fields are re-used as additional function codes in operations with fewer operands so I pulled out all decode clauses to the beginning of file for easier rearranging. Old encodings can co-exist with new encodings as the only overlap is for recently added instructions which already use the new scheme. Eventually the old encodings will go away, however, and the opcode space may be reclaimed."
2017-10-02cheri: fix swapped cmovz and cmovn.Robert Norton
2017-08-29Make Lem export of CHERI(-256) typecheckThomas Bauereiss
Note: The effect annotations of the execute function differ between CHERI and MIPS, so I split out a new file mips_ast_decl.sail for MIPS with just the initial declarations of ast, decode, and execute (with the right effects for MIPS).