Revision 06e12b65 target-sparc/cpu.h

b/target-sparc/cpu.h
292 292
#define TTE_VALID_BIT       (1ULL << 63)
293 293
#define TTE_USED_BIT        (1ULL << 41)
294 294
#define TTE_LOCKED_BIT      (1ULL <<  6)
295
#define TTE_PRIV_BIT        (1ULL <<  2)
296
#define TTE_W_OK_BIT        (1ULL <<  1)
295 297
#define TTE_GLOBAL_BIT      (1ULL <<  0)
296 298

  
297 299
#define TTE_IS_VALID(tte)   ((tte) & TTE_VALID_BIT)
298 300
#define TTE_IS_USED(tte)    ((tte) & TTE_USED_BIT)
299 301
#define TTE_IS_LOCKED(tte)  ((tte) & TTE_LOCKED_BIT)
302
#define TTE_IS_PRIV(tte)    ((tte) & TTE_PRIV_BIT)
303
#define TTE_IS_W_OK(tte)    ((tte) & TTE_W_OK_BIT)
300 304
#define TTE_IS_GLOBAL(tte)  ((tte) & TTE_GLOBAL_BIT)
301 305

  
302 306
#define TTE_SET_USED(tte)   ((tte) |= TTE_USED_BIT)
303 307
#define TTE_SET_UNUSED(tte) ((tte) &= ~TTE_USED_BIT)
304 308

  
309
#define TTE_PGSIZE(tte)     (((tte) >> 61) & 3ULL)
310
#define TTE_PA(tte)         ((tte) & 0x1ffffffe000ULL)
311

  
305 312
typedef struct SparcTLBEntry {
306 313
    uint64_t tag;
307 314
    uint64_t tte;

Also available in: Unified diff