Changeset 3b8fe85 in mainline


Ignore:
Timestamp:
2008-09-20T15:09:41Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0dd0f71f
Parents:
2e3355a
Message:

Populate all sparc64 trap table slots belonging to trap_instruction_n.

Location:
kernel/arch/sparc64
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/include/trap/syscall.h

    r2e3355a r3b8fe85  
    3232/**
    3333 * @file
    34  * @brief This file contains the trap_instruction handler.
    35  *
    36  * The trap_instruction trap is used to implement syscalls.
     34 * @brief
    3735 */
    3836
     
    4038#define KERN_sparc64_SYSCALL_TRAP_H_
    4139
    42 #define TT_TRAP_INSTRUCTION(n)          (0x100 + (n))
    43 #define TT_TRAP_INSTRUCTION_LAST        TT_TRAP_INSTRUCTION(127)
    44 
    45 #ifdef __ASM__
    46 
    47 .macro TRAP_INSTRUCTION n
    48         ba trap_instruction_handler
    49         mov TT_TRAP_INSTRUCTION(\n) - TT_TRAP_INSTRUCTION(0), %g2
    50 .endm
    51 
    52 #endif /* __ASM__ */
     40#define TT_TRAP_INSTRUCTION_0           0x100
    5341
    5442#endif
  • kernel/arch/sparc64/src/trap/trap_table.S

    r2e3355a r3b8fe85  
    330330        FILL_NORMAL_HANDLER_USERSPACE
    331331
    332 /* TT = 0x100, TL = 0, trap_instruction_0 */
    333 .org trap_table + TT_TRAP_INSTRUCTION(0)*ENTRY_SIZE
    334 .global trap_instruction_0_tl0
    335 trap_instruction_0_tl0:
    336         TRAP_INSTRUCTION 0
    337 
    338 /* TT = 0x101, TL = 0, trap_instruction_1 */
    339 .org trap_table + TT_TRAP_INSTRUCTION(1)*ENTRY_SIZE
    340 .global trap_instruction_1_tl0
    341 trap_instruction_1_tl0:
    342         TRAP_INSTRUCTION 1
    343 
    344 /* TT = 0x102, TL = 0, trap_instruction_2 */
    345 .org trap_table + TT_TRAP_INSTRUCTION(2)*ENTRY_SIZE
    346 .global trap_instruction_2_tl0
    347 trap_instruction_2_tl0:
    348         TRAP_INSTRUCTION 2
    349 
    350 /* TT = 0x103, TL = 0, trap_instruction_3 */
    351 .org trap_table + TT_TRAP_INSTRUCTION(3)*ENTRY_SIZE
    352 .global trap_instruction_3_tl0
    353 trap_instruction_3_tl0:
    354         TRAP_INSTRUCTION 3
    355 
    356 /* TT = 0x104, TL = 0, trap_instruction_4 */
    357 .org trap_table + TT_TRAP_INSTRUCTION(4)*ENTRY_SIZE
    358 .global trap_instruction_4_tl0
    359 trap_instruction_4_tl0:
    360         TRAP_INSTRUCTION 4
    361 
    362 /* TT = 0x105, TL = 0, trap_instruction_5 */
    363 .org trap_table + TT_TRAP_INSTRUCTION(5)*ENTRY_SIZE
    364 .global trap_instruction_5_tl0
    365 trap_instruction_5_tl0:
    366         TRAP_INSTRUCTION 5
    367 
    368 /* TT = 0x106, TL = 0, trap_instruction_6 */
    369 .org trap_table + TT_TRAP_INSTRUCTION(6)*ENTRY_SIZE
    370 .global trap_instruction_6_tl0
    371 trap_instruction_6_tl0:
    372         TRAP_INSTRUCTION 6
    373 
    374 /* TT = 0x107, TL = 0, trap_instruction_7 */
    375 .org trap_table + TT_TRAP_INSTRUCTION(7)*ENTRY_SIZE
    376 .global trap_instruction_7_tl0
    377 trap_instruction_7_tl0:
    378         TRAP_INSTRUCTION 7
    379 
    380 /* TT = 0x108, TL = 0, trap_instruction_8 */
    381 .org trap_table + TT_TRAP_INSTRUCTION(8)*ENTRY_SIZE
    382 .global trap_instruction_8_tl0
    383 trap_instruction_8_tl0:
    384         TRAP_INSTRUCTION 8
    385 
    386 /* TT = 0x109, TL = 0, trap_instruction_9 */
    387 .org trap_table + TT_TRAP_INSTRUCTION(9)*ENTRY_SIZE
    388 .global trap_instruction_9_tl0
    389 trap_instruction_9_tl0:
    390         TRAP_INSTRUCTION 9
    391 
    392 /* TT = 0x10a, TL = 0, trap_instruction_10 */
    393 .org trap_table + TT_TRAP_INSTRUCTION(10)*ENTRY_SIZE
    394 .global trap_instruction_10_tl0
    395 trap_instruction_10_tl0:
    396         TRAP_INSTRUCTION 10
    397 
    398 /* TT = 0x10b, TL = 0, trap_instruction_11 */
    399 .org trap_table + TT_TRAP_INSTRUCTION(11)*ENTRY_SIZE
    400 .global trap_instruction_11_tl0
    401 trap_instruction_11_tl0:
    402         TRAP_INSTRUCTION 11
    403 
    404 /* TT = 0x10c, TL = 0, trap_instruction_12 */
    405 .org trap_table + TT_TRAP_INSTRUCTION(12)*ENTRY_SIZE
    406 .global trap_instruction_12_tl0
    407 trap_instruction_12_tl0:
    408         TRAP_INSTRUCTION 12
    409 
    410 /* TT = 0x10d, TL = 0, trap_instruction_13 */
    411 .org trap_table + TT_TRAP_INSTRUCTION(13)*ENTRY_SIZE
    412 .global trap_instruction_13_tl0
    413 trap_instruction_13_tl0:
    414         TRAP_INSTRUCTION 13
    415 
    416 /* TT = 0x10e, TL = 0, trap_instruction_14 */
    417 .org trap_table + TT_TRAP_INSTRUCTION(14)*ENTRY_SIZE
    418 .global trap_instruction_14_tl0
    419 trap_instruction_14_tl0:
    420         TRAP_INSTRUCTION 14
    421 
    422 /* TT = 0x10f, TL = 0, trap_instruction_15 */
    423 .org trap_table + TT_TRAP_INSTRUCTION(15)*ENTRY_SIZE
    424 .global trap_instruction_15_tl0
    425 trap_instruction_15_tl0:
    426         TRAP_INSTRUCTION 15
    427 
    428 /* TT = 0x110, TL = 0, trap_instruction_16 */
    429 .org trap_table + TT_TRAP_INSTRUCTION(16)*ENTRY_SIZE
    430 .global trap_instruction_16_tl0
    431 trap_instruction_16_tl0:
    432         TRAP_INSTRUCTION 16
    433 
    434 /* TT = 0x111, TL = 0, trap_instruction_17 */
    435 .org trap_table + TT_TRAP_INSTRUCTION(17)*ENTRY_SIZE
    436 .global trap_instruction_17_tl0
    437 trap_instruction_17_tl0:
    438         TRAP_INSTRUCTION 17
    439 
    440 /* TT = 0x112, TL = 0, trap_instruction_18 */
    441 .org trap_table + TT_TRAP_INSTRUCTION(18)*ENTRY_SIZE
    442 .global trap_instruction_18_tl0
    443 trap_instruction_18_tl0:
    444         TRAP_INSTRUCTION 18
    445 
    446 /* TT = 0x113, TL = 0, trap_instruction_19 */
    447 .org trap_table + TT_TRAP_INSTRUCTION(19)*ENTRY_SIZE
    448 .global trap_instruction_19_tl0
    449 trap_instruction_19_tl0:
    450         TRAP_INSTRUCTION 19
    451 
    452 /* TT = 0x114, TL = 0, trap_instruction_20 */
    453 .org trap_table + TT_TRAP_INSTRUCTION(20)*ENTRY_SIZE
    454 .global trap_instruction_20_tl0
    455 trap_instruction_20_tl0:
    456         TRAP_INSTRUCTION 20
    457 
    458 /* TT = 0x115, TL = 0, trap_instruction_21 */
    459 .org trap_table + TT_TRAP_INSTRUCTION(21)*ENTRY_SIZE
    460 .global trap_instruction_21_tl0
    461 trap_instruction_21_tl0:
    462         TRAP_INSTRUCTION 21
    463 
    464 /* TT = 0x116, TL = 0, trap_instruction_22 */
    465 .org trap_table + TT_TRAP_INSTRUCTION(22)*ENTRY_SIZE
    466 .global trap_instruction_22_tl0
    467 trap_instruction_22_tl0:
    468         TRAP_INSTRUCTION 22
    469 
    470 /* TT = 0x117, TL = 0, trap_instruction_23 */
    471 .org trap_table + TT_TRAP_INSTRUCTION(23)*ENTRY_SIZE
    472 .global trap_instruction_23_tl0
    473 trap_instruction_23_tl0:
    474         TRAP_INSTRUCTION 23
    475 
    476 /* TT = 0x118, TL = 0, trap_instruction_24 */
    477 .org trap_table + TT_TRAP_INSTRUCTION(24)*ENTRY_SIZE
    478 .global trap_instruction_24_tl0
    479 trap_instruction_24_tl0:
    480         TRAP_INSTRUCTION 24
    481 
    482 /* TT = 0x119, TL = 0, trap_instruction_25 */
    483 .org trap_table + TT_TRAP_INSTRUCTION(25)*ENTRY_SIZE
    484 .global trap_instruction_25_tl0
    485 trap_instruction_25_tl0:
    486         TRAP_INSTRUCTION 25
    487 
    488 /* TT = 0x11a, TL = 0, trap_instruction_26 */
    489 .org trap_table + TT_TRAP_INSTRUCTION(26)*ENTRY_SIZE
    490 .global trap_instruction_26_tl0
    491 trap_instruction_26_tl0:
    492         TRAP_INSTRUCTION 26
    493 
    494 /* TT = 0x11b, TL = 0, trap_instruction_27 */
    495 .org trap_table + TT_TRAP_INSTRUCTION(27)*ENTRY_SIZE
    496 .global trap_instruction_27_tl0
    497 trap_instruction_27_tl0:
    498         TRAP_INSTRUCTION 27
    499 
    500 /* TT = 0x11c, TL = 0, trap_instruction_28 */
    501 .org trap_table + TT_TRAP_INSTRUCTION(28)*ENTRY_SIZE
    502 .global trap_instruction_28_tl0
    503 trap_instruction_28_tl0:
    504         TRAP_INSTRUCTION 28
    505 
    506 /* TT = 0x11d, TL = 0, trap_instruction_29 */
    507 .org trap_table + TT_TRAP_INSTRUCTION(29)*ENTRY_SIZE
    508 .global trap_instruction_29_tl0
    509 trap_instruction_29_tl0:
    510         TRAP_INSTRUCTION 29
    511 
    512 /* TT = 0x11e, TL = 0, trap_instruction_30 */
    513 .org trap_table + TT_TRAP_INSTRUCTION(30)*ENTRY_SIZE
    514 .global trap_instruction_30_tl0
    515 trap_instruction_30_tl0:
    516         TRAP_INSTRUCTION 30
    517 
    518 /* TT = 0x11f, TL = 0, trap_instruction_31 */
    519 .org trap_table + TT_TRAP_INSTRUCTION(31)*ENTRY_SIZE
    520 .global trap_instruction_31_tl0
    521 trap_instruction_31_tl0:
    522         TRAP_INSTRUCTION 31
    523 
    524 /* TT = 0x120, TL = 0, trap_instruction_32 */
    525 .org trap_table + TT_TRAP_INSTRUCTION(32)*ENTRY_SIZE
    526 .global trap_instruction_32_tl0
    527 trap_instruction_32_tl0:
    528         TRAP_INSTRUCTION 32
    529 
    530 /* TT = 0x121, TL = 0, trap_instruction_33 */
    531 .org trap_table + TT_TRAP_INSTRUCTION(33)*ENTRY_SIZE
    532 .global trap_instruction_33_tl0
    533 trap_instruction_33_tl0:
    534         TRAP_INSTRUCTION 33
    535 
    536 /* TT = 0x122, TL = 0, trap_instruction_34 */
    537 .org trap_table + TT_TRAP_INSTRUCTION(34)*ENTRY_SIZE
    538 .global trap_instruction_34_tl0
    539 trap_instruction_34_tl0:
    540         TRAP_INSTRUCTION 34
    541 
    542 /* TT = 0x123, TL = 0, trap_instruction_35 */
    543 .org trap_table + TT_TRAP_INSTRUCTION(35)*ENTRY_SIZE
    544 .global trap_instruction_35_tl0
    545 trap_instruction_35_tl0:
    546         TRAP_INSTRUCTION 35
    547 
    548 /* TT = 0x124, TL = 0, trap_instruction_36 */
    549 .org trap_table + TT_TRAP_INSTRUCTION(36)*ENTRY_SIZE
    550 .global trap_instruction_36_tl0
    551 trap_instruction_36_tl0:
    552         TRAP_INSTRUCTION 36
    553 
    554 /* TT = 0x125, TL = 0, trap_instruction_37 */
    555 .org trap_table + TT_TRAP_INSTRUCTION(37)*ENTRY_SIZE
    556 .global trap_instruction_37_tl0
    557 trap_instruction_37_tl0:
    558         TRAP_INSTRUCTION 37
    559 
    560 /* TT = 0x126, TL = 0, trap_instruction_38 */
    561 .org trap_table + TT_TRAP_INSTRUCTION(38)*ENTRY_SIZE
    562 .global trap_instruction_38_tl0
    563 trap_instruction_38_tl0:
    564         TRAP_INSTRUCTION 38
    565 
    566 /* TT = 0x127, TL = 0, trap_instruction_39 */
    567 .org trap_table + TT_TRAP_INSTRUCTION(39)*ENTRY_SIZE
    568 .global trap_instruction_39_tl0
    569 trap_instruction_39_tl0:
    570         TRAP_INSTRUCTION 39
    571 
    572 /* TT = 0x128, TL = 0, trap_instruction_40 */
    573 .org trap_table + TT_TRAP_INSTRUCTION(40)*ENTRY_SIZE
    574 .global trap_instruction_40_tl0
    575 trap_instruction_40_tl0:
    576         TRAP_INSTRUCTION 40
     332/* TT = 0x100 - 0x17f, TL = 0, trap_instruction_0 - trap_instruction_7f */
     333.irp cur, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,\
     334    20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,\
     335    39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,\
     336    58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,\
     337    77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,\
     338    96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,\
     339    112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,\
     340    127
     341.org trap_table + (TT_TRAP_INSTRUCTION_0+\cur)*ENTRY_SIZE
     342.global trap_instruction_\cur\()_tl0
     343trap_instruction_\cur\()_tl0:
     344        ba trap_instruction_handler
     345        mov \cur, %g2
     346.endr
    577347
    578348/*
Note: See TracChangeset for help on using the changeset viewer.