Ignore:
Timestamp:
Jul 13, 2017, 9:28:06 AM (7 years ago)
Author:
max@…
Message:

build the context

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/x86_64/core/hal_kentry.h

    r146 r193  
    4949#define TF_REGSIZE      (19 * 8)
    5050
     51#define PSL_I           0x00000200
     52#define PSL_MBO         0x00000002
     53#define PSL_USERSET     (PSL_MBO | PSL_I)
     54
    5155#define INTR_SAVE_REGS  \
    5256        subq    $TF_REGSIZE,%rsp        ; \
     
    98102
    99103/*
    100  * The x86_64 trap frame.
     104 * The x86_64 CPU context.
    101105 */
    102 struct trapframe {
     106typedef struct hal_cpu_context_s {
    103107        /* Pushed by INTR_SAVE_REGS */
    104108        uint64_t tf_rax;
     
    125129        uint64_t tf_trapno;
    126130
    127         /* These are pushed for a trap */
     131        /* Pushed by the hardware if trap */
    128132        uint64_t tf_err;
    129133        uint64_t tf_rip;
     
    131135        uint64_t tf_rflags;
    132136
    133         /* These are always pushed */
     137        /* Always pushed by the hardware */
    134138        uint64_t tf_rsp;
    135139        uint64_t tf_ss;
    136 };
     140} hal_cpu_context_t;
    137141
    138142/*
Note: See TracChangeset for help on using the changeset viewer.