Revision 967032c3 cpu-all.h
b/cpu-all.h | ||
---|---|---|
700 | 700 |
|
701 | 701 |
/* page related stuff */ |
702 | 702 |
|
703 |
#define TARGET_PAGE_SIZE (1 << TARGET_PAGE_BITS) |
|
703 |
#define TARGET_PAGE_SIZE (1UL << TARGET_PAGE_BITS)
|
|
704 | 704 |
#define TARGET_PAGE_MASK ~(TARGET_PAGE_SIZE - 1) |
705 | 705 |
#define TARGET_PAGE_ALIGN(addr) (((addr) + TARGET_PAGE_SIZE - 1) & TARGET_PAGE_MASK) |
706 | 706 |
|
... | ... | |
806 | 806 |
int cpu_inl(CPUState *env, int addr); |
807 | 807 |
#endif |
808 | 808 |
|
809 |
/* address in the RAM (different from a physical address) */ |
|
810 |
typedef unsigned long ram_addr_t; |
|
811 |
|
|
809 | 812 |
/* memory API */ |
810 | 813 |
|
811 |
extern int phys_ram_size;
|
|
814 |
extern ram_addr_t phys_ram_size;
|
|
812 | 815 |
extern int phys_ram_fd; |
813 | 816 |
extern uint8_t *phys_ram_base; |
814 | 817 |
extern uint8_t *phys_ram_dirty; |
818 |
extern ram_addr_t ram_size; |
|
815 | 819 |
|
816 | 820 |
/* physical memory access */ |
817 | 821 |
#define TLB_INVALID_MASK (1 << 3) |
... | ... | |
833 | 837 |
typedef uint32_t CPUReadMemoryFunc(void *opaque, target_phys_addr_t addr); |
834 | 838 |
|
835 | 839 |
void cpu_register_physical_memory(target_phys_addr_t start_addr, |
836 |
unsigned long size,
|
|
837 |
unsigned long phys_offset);
|
|
838 |
uint32_t cpu_get_physical_page_desc(target_phys_addr_t addr);
|
|
839 |
ram_addr_t qemu_ram_alloc(unsigned int size);
|
|
840 |
ram_addr_t size,
|
|
841 |
ram_addr_t phys_offset);
|
|
842 |
ram_addr_t cpu_get_physical_page_desc(target_phys_addr_t addr);
|
|
843 |
ram_addr_t qemu_ram_alloc(ram_addr_t);
|
|
840 | 844 |
void qemu_ram_free(ram_addr_t addr); |
841 | 845 |
int cpu_register_io_memory(int io_index, |
842 | 846 |
CPUReadMemoryFunc **mem_read, |
Also available in: Unified diff