OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [or1ksim/] [testbench/] [except_test.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 516 markom
/* This is exception test for OpenRISC 1200 */
2
 
3
#include "spr_defs.h"
4
#include "support.h"
5
#include "int.h"
6
 
7
/* Define RAM physical location and size
8
   Bottom half will be used for this program, the rest
9
   will be used for testing */
10 970 simons
#define FLASH_START 0xf0000000
11 516 markom
#define FLASH_SIZE  0x00200000
12 970 simons
#define RAM_START   0x00000000
13
#define RAM_SIZE    0x04000000
14 516 markom
 
15 970 simons
#define TEST_BASE   0xa5000000
16
 
17 516 markom
/* MMU page size */
18
#define PAGE_SIZE 8192
19
 
20
/* Number of DTLB sets used (power of 2, max is 256) */
21
#define DTLB_SETS 32
22
 
23
/* Number of DTLB ways (2, 2, 3 etc., max is 4). */
24
#define DTLB_WAYS 1
25
 
26
/* Number of ITLB sets used (power of 2, max is 256) */
27
#define ITLB_SETS 32
28
 
29
/* Number of ITLB ways (1, 2, 3 etc., max is 4). */
30
#define ITLB_WAYS 1
31
 
32
/* TLB mode codes */
33
#define TLB_CODE_ONE_TO_ONE     0x00000000
34
#define TLB_CODE_PLUS_ONE_PAGE  0x10000000
35
#define TLB_CODE_MINUS_ONE_PAGE 0x20000000
36
 
37
#define TLB_TEXT_SET_NB 6
38
#define TLB_DATA_SET_NB 2
39
 
40
#define TLB_CODE_MASK   0xfffff000
41
#define TLB_PR_MASK     0x00000fff
42
#define DTLB_PR_NOLIMIT  ( SPR_DTLBTR_CI   | \
43
                          SPR_DTLBTR_URE  | \
44
                          SPR_DTLBTR_UWE  | \
45
                          SPR_DTLBTR_SRE  | \
46
                          SPR_DTLBTR_SWE  )
47
 
48
#define ITLB_PR_NOLIMIT  ( SPR_ITLBTR_CI   | \
49
                          SPR_ITLBTR_SXE  | \
50
                          SPR_ITLBTR_UXE  )
51
 
52
/* fails if x is false */
53
#define ASSERT(x) ((x)?1: fail (__FUNCTION__, __LINE__))
54
 
55
/* Exception vectors */
56
#define V_RESET       1
57
#define V_BERR        2
58
#define V_DPF         3
59
#define V_IPF         4
60 600 simons
#define V_TICK        5
61 516 markom
#define V_ALIGN       6
62
#define V_ILLINSN     7
63 600 simons
#define V_INT         8
64 516 markom
#define V_DTLB_MISS   9
65
#define V_ITLB_MISS   10
66
#define V_RANGE       11
67
#define V_SYS         12
68
#define V_TRAP        14
69
 
70
#if 1
71 1024 simons
#define debug printf
72 516 markom
#else
73
#define debug
74
#endif
75
 
76
/* Extern functions */
77
extern void lo_dmmu_en (void);
78
extern void lo_immu_en (void);
79
extern unsigned long call (unsigned long add, unsigned long val);
80
extern unsigned long call_with_int (unsigned long add, unsigned long val);
81
extern void trap (void);
82
extern void b_trap (void);
83
extern void range (void);
84
extern void b_range (void);
85
extern int except_basic (void);
86
extern void (*test)(void);
87
extern int load_acc_32 (unsigned long add);
88
extern int load_acc_16 (unsigned long add);
89
extern int store_acc_32 (unsigned long add);
90
extern int store_acc_16 (unsigned long add);
91
extern int load_b_acc_32 (unsigned long add);
92
extern int int_trigger (void);
93
extern int int_loop (void);
94
extern int jump_back (void);
95
 
96
/* Local functions prototypes */
97
void dmmu_disable (void);
98
void immu_disable (void);
99
 
100
/* DTLB mode status */
101
volatile unsigned long dtlb_val;
102
 
103
/* ITLB mode status */
104
volatile unsigned long itlb_val;
105
 
106
/* Exception counter */
107
volatile int except_count;
108
 
109
/* Exception mask */
110
volatile unsigned long except_mask;
111
 
112
/* Exception efective address */
113
volatile unsigned long except_ea;
114
 
115
/* Eception PC */
116
volatile unsigned long except_pc;
117
 
118 956 simons
unsigned long  excpt_buserr;
119
unsigned long excpt_dpfault;
120
unsigned long excpt_ipfault;
121
unsigned long excpt_tick;
122
unsigned long excpt_align;
123
unsigned long excpt_illinsn;
124
unsigned long excpt_int;
125
unsigned long excpt_dtlbmiss;
126
unsigned long excpt_itlbmiss;
127
unsigned long excpt_range;
128
unsigned long excpt_syscall;
129
unsigned long excpt_break;
130
unsigned long excpt_trap;
131
 
132
 
133 516 markom
void fail (char *func, int line)
134
{
135
#ifndef __FUNCTION__
136
#define __FUNCTION__ "?"
137
#endif
138
 
139
  immu_disable ();
140
  dmmu_disable ();
141
 
142
  debug("Test failed in %s:%i\n", func, line);
143
  report (0xeeeeeeee);
144
  exit (1);
145
}
146
 
147
void test_dummy (void)
148
{
149
        asm("_test:");
150
        asm("l.addi\t\tr3,r3,1") ;
151
        asm("l.nop" : :);
152
}
153
 
154
void copy_test (unsigned long phy_add)
155
{
156
        memcpy((void *)phy_add, (void *)&test, 8);
157
}
158
 
159
/* Bus error handler */
160
void bus_err_handler (void)
161
{
162
 
163
  except_mask |= 1 << V_BERR;
164
  except_count++;
165
}
166
 
167
/* Illegal insn handler */
168
void ill_insn_handler (void)
169
{
170
 
171
  except_mask |= 1 << V_ILLINSN;
172
  except_count++;
173
}
174
 
175
/* Low priority interrupt handler */
176 600 simons
void tick_handler (void)
177 516 markom
{
178
 
179
  /* Disable interrupt recognition */
180 600 simons
  mtspr(SPR_ESR_BASE, mfspr(SPR_ESR_BASE) & ~SPR_SR_TEE);
181 516 markom
 
182 600 simons
  except_mask |= 1 << V_TICK;
183 516 markom
  except_count++;
184
}
185
 
