mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-29 05:13:54 -06:00
Rename target_phys_addr_t to hwaddr
target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are reserved) and its purpose doesn't match the name (most target_phys_addr_t addresses are not target specific). Replace it with a finger-friendly, standards conformant hwaddr. Outstanding patchsets can be fixed up with the command git rebase -i --exec 'find -name "*.[ch]" | xargs s/target_phys_addr_t/hwaddr/g' origin Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
50d2b4d93f
commit
a8170e5e97
383 changed files with 2240 additions and 2240 deletions
|
@ -16,10 +16,10 @@
|
|||
#include "memory_mapping.h"
|
||||
|
||||
/* PAE Paging or IA-32e Paging */
|
||||
static void walk_pte(MemoryMappingList *list, target_phys_addr_t pte_start_addr,
|
||||
static void walk_pte(MemoryMappingList *list, hwaddr pte_start_addr,
|
||||
int32_t a20_mask, target_ulong start_line_addr)
|
||||
{
|
||||
target_phys_addr_t pte_addr, start_paddr;
|
||||
hwaddr pte_addr, start_paddr;
|
||||
uint64_t pte;
|
||||
target_ulong start_vaddr;
|
||||
int i;
|
||||
|
@ -46,10 +46,10 @@ static void walk_pte(MemoryMappingList *list, target_phys_addr_t pte_start_addr,
|
|||
|
||||
/* 32-bit Paging */
|
||||
static void walk_pte2(MemoryMappingList *list,
|
||||
target_phys_addr_t pte_start_addr, int32_t a20_mask,
|
||||
hwaddr pte_start_addr, int32_t a20_mask,
|
||||
target_ulong start_line_addr)
|
||||
{
|
||||
target_phys_addr_t pte_addr, start_paddr;
|
||||
hwaddr pte_addr, start_paddr;
|
||||
uint32_t pte;
|
||||
target_ulong start_vaddr;
|
||||
int i;
|
||||
|
@ -75,10 +75,10 @@ static void walk_pte2(MemoryMappingList *list,
|
|||
}
|
||||
|
||||
/* PAE Paging or IA-32e Paging */
|
||||
static void walk_pde(MemoryMappingList *list, target_phys_addr_t pde_start_addr,
|
||||
static void walk_pde(MemoryMappingList *list, hwaddr pde_start_addr,
|
||||
int32_t a20_mask, target_ulong start_line_addr)
|
||||
{
|
||||
target_phys_addr_t pde_addr, pte_start_addr, start_paddr;
|
||||
hwaddr pde_addr, pte_start_addr, start_paddr;
|
||||
uint64_t pde;
|
||||
target_ulong line_addr, start_vaddr;
|
||||
int i;
|
||||
|
@ -112,10 +112,10 @@ static void walk_pde(MemoryMappingList *list, target_phys_addr_t pde_start_addr,
|
|||
|
||||
/* 32-bit Paging */
|
||||
static void walk_pde2(MemoryMappingList *list,
|
||||
target_phys_addr_t pde_start_addr, int32_t a20_mask,
|
||||
hwaddr pde_start_addr, int32_t a20_mask,
|
||||
bool pse)
|
||||
{
|
||||
target_phys_addr_t pde_addr, pte_start_addr, start_paddr;
|
||||
hwaddr pde_addr, pte_start_addr, start_paddr;
|
||||
uint32_t pde;
|
||||
target_ulong line_addr, start_vaddr;
|
||||
int i;
|
||||
|
@ -149,9 +149,9 @@ static void walk_pde2(MemoryMappingList *list,
|
|||
|
||||
/* PAE Paging */
|
||||
static void walk_pdpe2(MemoryMappingList *list,
|
||||
target_phys_addr_t pdpe_start_addr, int32_t a20_mask)
|
||||
hwaddr pdpe_start_addr, int32_t a20_mask)
|
||||
{
|
||||
target_phys_addr_t pdpe_addr, pde_start_addr;
|
||||
hwaddr pdpe_addr, pde_start_addr;
|
||||
uint64_t pdpe;
|
||||
target_ulong line_addr;
|
||||
int i;
|
||||
|
@ -173,10 +173,10 @@ static void walk_pdpe2(MemoryMappingList *list,
|
|||
#ifdef TARGET_X86_64
|
||||
/* IA-32e Paging */
|
||||
static void walk_pdpe(MemoryMappingList *list,
|
||||
target_phys_addr_t pdpe_start_addr, int32_t a20_mask,
|
||||
hwaddr pdpe_start_addr, int32_t a20_mask,
|
||||
target_ulong start_line_addr)
|
||||
{
|
||||
target_phys_addr_t pdpe_addr, pde_start_addr, start_paddr;
|
||||
hwaddr pdpe_addr, pde_start_addr, start_paddr;
|
||||
uint64_t pdpe;
|
||||
target_ulong line_addr, start_vaddr;
|
||||
int i;
|
||||
|
@ -210,9 +210,9 @@ static void walk_pdpe(MemoryMappingList *list,
|
|||
|
||||
/* IA-32e Paging */
|
||||
static void walk_pml4e(MemoryMappingList *list,
|
||||
target_phys_addr_t pml4e_start_addr, int32_t a20_mask)
|
||||
hwaddr pml4e_start_addr, int32_t a20_mask)
|
||||
{
|
||||
target_phys_addr_t pml4e_addr, pdpe_start_addr;
|
||||
hwaddr pml4e_addr, pdpe_start_addr;
|
||||
uint64_t pml4e;
|
||||
target_ulong line_addr;
|
||||
int i;
|
||||
|
@ -242,20 +242,20 @@ int cpu_get_memory_mapping(MemoryMappingList *list, CPUArchState *env)
|
|||
if (env->cr[4] & CR4_PAE_MASK) {
|
||||
#ifdef TARGET_X86_64
|
||||
if (env->hflags & HF_LMA_MASK) {
|
||||
target_phys_addr_t pml4e_addr;
|
||||
hwaddr pml4e_addr;
|
||||
|
||||
pml4e_addr = (env->cr[3] & ~0xfff) & env->a20_mask;
|
||||
walk_pml4e(list, pml4e_addr, env->a20_mask);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
target_phys_addr_t pdpe_addr;
|
||||
hwaddr pdpe_addr;
|
||||
|
||||
pdpe_addr = (env->cr[3] & ~0x1f) & env->a20_mask;
|
||||
walk_pdpe2(list, pdpe_addr, env->a20_mask);
|
||||
}
|
||||
} else {
|
||||
target_phys_addr_t pde_addr;
|
||||
hwaddr pde_addr;
|
||||
bool pse;
|
||||
|
||||
pde_addr = (env->cr[3] & ~0xfff) & env->a20_mask;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue