Commit graph

49 commits

Author SHA1 Message Date
Japheth Lim
c517dba449 bitfield_gen: write output files atomically 2016-06-19 21:32:49 +10:00
Adrian Danis
cf8be6639f tools: Remove arithmetic in invocation generation
If invocations are hidden behind config guards the count of how
many invocations there are will be wrong. The C compiler will
correctly assign the value with enum auto numbering, so there's
no need to override that here
2016-06-16 15:36:00 +10:00
Anna Lyons
9fca296f8a tools: emit error if first invocation conditional
Placing a config condition on the first define
in sel4arch.xml will fail as currently the first define
must start at the last define + 1 of the previous
invocation enum.

If this is ever required, autoconf.h will need to be passed
to the script so it can check config variables itself.
2016-06-16 10:43:56 +10:00
Anna Lyons
73837c8ace tools: add conditional invocation label defines 2016-06-16 10:38:29 +10:00
Matthew Fernandez
7a9b81d237 Revert "bf gen: Add a backend for AutoCorres."
This reverts commit 5ee3971563. This backend was
previously used in an experiment towards libsel4 verification. That project has
since adopted a different strategy and this backend is now unused. Meanwhile
the backend has lagged behind breaking changes to AutoCorres. This commit
removes the backend to avoid confusion from users who believe it to be
functional.
2016-06-06 16:55:41 +10:00
Thomas Sewell
bea92de3b9 Verification: adjust use of new bf proof features.
Apologies, some final adjustments got lost in the previous pull
request round. This version actually works.
2016-03-21 18:14:40 +11:00
Thomas Sewell
13715658aa Verification: bf: use new proof features.
The plan here is to move some of the proof script complexity embedded
in the text of the bitfield_gen utility into generic proof helpers in the
l4v repository that bitfield_gen can use more modularly. This is a simple
first step.
2016-03-21 10:45:41 +11:00
Corey Richardson
4b043d767f
tools: syscall_header_gen: print an error to stderr that wasn't 2016-01-25 15:56:34 +11:00
Corey Richardson
41d98e45c0
tools: bitfield_gen: use six to access range (py3) or xrange (py2) 2016-01-25 15:56:33 +11:00
Corey Richardson
8ab5e037d5
tools: bitfield_gen: use itertools.chain instead of concatenating lists
This isn't efficient in Python, and moreover in python3 these methods
return iterables, not lists.
2016-01-25 15:56:33 +11:00
Corey Richardson
486aefc266
tools: bitfield_gen: use integral (//) instead of duck-typed division (/) 2016-01-25 15:56:32 +11:00
Corey Richardson
6ad2273005
tools: bitfield_gen: iterable->list for optparse 2016-01-25 15:56:31 +11:00
Corey Richardson
22a1c15aa9
tools: bitfield_gen: use '... in ...' instead of dict.has_key 2016-01-25 15:56:30 +11:00
Corey Richardson
424e74e83a
tools: bitfield_gen: use print_function 2016-01-25 15:56:18 +11:00
Corey Richardson
703dcaca32
tools: bitfield_gen: remove trailing whitespace 2016-01-25 15:56:16 +11:00
Corey Richardson
141290eb48
tools: yacc: fix broken python3 compatability hack
This module seems to be extracted from a larger package that expects
some structure to be in place that isn't here. Patch up the check
slightly to work here, and also maybe elsewhere?
2016-01-25 15:56:15 +11:00
Corey Richardson
d71b7ae5c6
tools: yacc: remove trailing whitespace 2016-01-25 15:56:15 +11:00
Corey Richardson
90ac09c23e
tools: syscall_header_gen: python3 compat 2016-01-25 15:54:41 +11:00
Corey Richardson
9fa4457a84
tools: syscall_header_gen: remove trailing whitespace 2016-01-25 15:54:40 +11:00
Corey Richardson
db3c54ec07
tools: bf_autocorres: python3 compat 2016-01-25 15:54:39 +11:00
Corey Richardson
36e8b1d494
tools: invocation_header_gen: python3 compat 2016-01-25 15:42:06 +11:00
Corey Richardson
1234892209
tools: invocation_header_gen: remove trailing whitespace 2016-01-25 15:42:05 +11:00
Corey Richardson
9d6edfa286
tools: umm: python3 compat 2016-01-25 15:42:04 +11:00
Corey Richardson
e8665db6d8
tools: umm: remove trailing whitespace 2016-01-25 15:42:03 +11:00
Adrian Danis
2dd0a4d5e1 libsel4: Explicitly generate number of invocation labels to handle case where there are no invocations 2016-01-13 14:08:22 +11:00
Adrian Danis
44a522dce2 libsel4: Generate libsel4 definitions from the current ARCH as well as the SEL4_ARCH 2016-01-08 10:16:30 +11:00
Anna Lyons
7758899844 SELFOUR-244: symlink duplicated files from libsel4 into kernel rather than duplicating them, remove sanity target as a result 2016-01-05 08:33:39 +11:00
Adrian Danis
0e3afb487b libsel4: use seL4_Word for object types and update the sanity script to match word_t to seL4_Word 2015-12-10 16:08:39 +11:00
Joel Beeren
94b0216258 conversion: fixed bitfield generator, clz spec 2015-12-10 10:45:22 +11:00
Adrian Danis
6474aceaf0 Change types from uint32_t->word_t to be 32/64bit agnostic 2015-12-10 10:45:18 +11:00
Adrian Danis
63ee2b127b Modify sanity script to be ignostic over the difference between
seL4_UintXX types and uintXX_t types
2015-12-02 15:37:42 +11:00
Anna Lyons
9f19b8668a Add a sanity check to make sure constants shared between kernel and user are the same 2015-12-02 15:37:42 +11:00
Adrian Danis
7d3622f098 bitfield: Correct assertions when using sign extended bases 2015-12-02 11:45:45 +11:00
Anna Lyons
259f0a47f9 Merge pull request #140 from ssherratt/features2
Added support for using multiple tracepoints at the same time.
2015-09-08 11:20:58 +10:00
Matthew Fernandez
47c1bee590 tools: Remove some unnecessary Python imports. 2015-09-04 15:58:44 +10:00
Stephen Sherratt
bea651d6c2 Config sections in syscall.xml files take a condition which is passed to #if. 2015-09-03 11:39:31 +10:00
Wink Saville
e653f8f65a Streamline libsel4 and remove its libc dependencies.
There are now separate libs for benchmark, assert, printf, putchar
start/stop:

      libs/libsel4benchmark
      libs/libsel4assert
      libs/libsel4printf
      libs/libsel4putchar
      libs/libsel4startstop

The primary changes are introducing sel4/sel4.h and removing std* types
plus porting assert and IO code from the kernel to libsel4assert,
libsel4printf, libsel4putchar.

This means the code within libsel4 and the newlibs do not overload any
typical libc entities. Instead the libraries use types like
seL4_Uint32 ... instead of uint32_t. And printf is now seL4_Printf and
assert is seL4_Assert ....

Finally, the only file modified that effects kernel code is
kernel/tools/bitfield_gen.py. It needed to be modified as it generates
files for both kernel and user space. And for user space the generated code
(types_gen.h) needed to use the new types and asserts. The changes should
not change what is generated for the kernel and I did a comparison of
kernel_final.{c|s} before and after my change and the only differences
were time stamps.

Bug: #15 Streamline kernel/libsel4 and remove its libc dependencies
2015-07-09 18:03:46 -07:00
Adrian Danis
8e5921c6a7 bitfield: Allow for controlling how many bits of a word are actually used, and whether the rest of the bits are signed extended or not 2015-06-22 14:42:41 +10:00
Adrian Danis
f8ea6f22b9 bitfield: Allow for using different bases throughout a bitfield file 2015-06-22 11:58:11 +10:00
Adrian Danis
a34bc7de30 bitfield: Extend bitfield generator to add a size suffix onto constant mask values 2015-06-22 11:57:52 +10:00
Matthew Fernandez
5ee3971563 bf gen: Add a backend for AutoCorres.
This commit adds a two new output targets for the bitfield generator,
--autocorres-defs and --autocorres-proofs. These produce, respectively,
abstract definitions of the generated C functions suitable for use in
AutoCorres proofs and WP/simp lemmas suitable for use within AutoCorres proofs
of functions that call the generated C functions. Existing behaviour and
functionality should be unaffected.
2014-11-06 15:07:20 +11:00
Matthew Fernandez
701b3bfff4 bf gen: Fix: Check UMM types is known before generating HOL proofs. 2014-11-06 10:52:17 +11:00
Matthew Fernandez
9e6750e8a4 bf gen: Fix: Prevent using stdout when writing HOL defs/proofs.
Stdout is not suitable as an output target for these things.
2014-11-06 10:52:06 +11:00
Matthew Fernandez
1d51025fe8 bf gen: Removed some undefined bit shifts.
The bitfield generator constructs tags as enums. The compiler is free to back
these by any type big enough to cover the enum. The generator emits code that
uses these tag values in mask and shift operations where the target type is
typically a uint32_t. As a result, it can produce code involving undefined
shifts like:

 (seL4_CapData_Badge & 0x1) << 31

This commit casts the tag value to the unsigned target type before masking to
ensure everything is done on an appropriate sized unsigned type.

JIRA: SELFOUR-193
2014-10-28 16:48:26 +11:00
Matthew Fernandez
3b6321f28a bf gen: Fix missing include.
The bitfield generator uses the macros CONST and PURE which, for libsel4, are
defined in macros.h.
2014-10-28 11:41:14 +11:00
Matthew Fernandez
03ee240ef1 bf gen: Fix whitespace in constructors and getters. 2014-10-27 13:58:22 +11:00
Adrian Danis
7d877465de ia32: Move as much of the interrupt and syscall traps into C as possible 2014-08-12 14:00:28 +10:00
Max R.D. Parmer
da5ec79cf9 Use usr/bin/env for all python bangpaths to enable virtualenv use.
Very useful with python3 as the default platform.
2014-08-03 18:53:14 -07:00
TrusthworthySystems
91b7da8625 Release snapshot 2014-07-18 05:03:59 +10:00