186
/* High priority interrupt handler */
187 600 simons
void int_handler (void)
188 516 markom
{
189
 
190
  /* Disable interrupt recognition */
191 600 simons
  mtspr(SPR_ESR_BASE, mfspr(SPR_ESR_BASE) & ~SPR_SR_IEE);
192 516 markom
 
193 600 simons
  except_mask |= 1 << V_INT;
194 516 markom
  except_count++;
195
}
196
 
197
/* Trap handler */
198
void trap_handler (void)
199
{
200
 
201
  except_mask |= 1 << V_TRAP;
202
  except_count++;
203
}
204
 
205
/* Align handler */
206
void align_handler (void)
207
{
208
 
209
  except_mask |= 1 << V_ALIGN;
210
  except_count++;
211
}
212
 
213
/* Range handler */
214
void range_handler (void)
215
{
216
  /* Disable range exception */
217
  mtspr (SPR_ESR_BASE, mfspr (SPR_ESR_BASE) & ~SPR_SR_OVE);
218
 
219
  except_mask |= 1 << V_RANGE;
220
  except_count++;
221
}
222
 
223
/* DTLB miss exception handler */
224
void dtlb_miss_handler (void)
225
{
226
  unsigned long ea;
227
  int set, way = 0;
228
  int i;
229
 
230
  /* Get EA that cause the exception */
231
  ea = mfspr (SPR_EEAR_BASE);
232
 
233
  /* Find TLB set and LRU way */
234
  set = (ea / PAGE_SIZE) % DTLB_SETS;
235
  for (i = 0; i < DTLB_WAYS; i++) {
236
    if ((mfspr (SPR_DTLBMR_BASE(i) + set) & SPR_DTLBMR_LRU) == 0) {
237
      way = i;
238
      break;
239
    }
240
  }
241
 
242
  mtspr (SPR_DTLBMR_BASE(way) + set, (ea & SPR_DTLBMR_VPN) | SPR_DTLBMR_V);
243
  mtspr (SPR_DTLBTR_BASE(way) + set, (ea & SPR_DTLBTR_PPN) | dtlb_val);
244
 
245
  except_mask |= 1 << V_DTLB_MISS;
246
  except_count++;
247
}
248
 
249
/* ITLB miss exception handler */
250
void itlb_miss_handler (void)
251
{
252
  unsigned long ea;
253
  int set, way = 0;
254
  int i;
255
 
256
  /* Get EA that cause the exception */
257
  ea = mfspr (SPR_EEAR_BASE);
258
 
259
  /* Find TLB set and LRU way */
260
  set = (ea / PAGE_SIZE) % ITLB_SETS;
261
  for (i = 0; i < ITLB_WAYS; i++) {
262
    if ((mfspr (SPR_ITLBMR_BASE(i) + set) & SPR_ITLBMR_LRU) == 0) {
263
      way = i;
264
      break;
265
    }
266
  }
267
 
268
  mtspr (SPR_ITLBMR_BASE(way) + set, (ea & SPR_ITLBMR_VPN) | SPR_ITLBMR_V);
269
  mtspr (SPR_ITLBTR_BASE(way) + set, (ea & SPR_ITLBTR_PPN) | itlb_val);
270
  except_mask |= 1 << V_ITLB_MISS;
271
  except_count++;
272
}
273
 
274
/* Data page fault exception handler */
275
void dpage_fault_handler (void)
276
{
277
  unsigned long ea;
278
  int set, way = 0;
279
  int i;
280
 
281
  /* Get EA that cause the exception */
282
  ea = mfspr (SPR_EEAR_BASE);
283
 
284
  /* Find TLB set and way */
285
  set = (ea / PAGE_SIZE) % DTLB_SETS;
286
  for (i = 0; i < DTLB_WAYS; i++) {
287
    if ((mfspr (SPR_DTLBMR_BASE(i) + set) & SPR_DTLBMR_VPN) == (ea & SPR_DTLBMR_VPN)) {
288
      way = i;
289
      break;
290
    }
291
  }
292
 
293
  /* Give permission */
294
  mtspr (SPR_DTLBTR_BASE(way) + set, (mfspr (SPR_DTLBTR_BASE(way) + set) & ~DTLB_PR_NOLIMIT) | dtlb_val);
295
 
296
  except_mask |= 1 << V_DPF;
297
  except_count++;
298
}
299
 
300
/* Intstruction page fault exception handler */
301
void ipage_fault_handler (void)
302
{
303
  unsigned long ea;
304
  int set, way = 0;
305
  int i;
306
 
307
  /* Get EA that cause the exception */
308
  ea = mfspr (SPR_EEAR_BASE);
309
 
310
  /* Find TLB set and way */
311
  set = (ea / PAGE_SIZE) % ITLB_SETS;
312
  for (i = 0; i < ITLB_WAYS; i++) {
313
    if ((mfspr (SPR_ITLBMR_BASE(i) + set) & SPR_ITLBMR_VPN) == (ea & SPR_ITLBMR_VPN)) {
314
      way = i;
315
      break;
316
    }
317
  }
318
 
319
  /* Give permission */
320
  mtspr (SPR_ITLBTR_BASE(way) + set, (mfspr (SPR_ITLBTR_BASE(way) + set) & ~ITLB_PR_NOLIMIT) | itlb_val);
321
 
322
  except_mask |= 1 << V_IPF;
323
  except_count++;
324
}
325
 
326
/*Enable DMMU */
327
void dmmu_enable (void)
328
{
329
  /* Enable DMMU */
330
  lo_dmmu_en ();
331
}
332
 
333
/* Disable DMMU */
334
void dmmu_disable (void)
335
{
336
  mtspr (SPR_SR, mfspr (SPR_SR) & ~SPR_SR_DME);
337
}
338
 
339
/* Enable IMMU */
340
void immu_enable (void)
341
{
342
  /* Enable IMMU */
343
  lo_immu_en ();
344
}
345
 
346
/* Disable IMMU */
347
void immu_disable (void)
348
{
349
  mtspr (SPR_SR, mfspr (SPR_SR) & ~SPR_SR_IME);
350
}
351
 
352
/* Tick timer init */
353
void tick_init (int period, int hp_int)
354
{
355 600 simons
  /* Disable tick timer exception recognition */
356
  mtspr(SPR_SR, mfspr(SPR_SR) & ~SPR_SR_TEE);
357 516 markom
 
358
  /* Set period of one cycle, restartable mode */
359
  mtspr(SPR_TTMR, SPR_TTMR_IE | SPR_TTMR_RT | (period & SPR_TTMR_PERIOD));
360
 
361
  /* Reset counter */
362
  mtspr(SPR_TTCR, 0);
363
}
364
 
365
/* Interrupt test */
366
int interrupt_test (void)
367
{
368
  unsigned long ret;
369
  int i;
370
 
371
  /* Init tick timer */
372
  tick_init (1, 1);
373
 
374
  /* Reset except counter */
375
  except_count = 0;
376
  except_mask = 0;
377
  except_pc = 0;
378
  except_ea = 0;
379
 
380
  /* Test normal high priority interrupt trigger */
381
  ret = call ((unsigned long)&int_trigger, 0);
382
  ASSERT(except_count == 1);
383 600 simons
  ASSERT(except_mask == (1 << V_TICK));
384 516 markom
  ASSERT(ret == 0);
385
  ASSERT(except_pc == (unsigned long)int_trigger + 16);
386
 
387
  /* Reset except counter */
388
  except_count = 0;
389
  except_mask = 0;
390
  except_pc = 0;
391
  except_ea = 0;
392
 
393
  /* Test inetrrupt in delay slot */
394 612 simons
  tick_init (100, 1);
395 516 markom
 
396
  /* Hopefully we will have interrupt recognition between branch insn and delay slot */
397
  except_pc = (unsigned long)&int_loop;
398
  for (i = 0; i < 10; i++) {
399
    call_with_int (except_pc, RAM_START);
400
    ASSERT(except_pc == (unsigned long)&int_loop);
401
  }
402
 
403
  return 0;
404
}
405
 
406
/* ITLB miss test */
407
int itlb_test (void)
408
{
409
  int i, j, ret;
410
  unsigned long ea, ta;
411
 
412
  /* Invalidate all entries in ITLB */
413
  for (i = 0; i < ITLB_WAYS; i++) {
414
    for (j = 0; j < ITLB_SETS; j++) {
415
      mtspr (SPR_ITLBMR_BASE(i) + j, 0);
416
      mtspr (SPR_ITLBTR_BASE(i) + j, 0);
417
    }
418
  }
419
 
420
  /* Set one to one translation for the use of this program */
421
  for (i = 0; i < TLB_TEXT_SET_NB; i++) {
422
    ea = FLASH_START + (i*PAGE_SIZE);
423
    ta = FLASH_START + (i*PAGE_SIZE);
424
    mtspr (SPR_ITLBMR_BASE(0) + i, ea | SPR_ITLBMR_V);
425
    mtspr (SPR_ITLBTR_BASE(0) + i, ta | ITLB_PR_NOLIMIT);
426
  }
427
 
428
  /* Set dtlb no permisions */
429
  itlb_val = SPR_ITLBTR_CI;
430
 
431
  /* Reset except counter */
432
  except_count = 0;
433
  except_mask = 0;
434
  except_pc = 0;
435
  except_ea = 0;
436
 
437
  /* Enable IMMU */
438
  immu_enable ();
439
 
440
  /* Copy jump instruction to last location of a page */
441
  ea = RAM_START + (RAM_SIZE/2) + ((TLB_TEXT_SET_NB + 1)*PAGE_SIZE) - 8;
442
  memcpy((void *)ea, (void *)&jump_back, 12);
443
 
444
  /* Check if there was ITLB miss exception */
445
  ret = call (ea, 0);
446
  ASSERT(except_count == 1);
447
  ASSERT(except_mask == (1 << V_ITLB_MISS));
448
  ASSERT(except_pc == ea);
449
  ASSERT(ret == 0);
450
 
451
  /* Set dtlb no permisions */
452
  itlb_val = SPR_ITLBTR_CI | SPR_ITLBTR_SXE;
453
 
454
  /* Reset except counter */
455
  except_count = 0;
456
  except_mask = 0;
457
  except_pc = 0;
458
  except_ea = 0;
459
 
460
  /* Check if there was IPF miss exception */
461
  ret = call (ea, 0);
462
  ASSERT(except_count == 1);
463
  ASSERT(except_mask == (1 << V_IPF));
464
  ASSERT(except_pc == ea);
465
  ASSERT(ret == 0);
466
 
467
  /* Set dtlb no permisions */
468
  itlb_val = SPR_ITLBTR_CI;
469
 
470
  /* Reset except counter */
471
  except_count = 0;
472
  except_mask = 0;
473
  except_pc = 0;
474
  except_ea = 0;
475
 
476
  /* Check if there was ITLB miss exception */
477
  ret = call (ea, 0);
478
  ASSERT(except_count == 1);
479
  ASSERT(except_mask == (1 << V_ITLB_MISS));
480
  ASSERT(except_pc == ea + 4);
481
  ASSERT(ret == 0);
482
 
483
  /* Set dtlb no permisions */
484
  itlb_val = SPR_ITLBTR_CI | SPR_ITLBTR_SXE;
485
 
486
  /* Reset except counter */
487
  except_count = 0;
488
  except_mask = 0;
489
  except_pc = 0;
490
  except_ea = 0;
491
 
492
  /* Check if there was IPF exception */
493
  ret = call (ea, 0);
494
  ASSERT(except_count == 1);
495
  ASSERT(except_mask == (1 << V_IPF));
496
  ASSERT(except_pc == ea + 4);
497
  ASSERT(ret == 0);
498
 
499
  /* Reset except counter */
500
  except_count = 0;
501
  except_mask = 0;
502
  except_pc = 0;
503
  except_ea = 0;
504
 
505
  ret = call (ea, 0);
506
  ASSERT(except_count == 0);
507
  ASSERT(ret == 1);
508
 
509
  /* Disable IMMU */
510
  immu_disable ();
511
 
512
  return 0;
513
}
514
 
