diff options
author | Justin T. Gibbs <gibbs@FreeBSD.org> | 2000-09-22 22:19:55 +0000 |
---|---|---|
committer | Justin T. Gibbs <gibbs@FreeBSD.org> | 2000-09-22 22:19:55 +0000 |
commit | 083d01f20daa36f8f86adcfa820767d031c3e2a8 (patch) | |
tree | dc7a9b41b420721ed45807a9b65c71df016ee574 /sys/dev/aic7xxx/aicasm/aicasm_gram.y | |
parent | c498406d585c79e655dfd478b6603110bff964e5 (diff) |
Add Perforce RCSIDs for easy revision correlation to my local tree.
Add support for constructing a table of critical section regions in
the firmware image. The kernel driver will soon have support for
single stepping the sequencer outside of a critical region prior
to starting exception handling.
Notes
Notes:
svn path=/head/; revision=66270
Diffstat (limited to 'sys/dev/aic7xxx/aicasm/aicasm_gram.y')
-rw-r--r-- | sys/dev/aic7xxx/aicasm/aicasm_gram.y | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/sys/dev/aic7xxx/aicasm/aicasm_gram.y b/sys/dev/aic7xxx/aicasm/aicasm_gram.y index 8a602637145b..8ef77111d91a 100644 --- a/sys/dev/aic7xxx/aicasm/aicasm_gram.y +++ b/sys/dev/aic7xxx/aicasm/aicasm_gram.y @@ -29,11 +29,12 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: //depot/src/aic7xxx/aicasm/aicasm_gram.y#4 $ * * $FreeBSD$ */ +#include <inttypes.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -62,6 +63,7 @@ static symbol_ref_t sindex; static int instruction_ptr; static int sram_or_scb_offset; static int download_constant_count; +static int in_critical_section; static void process_bitmask(int mask_type, symbol_t *sym, int mask); static void initialize_symbol(symbol_t *symbol); @@ -112,6 +114,10 @@ static int is_download_const(expression_t *immed); %token <value> T_MODE +%token T_BEGIN_CS + +%token T_END_CS + %token T_BIT %token T_MASK @@ -184,6 +190,10 @@ program: | program scb | label | program label +| critical_section_start +| program critical_section_start +| critical_section_end +| program critical_section_end | conditional | program conditional | code @@ -644,6 +654,35 @@ ret: { $$ = 1; } ; +critical_section_start: + T_BEGIN_CS + { + critical_section_t *cs; + + if (in_critical_section != FALSE) { + stop("Critical Section within Critical Section", + EX_DATAERR); + /* NOTREACHED */ + } + cs = cs_alloc(); + cs->begin_addr = instruction_ptr; + in_critical_section = TRUE; + } + +critical_section_end: + T_END_CS + { + critical_section_t *cs; + + if (in_critical_section == FALSE) { + stop("Unballanced 'end_cs'", EX_DATAERR); + /* NOTREACHED */ + } + cs = TAILQ_LAST(&cs_tailq, cs_tailq); + cs->end_addr = instruction_ptr; + in_critical_section = FALSE; + } + label: T_SYMBOL ':' { |