Ignore:
Timestamp:
2014-08-25T22:02:52Z (10 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
df7f5cea
Parents:
9222f9b
Message:

Only one ppc32 istate_t definition to rule them all.

File:
1 edited

Legend:

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

    r9222f9b r6dbe7f68  
    4040#ifdef KERNEL
    4141
     42#include <typedefs.h>
    4243#include <arch/msr.h>
    4344
    4445#else /* KERNEL */
    4546
     47#include <sys/types.h>
    4648#include <libarch/msr.h>
    4749
     
    8183        uint32_t cr;
    8284        uint32_t pc;
    83         uint32_t msr;
     85        uint32_t srr1;
    8486        uint32_t lr;
    8587        uint32_t ctr;
     
    98100/** Return true if exception happened while in userspace
    99101 *
     102 * The contexts of MSR register was stored in SRR1.
     103 *
    100104 */
    101105NO_TRACE static inline int istate_from_uspace(istate_t *istate)
    102106{
    103         return (istate->msr & MSR_PR) != 0;
     107        return (istate->srr1 & MSR_PR) != 0;
    104108}
    105109
    106 NO_TRACE static inline uintptr_t istate_get_pc(istate_t *istate)
     110NO_TRACE static inline sysarg_t istate_get_pc(istate_t *istate)
    107111{
    108112        return istate->pc;
    109113}
    110114
    111 NO_TRACE static inline uintptr_t istate_get_fp(istate_t *istate)
     115NO_TRACE static inline sysarg_t istate_get_fp(istate_t *istate)
    112116{
    113117        return istate->sp;
    114118}
     119
    115120
    116121#endif
Note: See TracChangeset for help on using the changeset viewer.