515
/* DTLB miss test */
516
int dtlb_test (void)
517
{
518
  int i, j, ret;
519
  unsigned long ea, ta;
520
 
521
  /* Invalidate all entries in DTLB */
522
  for (i = 0; i < DTLB_WAYS; i++) {
523
    for (j = 0; j < DTLB_SETS; j++) {
524
      mtspr (SPR_DTLBMR_BASE(i) + j, 0);
525
      mtspr (SPR_DTLBTR_BASE(i) + j, 0);
526
    }
527
  }
528
 
529
  /* Set one to one translation for the use of this program */
530
  for (i = 0; i < TLB_DATA_SET_NB; i++) {
531
    ea = RAM_START + (i*PAGE_SIZE);
532
    ta = RAM_START + (i*PAGE_SIZE);
533
    mtspr (SPR_DTLBMR_BASE(0) + i, ea | SPR_ITLBMR_V);
534
    mtspr (SPR_DTLBTR_BASE(0) + i, ta | DTLB_PR_NOLIMIT);
535
  }
536
 
537
  /* Set dtlb no permisions */
538
  dtlb_val = SPR_DTLBTR_CI;
539
 
540
  /* Reset except counter */
541
  except_count = 0;
542
  except_mask = 0;
543
  except_pc = 0;
544
  except_ea = 0;
545
 
546
  /* Set pattern */
547
  ea = RAM_START + (RAM_SIZE/2) + ((TLB_DATA_SET_NB)*PAGE_SIZE);
548
  REG32(ea) = 0x87654321;
549
 
550
  /* Enable DMMU */
551
  dmmu_enable ();
552
 
553
  /* Check if there was DTLB miss exception */
554
  ret = call ((unsigned long)&load_b_acc_32, ea);
555
  ASSERT(except_count == 1);
556
  ASSERT(except_mask == (1 << V_DTLB_MISS));
557
  ASSERT(except_pc == (unsigned long)load_b_acc_32 + 8);
558
  ASSERT(except_ea == ea);
559
  ASSERT(ret == 0x12345678);
560
 
561
  /* Set dtlb no permisions */
562
  dtlb_val = SPR_DTLBTR_CI | SPR_DTLBTR_SRE;
563
 
564
  /* Reset except counter */
565
  except_count = 0;
566
  except_mask = 0;
567
  except_pc = 0;
568
  except_ea = 0;
569
 
570
  /* Check if there was DPF miss exception */
571
  ret = call ((unsigned long)&load_b_acc_32, ea);
572
  ASSERT(except_count == 1);
573
  ASSERT(except_mask == (1 << V_DPF));
574
  ASSERT(except_pc == (unsigned long)load_b_acc_32 + 8);
575
  ASSERT(except_ea == ea);
576
  ASSERT(ret == 0x12345678);
577
 
578
  /* Reset except counter */
579
  except_count = 0;
580
  except_mask = 0;
581
  except_pc = 0;
582
  except_ea = 0;
583
 
584
  ret = call ((unsigned long)&load_b_acc_32, ea);
585
  ASSERT(except_count == 0);
586
  ASSERT(ret == 0x87654321);
587
 
588
  /* Disable DMMU */
589
  dmmu_disable ();
590
 
591
  return 0;
592
}
593
 
594
/* Bus error test */
595
int buserr_test (void)
596
{
597
  int i, j, ret;
598
  unsigned long ea, ta;
599
 
600
  /* Invalidate all entries in ITLB */
601
  for (i = 0; i < ITLB_WAYS; i++) {
602
    for (j = 0; j < ITLB_SETS; j++) {
603
      mtspr (SPR_ITLBMR_BASE(i) + j, 0);
604
      mtspr (SPR_ITLBTR_BASE(i) + j, 0);
605
    }
606
  }
607
 
608
  /* Set one to one translation for the use of this program */
609
  for (i = 0; i < TLB_TEXT_SET_NB; i++) {
610
    ea = FLASH_START + (i*PAGE_SIZE);
611
    ta = FLASH_START + (i*PAGE_SIZE);
612
    mtspr (SPR_ITLBMR_BASE(0) + i, ea | SPR_ITLBMR_V);
613
    mtspr (SPR_ITLBTR_BASE(0) + i, ta | ITLB_PR_NOLIMIT);
614
  }
615
 
616
  /* Invalidate all entries in DTLB */
617
  for (i = 0; i < DTLB_WAYS; i++) {
618
    for (j = 0; j < DTLB_SETS; j++) {
619
      mtspr (SPR_DTLBMR_BASE(i) + j, 0);
620
      mtspr (SPR_DTLBTR_BASE(i) + j, 0);
621
    }
622
  }
623
 
624
  /* Set one to one translation for the use of this program */
625
  for (i = 0; i < TLB_DATA_SET_NB; i++) {
626
    ea = RAM_START + (i*PAGE_SIZE);
627
    ta = RAM_START + (i*PAGE_SIZE);
628
    mtspr (SPR_DTLBMR_BASE(0) + i, ea | SPR_ITLBMR_V);
629
    mtspr (SPR_DTLBTR_BASE(0) + i, ta | DTLB_PR_NOLIMIT);
630
  }
631
 
632
  /* Reset except counter */
633
  except_count = 0;
634
  except_mask = 0;
635
  except_pc = 0;
636
  except_ea = 0;
637
 
638
  /* Set IMMU translation */
639
  ea = RAM_START + (RAM_SIZE) + ((TLB_TEXT_SET_NB)*PAGE_SIZE);
640
  itlb_val = SPR_ITLBTR_CI | SPR_ITLBTR_SXE;
641
  mtspr (SPR_ITLBMR_BASE(0) + TLB_TEXT_SET_NB, (ea & SPR_ITLBMR_VPN) | SPR_ITLBMR_V);
642
  mtspr (SPR_ITLBTR_BASE(0) + TLB_TEXT_SET_NB, ((ea + PAGE_SIZE) & SPR_ITLBTR_PPN) | itlb_val);
643
 
644
  /* Enable IMMU */
645
  immu_enable ();
646
 
647
  /* Check if there was bus error exception */
648
  ret = call (ea, 0);
649
  ASSERT(except_count == 1);
650
  ASSERT(except_mask == (1 << V_BERR));
651
  ASSERT(except_pc == ea);
652 525 simons
  ASSERT(except_ea == ea);
653 516 markom
 
654
  /* Disable IMMU */
655
  immu_disable ();
656
 
657
  /* Reset except counter */
658
  except_count = 0;
659
  except_mask = 0;
660
  except_pc = 0;
661
  except_ea = 0;
662
 
663
  /* Copy jump instruction to last location of RAM */
664
  ea = RAM_START + RAM_SIZE - 8;
665
  memcpy((void *)ea, (void *)&jump_back, 8);
666
 
667
  /* Check if there was bus error exception */
668
  ret = call (ea, 0);
669
  ASSERT(except_count == 1);
670
  ASSERT(except_mask == (1 << V_BERR));
671
  ASSERT(except_pc == ea + 4);
672
  ASSERT(except_ea == ea + 8);
673
 
674
  /* Reset except counter */
675
  except_count = 0;
676
  except_mask = 0;
677
  except_pc = 0;
678
  except_ea = 0;
679
 
680
  /* Set DMMU translation */
681
  ea = RAM_START + (RAM_SIZE) + ((TLB_DATA_SET_NB)*PAGE_SIZE);
682
  dtlb_val = SPR_DTLBTR_CI | SPR_DTLBTR_SRE;
683
  mtspr (SPR_DTLBMR_BASE(0) + TLB_DATA_SET_NB, (ea & SPR_DTLBMR_VPN) | SPR_DTLBMR_V);
684
  mtspr (SPR_DTLBTR_BASE(0) + TLB_DATA_SET_NB, ((ea + PAGE_SIZE) & SPR_DTLBTR_PPN) | dtlb_val);
685
 
686
  /* Enable DMMU */
687
  dmmu_enable ();
688
 
689
  /* Check if there was bus error exception */
690
  ret = call ((unsigned long)&load_acc_32, ea );
691
  ASSERT(except_count == 1);
692
  ASSERT(except_mask == (1 << V_BERR));
693
  ASSERT(except_pc == (unsigned long)load_acc_32 + 8);
694 525 simons
  ASSERT(except_ea == ea);
695 516 markom
  ASSERT(ret == 0x12345678);
696
 
697
  /* Disable DMMU */
698
  dmmu_disable ();
699
 
700
  /* Reset except counter */
701
  except_count = 0;
702
  except_mask = 0;
703
  except_pc = 0;
704
  except_ea = 0;
705
 
706
  /* Check if there was bus error exception */
707 970 simons
  ret = call ((unsigned long)&load_acc_32, ea );
708 516 markom
  ASSERT(except_count == 1);
709
  ASSERT(except_mask == (1 << V_BERR));
710 970 simons
  ASSERT(except_pc == (unsigned long)load_acc_32 + 8);
711 516 markom
  ASSERT(except_ea == ea);
712
  ASSERT(ret == 0x12345678);
713
 
714
  return 0;
715
}
716
 
