Use __asm __volatile. Use _POWERPC_SPR_H_
Add PTE_RO/PTE_RW for old pmap.
This commit is contained in:
parent
e25aa0ea82
commit
dde0daca06
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pte.h,v 1.4 2001/06/21 18:03:37 matt Exp $ */
|
||||
/* $NetBSD: pte.h,v 1.5 2001/06/23 03:16:12 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
|
@ -65,6 +65,8 @@ struct pte {
|
|||
#define PTE_SW 0x00000001 /* Super. Write-Only (U: RO, S: RW) */
|
||||
#define PTE_BW 0x00000002 /* Supervisor (U: RW, S: RW) */
|
||||
#define PTE_BR 0x00000003 /* Both Read Only (U: RO, S: RO) */
|
||||
#define PTE_RW PTE_BW
|
||||
#define PTE_RO PTE_BR
|
||||
|
||||
#ifndef _LOCORE
|
||||
typedef struct pte pte_t;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#ifndef _SPR_H_
|
||||
#define _SPR_H_
|
||||
#ifndef _POWERPC_SPR_H_
|
||||
#define _POWERPC_SPR_H_
|
||||
|
||||
#ifndef _LOCORE
|
||||
#define mtspr(reg, val) \
|
||||
asm volatile("mtspr %0,%1" : : "K"(reg), "r"(val))
|
||||
#define mfspr(reg) \
|
||||
( { u_int32_t val; \
|
||||
asm volatile("mfspr %0,%1" : "=r"(val) : "K"(reg)); \
|
||||
#define mtspr(reg, val) \
|
||||
__asm __volatile("mtspr %0,%1" : : "K"(reg), "r"(val))
|
||||
#define mfspr(reg) \
|
||||
( { u_int32_t val; \
|
||||
__asm __volatile("mfspr %0,%1" : "=r"(val) : "K"(reg)); \
|
||||
val; } )
|
||||
#endif /* _LOCORE */
|
||||
|
||||
|
@ -170,4 +170,4 @@
|
|||
#define TBR_TBL 0x10c /* 468 Time Base Lower */
|
||||
#define TBR_TBU 0x10d /* 468 Time Base Upper */
|
||||
|
||||
#endif /* !_SPR_H_ */
|
||||
#endif /* !_POWERPC_SPR_H_ */
|
||||
|
|
Loading…
Reference in New Issue