Changeset 2e311da in mainline


Ignore:
Timestamp:
2019-06-15T09:27:55Z (5 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
180e132
Parents:
4d32b16
Message:

Base istate_from_uspace on the interrupted CPL

Location:
kernel/arch/ia64/include/arch
Files:
3 edited

Legend:

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

    r4d32b16 r2e311da  
    7171_NO_TRACE static inline int istate_from_uspace(istate_t *istate)
    7272{
    73         return (istate->cr_iip) < 0xe000000000000000ULL;
     73        return istate->cr_ipsr.cpl == PSR_CPL_USER;
    7474}
    7575
  • kernel/arch/ia64/include/arch/mm/page.h

    r4d32b16 r2e311da  
    3838
    3939#include <arch/mm/frame.h>
     40#include <arch/register.h>
    4041
    4142#ifndef __ASSEMBLER__
     
    7677
    7778/** Privilege Levels. Only the most and the least privileged ones are ever used. */
    78 #define PL_KERNEL  0x00
    79 #define PL_USER    0x03
     79#define PL_KERNEL  PSR_CPL_KERNEL
     80#define PL_USER    PSR_CPL_USER
    8081
    8182/* Access Rigths. Only certain combinations are used by the kernel. */
  • kernel/arch/ia64/include/arch/register.h

    r4d32b16 r2e311da  
    5757#define PSR_RT_MASK   (1 << 27)
    5858#define PSR_IT_MASK   (1 << 36)
     59
     60#define PSR_CPL_USER   3
     61#define PSR_CPL_KERNEL 0
    5962
    6063#define PSR_CPL_SHIFT         32
Note: See TracChangeset for help on using the changeset viewer.