717
/* Illegal instruction test */
718
int illegal_insn_test (void)
719
{
720
  int ret;
721
 
722
  /* Reset except counter */
723
  except_count = 0;
724
  except_mask = 0;
725
  except_pc = 0;
726
  except_ea = 0;
727
 
728
  /* Set illegal insn */
729 956 simons
  REG32(RAM_START + (RAM_SIZE/2)) = REG32((unsigned long)jump_back + 4);
730
  REG32(RAM_START + (RAM_SIZE/2) + 4) = 0xffffffff;
731 516 markom
 
732
  /* Check if there was illegal insn exception */
733 956 simons
  ret = call (RAM_START + (RAM_SIZE/2) + 4, 0 );
734 516 markom
  ASSERT(except_count == 1);
735
  ASSERT(except_mask == (1 << V_ILLINSN));
736 956 simons
  ASSERT(except_pc == (RAM_START + (RAM_SIZE/2) + 4));
737 516 markom
 
738
  /* Reset except counter */
739
  except_count = 0;
740
  except_mask = 0;
741
  except_pc = 0;
742
  except_ea = 0;
743
 
744
  /* Check if there was illegal insn exception */
745 956 simons
  ret = call (RAM_START + (RAM_SIZE/2), 0 );
746 516 markom
  ASSERT(except_count == 1);
747
  ASSERT(except_mask == (1 << V_ILLINSN));
748 956 simons
  ASSERT(except_pc == RAM_START + (RAM_SIZE/2));
749 516 markom
 
750
  return 0;
751
}
752
 
