Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 77385fe in mainline


Ignore:
Timestamp:
2010-07-07T19:52:47Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial
Children:
0737078
Parents:
09b859c
Message:

Reorganize the ia32 istate_t slightly so that it can also be used by the
syscall handlers.

Location:
kernel/arch/ia32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/include/interrupt.h

    r09b859c r77385fe  
    7272
    7373typedef struct istate {
     74        /*
     75         * The strange order of the GPRs is given by the requirement to use the
     76         * istate structure for both regular interrupts and exceptions as well
     77         * as for syscall handler which use this order as an optimization.
     78         */
     79        uint32_t edx;
     80        uint32_t ecx;
     81        uint32_t ebx;
     82        uint32_t esi;
     83        uint32_t edi;
     84        uint32_t ebp;
    7485        uint32_t eax;
    75         uint32_t ebx;
    76         uint32_t ecx;
    77         uint32_t edx;
    78         uint32_t edi;
    79         uint32_t esi;
    80         uint32_t ebp;
    8186       
    8287        uint32_t ebp_frame;  /* imitation of frame pointer linkage */
  • kernel/arch/ia32/src/asm.S

    r09b859c r77385fe  
    205205        sysexit   /* return to userspace */
    206206
    207 #define ISTATE_OFFSET_EAX         0
    208 #define ISTATE_OFFSET_EBX         4
    209 #define ISTATE_OFFSET_ECX         8
    210 #define ISTATE_OFFSET_EDX         12
    211 #define ISTATE_OFFSET_EDI         16
    212 #define ISTATE_OFFSET_ESI         20
    213 #define ISTATE_OFFSET_EBP         24
     207#define ISTATE_OFFSET_EDX         0
     208#define ISTATE_OFFSET_ECX         4
     209#define ISTATE_OFFSET_EBX         8
     210#define ISTATE_OFFSET_ESI         12
     211#define ISTATE_OFFSET_EDI         16 
     212#define ISTATE_OFFSET_EBP         20
     213#define ISTATE_OFFSET_EAX         24
    214214#define ISTATE_OFFSET_EBP_FRAME   28
    215215#define ISTATE_OFFSET_EIP_FRAME   32
Note: See TracChangeset for help on using the changeset viewer.