1 |
/* |
/* |
2 |
* Copyright (C) 2005 Anders Gavare. All rights reserved. |
* Copyright (C) 2005-2006 Anders Gavare. All rights reserved. |
3 |
* |
* |
4 |
* Redistribution and use in source and binary forms, with or without |
* Redistribution and use in source and binary forms, with or without |
5 |
* modification, are permitted provided that the following conditions are met: |
* modification, are permitted provided that the following conditions are met: |
25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: memory_ppc.c,v 1.24 2006/06/24 21:47:23 debug Exp $ |
* $Id: memory_ppc.c,v 1.26 2006/09/30 05:57:08 debug Exp $ |
29 |
* |
* |
30 |
* Included from cpu_ppc.c. |
* Included from cpu_ppc.c. |
31 |
*/ |
*/ |
107 |
static int get_pte_low(struct cpu *cpu, uint64_t pteg_select, |
static int get_pte_low(struct cpu *cpu, uint64_t pteg_select, |
108 |
uint32_t *lowp, uint32_t cmp) |
uint32_t *lowp, uint32_t cmp) |
109 |
{ |
{ |
110 |
unsigned char *d = memory_paddr_to_hostaddr(cpu->mem, pteg_select, 1) |
unsigned char *d = memory_paddr_to_hostaddr(cpu->mem, pteg_select, 1); |
|
+ (pteg_select & ((1 << BITS_PER_MEMBLOCK) - 1)); |
|
111 |
int i; |
int i; |
112 |
|
|
113 |
for (i=0; i<8; i++) { |
for (i=0; i<8; i++) { |
213 |
/* |
/* |
214 |
* ppc_translate_v2p(): |
* ppc_translate_v2p(): |
215 |
* |
* |
216 |
* Don't call this function is userland_emul is non-NULL, or cpu is NULL. |
* Don't call this function if userland_emul is non-NULL, or cpu is NULL. |
217 |
* |
* |
218 |
* Return values: |
* Return values: |
219 |
* 0 Failure |
* 0 Failure |