Commit 5f21aef2b0e53b9c179d36cba6004df785500ac1

Authored by bellard
1 parent 829309c7

suppressed unneeded header


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@832 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 12 additions and 14 deletions
target-ppc/helper.c
@@ -17,8 +17,6 @@ @@ -17,8 +17,6 @@
17 * License along with this library; if not, write to the Free Software 17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */ 19 */
20 -#include <sys/mman.h>  
21 -  
22 #include "exec.h" 20 #include "exec.h"
23 #if defined (USE_OPEN_FIRMWARE) 21 #if defined (USE_OPEN_FIRMWARE)
24 #include <time.h> 22 #include <time.h>
@@ -133,14 +131,14 @@ static int get_bat (CPUState *env, uint32_t *real, int *prot, @@ -133,14 +131,14 @@ static int get_bat (CPUState *env, uint32_t *real, int *prot,
133 ((virtual & 0x0FFE0000 & bl) | (*BATl & 0x0FFE0000)) | 131 ((virtual & 0x0FFE0000 & bl) | (*BATl & 0x0FFE0000)) |
134 (virtual & 0x0001F000); 132 (virtual & 0x0001F000);
135 if (*BATl & 0x00000001) 133 if (*BATl & 0x00000001)
136 - *prot = PROT_READ; 134 + *prot = PAGE_READ;
137 if (*BATl & 0x00000002) 135 if (*BATl & 0x00000002)
138 - *prot = PROT_WRITE | PROT_READ; 136 + *prot = PAGE_WRITE | PAGE_READ;
139 #if defined (DEBUG_BATS) 137 #if defined (DEBUG_BATS)
140 if (loglevel > 0) { 138 if (loglevel > 0) {
141 fprintf(logfile, "BAT %d match: r 0x%08x prot=%c%c\n", 139 fprintf(logfile, "BAT %d match: r 0x%08x prot=%c%c\n",
142 - i, *real, *prot & PROT_READ ? 'R' : '-',  
143 - *prot & PROT_WRITE ? 'W' : '-'); 140 + i, *real, *prot & PAGE_READ ? 'R' : '-',
  141 + *prot & PAGE_WRITE ? 'W' : '-');
144 } 142 }
145 #endif 143 #endif
146 ret = 0; 144 ret = 0;
@@ -203,9 +201,9 @@ static int find_pte (uint32_t *RPN, int *prot, uint32_t base, uint32_t va, @@ -203,9 +201,9 @@ static int find_pte (uint32_t *RPN, int *prot, uint32_t base, uint32_t va,
203 } 201 }
204 /* Check access rights */ 202 /* Check access rights */
205 if (key == 0) { 203 if (key == 0) {
206 - access = PROT_READ; 204 + access = PAGE_READ;
207 if ((pte1 & 0x00000003) != 0x3) 205 if ((pte1 & 0x00000003) != 0x3)
208 - access |= PROT_WRITE; 206 + access |= PAGE_WRITE;
209 } else { 207 } else {
210 switch (pte1 & 0x00000003) { 208 switch (pte1 & 0x00000003) {
211 case 0x0: 209 case 0x0:
@@ -213,16 +211,16 @@ static int find_pte (uint32_t *RPN, int *prot, uint32_t base, uint32_t va, @@ -213,16 +211,16 @@ static int find_pte (uint32_t *RPN, int *prot, uint32_t base, uint32_t va,
213 break; 211 break;
214 case 0x1: 212 case 0x1:
215 case 0x3: 213 case 0x3:
216 - access = PROT_READ; 214 + access = PAGE_READ;
217 break; 215 break;
218 case 0x2: 216 case 0x2:
219 - access = PROT_READ | PROT_WRITE; 217 + access = PAGE_READ | PAGE_WRITE;
220 break; 218 break;
221 } 219 }
222 } 220 }
223 if (ret < 0) { 221 if (ret < 0) {
224 - if ((rw == 0 && (access & PROT_READ)) ||  
225 - (rw == 1 && (access & PROT_WRITE))) { 222 + if ((rw == 0 && (access & PAGE_READ)) ||
  223 + (rw == 1 && (access & PAGE_WRITE))) {
226 #if defined (DEBUG_MMU) 224 #if defined (DEBUG_MMU)
227 if (loglevel > 0) 225 if (loglevel > 0)
228 fprintf(logfile, "PTE access granted !\n"); 226 fprintf(logfile, "PTE access granted !\n");
@@ -264,7 +262,7 @@ static int find_pte (uint32_t *RPN, int *prot, uint32_t base, uint32_t va, @@ -264,7 +262,7 @@ static int find_pte (uint32_t *RPN, int *prot, uint32_t base, uint32_t va,
264 store = 1; 262 store = 1;
265 } else { 263 } else {
266 /* Force page fault for first write access */ 264 /* Force page fault for first write access */
267 - *prot &= ~PROT_WRITE; 265 + *prot &= ~PAGE_WRITE;
268 } 266 }
269 } 267 }
270 if (store) { 268 if (store) {
@@ -409,7 +407,7 @@ int get_physical_address (CPUState *env, uint32_t *physical, int *prot, @@ -409,7 +407,7 @@ int get_physical_address (CPUState *env, uint32_t *physical, int *prot,
409 if ((access_type == ACCESS_CODE && msr_ir == 0) || msr_dr == 0) { 407 if ((access_type == ACCESS_CODE && msr_ir == 0) || msr_dr == 0) {
410 /* No address translation */ 408 /* No address translation */
411 *physical = address & ~0xFFF; 409 *physical = address & ~0xFFF;
412 - *prot = PROT_READ | PROT_WRITE; 410 + *prot = PAGE_READ | PAGE_WRITE;
413 ret = 0; 411 ret = 0;
414 } else { 412 } else {
415 /* Try to find a BAT */ 413 /* Try to find a BAT */