753
/* Align test */
754
int align_test (void)
755
{
756
  int ret;
757
 
758
  /* Reset except counter */
759
  except_count = 0;
760
  except_mask = 0;
761
  except_pc = 0;
762
  except_ea = 0;
763
 
764
  /* Check if there was alignment exception on read insn */
765
  ret = call ((unsigned long)&load_acc_32, RAM_START + (RAM_SIZE) + (TLB_DATA_SET_NB*PAGE_SIZE) + 1);
766
  ASSERT(except_count == 1);
767
  ASSERT(except_mask == (1 << V_ALIGN));
768
  ASSERT(ret == 0x12345678);
769
  ASSERT(except_pc == ((unsigned long)(load_acc_32) + 8));
770
  ASSERT(except_ea == (RAM_START + (RAM_SIZE) + (TLB_DATA_SET_NB*PAGE_SIZE + 1)));
771
 
772
  ret = call ((unsigned long)&load_acc_32, RAM_START + (RAM_SIZE) + (TLB_DATA_SET_NB*PAGE_SIZE) + 2);
773
  ASSERT(except_count == 2);
774
  ASSERT(except_mask == (1 << V_ALIGN));
775
  ASSERT(ret == 0x12345678);
776
  ASSERT(except_pc == ((unsigned long)(load_acc_32) + 8));
777
  ASSERT(except_ea == (RAM_START + (RAM_SIZE) + (TLB_DATA_SET_NB*PAGE_SIZE + 2)));
778
 
779
  ret = call ((unsigned long)&load_acc_32, RAM_START + (RAM_SIZE) + (TLB_DATA_SET_NB*PAGE_SIZE) + 3);
780
  ASSERT(except_count == 3);
781
  ASSERT(except_mask == (1 << V_ALIGN));
782
  ASSERT(ret == 0x12345678);
783
  ASSERT(except_pc == ((unsigned long)(load_acc_32) + 8));
784
  ASSERT(except_ea == (RAM_START + (RAM_SIZE) + (TLB_DATA_SET_NB*PAGE_SIZE + 3)));
785
 
786
  ret = call ((unsigned long)&load_acc_16, RAM_START + (RAM_SIZE) + (TLB_DATA_SET_NB*PAGE_SIZE) + 1);
787
  ASSERT(except_count == 4);
788
  ASSERT(except_mask == (1 << V_ALIGN));
789
  ASSERT(ret == 0x12345678);
790
  ASSERT(except_pc == ((unsigned long)(load_acc_16) + 8));
791
  ASSERT(except_ea == (RAM_START + (RAM_SIZE) + (TLB_DATA_SET_NB*PAGE_SIZE + 1)));
792
 
793
  /* Check alignment exception on write  insn */
794
  call ((unsigned long)&store_acc_32, RAM_START + (RAM_SIZE) + (TLB_DATA_SET_NB*PAGE_SIZE) + 1);
795
  ASSERT(except_count == 5);
796
  ASSERT(except_mask == (1 << V_ALIGN));
797
  ASSERT(except_pc == ((unsigned long)(store_acc_32) + 8));
798
  ASSERT(except_ea == (RAM_START + (RAM_SIZE) + (TLB_DATA_SET_NB*PAGE_SIZE + 1)));
799
 
800
  call ((unsigned long)&store_acc_32, RAM_START + (RAM_SIZE) + (TLB_DATA_SET_NB*PAGE_SIZE) + 2);
801
  ASSERT(except_count == 6);
802
  ASSERT(except_mask == (1 << V_ALIGN));
803
  ASSERT(except_pc == ((unsigned long)(store_acc_32) + 8));
804
  ASSERT(except_ea == (RAM_START + (RAM_SIZE) + (TLB_DATA_SET_NB*PAGE_SIZE + 2)));
805
 
806
  call ((unsigned long)&store_acc_32, RAM_START + (RAM_SIZE) + (TLB_DATA_SET_NB*PAGE_SIZE) + 3);
807
  ASSERT(except_count == 7);
808
  ASSERT(except_mask == (1 << V_ALIGN));
809
  ASSERT(except_pc == ((unsigned long)(store_acc_32) + 8));
810
  ASSERT(except_ea == (RAM_START + (RAM_SIZE) + (TLB_DATA_SET_NB*PAGE_SIZE + 3)));
811
 
812
  call ((unsigned long)&store_acc_16, RAM_START + (RAM_SIZE) + (TLB_DATA_SET_NB*PAGE_SIZE) + 1);
813
  ASSERT(except_count == 8);
814
  ASSERT(except_mask == (1 << V_ALIGN));
815
  ASSERT(except_pc == ((unsigned long)(store_acc_16) + 8));
816
  ASSERT(except_ea == (RAM_START + (RAM_SIZE) + (TLB_DATA_SET_NB*PAGE_SIZE + 1)));
817
 
818
 
819
  ret = call ((unsigned long)&load_b_acc_32, RAM_START + (RAM_SIZE) + (TLB_DATA_SET_NB*PAGE_SIZE) + 1);
820
  ASSERT(except_count == 9);
821
  ASSERT(except_mask == (1 << V_ALIGN));
822
  ASSERT(ret == 0x12345678);
823
  ASSERT(except_pc == ((unsigned long)(load_b_acc_32) + 8));
824
  ASSERT(except_ea == (RAM_START + (RAM_SIZE) + (TLB_DATA_SET_NB*PAGE_SIZE + 1)));
825
 
826
 
827
  return 0;
828
}
829
 
830
/* Trap test */
831
int trap_test (void)
832
{
833
  /* Reset except counter */
834
  except_count = 0;
835
  except_mask = 0;
836
  except_pc = 0;
837
  except_ea = 0;
838
 
839
  /* Check if there was trap exception */
840
  call ((unsigned long)&trap, 0);
841
  ASSERT(except_count == 1);
842
  ASSERT(except_mask == (1 << V_TRAP));
843
  ASSERT(except_pc == (unsigned long)(trap));
844
 
845
  /* Check if there was trap exception */
846
  call ((unsigned long)&b_trap, 0);
847
  ASSERT(except_count == 2);
848
  ASSERT(except_mask == (1 << V_TRAP));
849
  ASSERT(except_pc == (unsigned long)(b_trap));
850
 
851
  return 0;
852
}
853
 
854
/* Range test */
855
int range_test (void)
856
{
857
  /* Reset except counter */
858
  except_count = 0;
859
  except_mask = 0;
860
  except_pc = 0;
861
  except_ea = 0;
862
 
863
  /* Check if there was range exception */
864
  mtspr (SPR_SR, mfspr (SPR_SR) | SPR_SR_OVE);
865
  call ((unsigned long)&range, 0);
866
  ASSERT(except_count == 1);
867
  ASSERT(except_mask == (1 << V_RANGE));
868
  ASSERT(except_pc == (unsigned long)(range));
869
  ASSERT(except_ea == 0);
870
 
871
  /* Check if there was range exception */
872
  mtspr (SPR_SR, mfspr (SPR_SR) | SPR_SR_OVE);
873
  call ((unsigned long)&b_range, 0);
874
  ASSERT(except_count == 2);
875
  ASSERT(except_mask == (1 << V_RANGE));
876
  ASSERT(except_pc == (unsigned long)(b_range));
877
 
878
  return 0;
879
}
880
 
