Ignore:
Timestamp:
2018-09-11T21:01:08Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e38ff16
Parents:
d2c91ab
Message:

ia64: Use appropriate imm21 operand with BREAK

This commit changes the imm21 used with the BREAK instruction to conform
to the IA-64 Software Conventions and Runtime Architecture Guide. This
is necessary to be able to distinguish syscalls from compiler-generated
calls to architected software interrupts (e.g. integer divide by zero).

In order to be able to test the used immediate in break_instruction(),
we extend istate_t to hold the CR.IIM register.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia64/include/arch/istate_struct.h

    rd2c91ab r70259a55  
    7272#define ISTATE_OFFSET_CR_IPSR           0x230
    7373#define ISTATE_OFFSET_CR_IIP            0x238
    74 #define ISTATE_OFFSET_PR                0x240
    75 #define ISTATE_OFFSET_SP                0x248
    76 #define ISTATE_OFFSET_IN0               0x250
    77 #define ISTATE_OFFSET_IN1               0x258
    78 #define ISTATE_OFFSET_IN2               0x260
    79 #define ISTATE_OFFSET_IN3               0x268
    80 #define ISTATE_OFFSET_IN4               0x270
    81 #define ISTATE_OFFSET_IN5               0x278
    82 #define ISTATE_OFFSET_IN6               0x280
     74#define ISTATE_OFFSET_CR_IIM            0x240
     75#define ISTATE_OFFSET_PR                0x248
     76#define ISTATE_OFFSET_SP                0x250
     77#define ISTATE_OFFSET_IN0               0x258
     78#define ISTATE_OFFSET_IN1               0x260
     79#define ISTATE_OFFSET_IN2               0x268
     80#define ISTATE_OFFSET_IN3               0x270
     81#define ISTATE_OFFSET_IN4               0x278
     82#define ISTATE_OFFSET_IN5               0x280
     83#define ISTATE_OFFSET_IN6               0x288
    8384#define ISTATE_SIZE                     0x290
    8485
     
    138139        psr_t cr_ipsr;
    139140        uintptr_t cr_iip;
     141        uint64_t cr_iim;
    140142        uint64_t pr;
    141143        uintptr_t sp;
Note: See TracChangeset for help on using the changeset viewer.