881
/* Exception priority test */
882
void except_priority_test (void)
883
{
884
  int i, j;
885
  unsigned long ea, ta, ret;
886
 
887
  /* Invalidate all entries in ITLB */
888
  for (i = 0; i < ITLB_WAYS; i++) {
889
    for (j = 0; j < ITLB_SETS; j++) {
890
      mtspr (SPR_ITLBMR_BASE(i) + j, 0);
891
      mtspr (SPR_ITLBTR_BASE(i) + j, 0);
892
    }
893
  }
894
 
895
  /* Set one to one translation for the use of this program */
896
  for (i = 0; i < TLB_TEXT_SET_NB; i++) {
897
    ea = FLASH_START + (i*PAGE_SIZE);
898
    ta = FLASH_START + (i*PAGE_SIZE);
899
    mtspr (SPR_ITLBMR_BASE(0) + i, ea | SPR_ITLBMR_V);
900
    mtspr (SPR_ITLBTR_BASE(0) + i, ta | ITLB_PR_NOLIMIT);
901
  }
902
 
903
  /* Set dtlb no permisions */
904
  itlb_val = SPR_ITLBTR_CI;
905
 
906
  /* Invalidate all entries in DTLB */
907
  for (i = 0; i < DTLB_WAYS; i++) {
908
    for (j = 0; j < DTLB_SETS; j++) {
909
      mtspr (SPR_DTLBMR_BASE(i) + j, 0);
910
      mtspr (SPR_DTLBTR_BASE(i) + j, 0);
911
    }
912
  }
913
 
914
  /* Set one to one translation for the use of this program */
915
  for (i = 0; i < TLB_DATA_SET_NB; i++) {
916
    ea = RAM_START + (i*PAGE_SIZE);
917
    ta = RAM_START + (i*PAGE_SIZE);
918
    mtspr (SPR_DTLBMR_BASE(0) + i, ea | SPR_ITLBMR_V);
919
    mtspr (SPR_DTLBTR_BASE(0) + i, ta | DTLB_PR_NOLIMIT);
920
  }
921
 
922
  /* Init tick timer */
923
  tick_init (1, 1);
924
 
925
  /* Set dtlb no permisions */
926
  dtlb_val = SPR_DTLBTR_CI;
927
 
928
  /* Reset except counter */
929
  except_count = 0;
930
  except_mask = 0;
931
  except_pc = 0;
932
  except_ea = 0;
933
 
934
  /* Enable IMMU */
935
  immu_enable ();
936
 
937
  /* Check if there was INT exception */
938
  call_with_int (RAM_START + (RAM_SIZE) + (TLB_TEXT_SET_NB*PAGE_SIZE), 0);
939
  ASSERT(except_count == 1);
940 600 simons
  ASSERT(except_mask == (1 << V_TICK));
941 516 markom
  ASSERT(except_pc == (RAM_START + (RAM_SIZE) + (TLB_TEXT_SET_NB*PAGE_SIZE)));
942
 
943
  /* Reset except counter */
944
  except_count = 0;
945
  except_mask = 0;
946
  except_pc = 0;
947
  except_ea = 0;
948
 
949
  /* Check if there was ITLB exception */
950
  call (RAM_START + (RAM_SIZE) + (TLB_TEXT_SET_NB*PAGE_SIZE), 0);
951
  ASSERT(except_count == 1);
952
  ASSERT(except_mask == (1 << V_ITLB_MISS));
953
  ASSERT(except_pc == (RAM_START + (RAM_SIZE) + (TLB_TEXT_SET_NB*PAGE_SIZE)));
954
  ASSERT(except_ea == (RAM_START + (RAM_SIZE) + (TLB_TEXT_SET_NB*PAGE_SIZE)));
955
 
956
  /* Set dtlb permisions */
957
  itlb_val |= SPR_ITLBTR_SXE;
958
 
959
  /* Reset except counter */
960
  except_count = 0;
961
  except_mask = 0;
962
  except_pc = 0;
963
  except_ea = 0;
964
 
965
  /* Check if there was IPF exception */
966
  call (RAM_START + (RAM_SIZE) + (TLB_TEXT_SET_NB*PAGE_SIZE), 0);
967
  ASSERT(except_count == 1);
968
  ASSERT(except_mask == (1 << V_IPF));
969
  ASSERT(except_pc == (RAM_START + (RAM_SIZE) + (TLB_TEXT_SET_NB*PAGE_SIZE)));
970
  ASSERT(except_ea == (RAM_START + (RAM_SIZE) + (TLB_TEXT_SET_NB*PAGE_SIZE)));
971
 
972
  /* Reset except counter */
973
  except_count = 0;
974
  except_mask = 0;
975
  except_pc = 0;
976
  except_ea = 0;
977
 
978
  /* Check if there was bus error exception */
979
  call (RAM_START + (RAM_SIZE) + (TLB_TEXT_SET_NB*PAGE_SIZE), 0);
980
  ASSERT(except_count == 1);
981
  ASSERT(except_mask == (1 << V_BERR));
982
  ASSERT(except_pc == (RAM_START + (RAM_SIZE) + (TLB_TEXT_SET_NB*PAGE_SIZE)));
983
  ASSERT(except_ea == (RAM_START + (RAM_SIZE) + (TLB_TEXT_SET_NB*PAGE_SIZE)));
984
 
985
  /* Reset except counter */
986
  except_count = 0;
987
  except_mask = 0;
988
  except_pc = 0;
989
  except_ea = 0;
990
 
991
  /* Disable MMU */
992
  immu_disable ();
993
 
994
  /* Set illegal instruction */
995
  REG32(RAM_START + (RAM_SIZE/2) + (TLB_TEXT_SET_NB*PAGE_SIZE) + 0) = 0x00000000;
996
  REG32(RAM_START + (RAM_SIZE/2) + (TLB_TEXT_SET_NB*PAGE_SIZE) + 4) = 0xffffffff;
997
  REG32(RAM_START + (RAM_SIZE/2) + (TLB_TEXT_SET_NB*PAGE_SIZE) + 8) = 0x00000000;
998
 
999
  /* Check if there was illegal insn exception */
1000
  call (RAM_START + (RAM_SIZE/2) + (TLB_TEXT_SET_NB*PAGE_SIZE) + 4, 0);
1001
  ASSERT(except_count == 1);
1002
  ASSERT(except_mask == (1 << V_ILLINSN));
1003
  ASSERT(except_pc == (RAM_START + (RAM_SIZE/2) + (TLB_TEXT_SET_NB*PAGE_SIZE) + 4));
1004
  ASSERT(except_ea == (RAM_START + (RAM_SIZE/2) + (TLB_TEXT_SET_NB*PAGE_SIZE) + 4 ));
1005
 
1006
  /* Reset except counter */
1007
  except_count = 0;
1008
  except_mask = 0;
1009
  except_pc = 0;
1010
  except_ea = 0;
1011
 
1012
  /* Enable DMMU */
1013
  dmmu_enable ();
1014
 
1015
  /* Check if there was alignment exception on read insn */
1016
  ret = call ((unsigned long)&load_acc_32, RAM_START + (RAM_SIZE) + (TLB_DATA_SET_NB*PAGE_SIZE) + 1);
1017
  ASSERT(except_count == 1);
1018
  ASSERT(except_mask == (1 << V_ALIGN));
1019
  ASSERT(ret == 0x12345678);
1020
  ASSERT(except_pc == ((unsigned long)(load_acc_32) + 8));
1021
  ASSERT(except_ea == (RAM_START + (RAM_SIZE) + (TLB_DATA_SET_NB*PAGE_SIZE + 1)));
1022
 
1023
  /* Reset except counter */
1024
  except_count = 0;
1025
  except_mask = 0;
1026
  except_pc = 0;
1027
  except_ea = 0;
1028
 
1029
  /* Check if there was DTLB exception */
1030
  ret = call ((unsigned long)&load_acc_32, RAM_START + (RAM_SIZE) + (TLB_DATA_SET_NB*PAGE_SIZE));
1031
  ASSERT(except_count == 1);
1032
  ASSERT(except_mask == (1 << V_DTLB_MISS));
1033
  ASSERT(ret == 0x12345678);
1034
  ASSERT(except_pc == ((unsigned long)(load_acc_32) + 8));
1035
  ASSERT(except_ea == (RAM_START + (RAM_SIZE) + (TLB_DATA_SET_NB*PAGE_SIZE)));
1036
 
1037
  /* Reset except counter */
1038
  except_count = 0;
1039
  except_mask = 0;
1040
  except_pc = 0;
1041
  except_ea = 0;
1042
 
1043
  /* Set dtlb permisions */
1044
  dtlb_val |= SPR_DTLBTR_SRE;
1045
 
1046
  /* Check if there was DPF exception */
1047
  ret = call ((unsigned long)&load_acc_32, RAM_START + (RAM_SIZE) + (TLB_DATA_SET_NB*PAGE_SIZE));
1048
  ASSERT(except_count == 1);
1049
  ASSERT(except_mask == (1 << V_DPF));
1050
  ASSERT(ret == 0x12345678);
1051
  ASSERT(except_pc == ((unsigned long)(load_acc_32) + 8));
1052
  ASSERT(except_ea == (RAM_START + (RAM_SIZE) + (TLB_DATA_SET_NB*PAGE_SIZE)));
1053
 
1054
  /* Reset except counter */
1055
  except_count = 0;
1056
  except_mask = 0;
1057
  except_pc = 0;
1058
  except_ea = 0;
1059
 
1060
  /* Check if there was bus error exception */
1061
  ret = call ((unsigned long)&load_acc_32, RAM_START + (RAM_SIZE) + (TLB_DATA_SET_NB*PAGE_SIZE));
1062
  ASSERT(except_count == 1);
1063
  ASSERT(except_mask == (1 << V_BERR));
1064
  ASSERT(ret == 0x12345678);
1065
  ASSERT(except_pc == ((unsigned long)(load_acc_32) + 8));
1066
  ASSERT(except_ea == (RAM_START + (RAM_SIZE) + (TLB_DATA_SET_NB*PAGE_SIZE)));
1067
 
1068
  /* Reset except counter */
1069
  except_count = 0;
1070
  except_mask = 0;
1071
  except_pc = 0;
1072
  except_ea = 0;
1073
 
1074
  /* Check if there was trap exception */
1075
  call ((unsigned long)&trap, 0);
1076
  ASSERT(except_count == 1);
1077
  ASSERT(except_mask == (1 << V_TRAP));
1078
  ASSERT(except_pc == (unsigned long)(trap));
1079
 
1080 608 simons
#if 0
1081 516 markom
  /* Reset except counter */
1082
  except_count = 0;
1083
  except_mask = 0;
1084
  except_pc = 0;
1085
  except_ea = 0;
1086
 
1087
  /* Check if there was range exception */
1088
  mtspr (SPR_SR, mfspr (SPR_SR) | SPR_SR_OVE);
1089
  call ((unsigned long)&range, 0);
1090
  ASSERT(except_count == 1);
1091
  ASSERT(except_mask == (1 << V_RANGE));
1092
  ASSERT(except_pc == (unsigned long)(range));
1093
  ASSERT(except_ea == 0);
1094 608 simons
#endif
1095 516 markom
}
1096
 
1097
int main (void)
1098
{
1099
  int ret;
1100
 
1101 1024 simons
  printf("except_test\n");
1102 520 simons
 
1103 516 markom
  /* Register bus error handler */
1104
  excpt_buserr = (unsigned long)bus_err_handler;
1105
 
1106
  /* Register illegal insn handler */
1107
  excpt_illinsn = (unsigned long)ill_insn_handler;
1108
 
1109 600 simons
  /* Register tick timer exception handler */
1110
  excpt_tick = (unsigned long)tick_handler;
1111 516 markom
 
1112 600 simons
  /* Register external interrupt handler */
1113
  excpt_int = (unsigned long)int_handler;
1114 516 markom
 
1115
  /* Register ITLB miss handler */
1116
  excpt_itlbmiss = (unsigned long)itlb_miss_handler;
1117
 
1118
  /* Register instruction page fault handler */
1119
  excpt_ipfault = (unsigned long)ipage_fault_handler;
1120
 
1121
  /* Register DTLB miss handler */
1122
  excpt_dtlbmiss = (unsigned long)dtlb_miss_handler;
1123
 
1124
  /* Register data page fault handler */
1125
  excpt_dpfault = (unsigned long)dpage_fault_handler;
1126
 
1127
  /* Register trap handler */
1128
  excpt_trap = (unsigned long)trap_handler;
1129
 
1130
  /* Register align handler */
1131
  excpt_align = (unsigned long)align_handler;
1132
 
1133
  /* Register range handler */
1134
  excpt_range = (unsigned long)range_handler;
1135
 
1136
  /* Exception basic test */
1137
  ret = except_basic ();
1138
  ASSERT(ret == 0);
1139
 
1140
  /* Interrupt exception test */
1141
  interrupt_test ();
1142
 
1143
  /* ITLB exception test */
1144
  itlb_test ();
1145
 
1146 970 simons
printf("dtlb_test\n");
1147 516 markom
  /* DTLB exception test */
1148
  dtlb_test ();
1149
 
1150 970 simons
printf("buserr_test\n");
1151 516 markom
  /* Bus error exception test */
1152
  buserr_test ();
1153
 
1154 970 simons
printf("illegal_insn_test\n");
1155
  /* Bus error exception test */
1156 516 markom
  /* Illegal insn test */
1157
  illegal_insn_test ();
1158
 
1159 970 simons
printf("align_test\n");
1160 516 markom
  /* Alignment test */
1161
  align_test ();
1162
 
1163 970 simons
printf("trap_test\n");
1164 516 markom
  /* Trap test */
1165
  trap_test ();
1166
 
1167 970 simons
printf("except_priority_test\n");
1168 516 markom
  /* Range test */
1169 520 simons
//  range_test ();
1170 516 markom
 
1171
  /* Exception priority test */
1172
  except_priority_test ();
1173
 
1174
  report (0xdeaddead);
1175
  exit (0);
1176
 
1177
  return 0;
1178
}
1179
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.