Revision be20f9e9 hw/cirrus_vga.c
b/hw/cirrus_vga.c | ||
---|---|---|
32 | 32 |
#include "console.h" |
33 | 33 |
#include "vga_int.h" |
34 | 34 |
#include "loader.h" |
35 |
#include "exec-memory.h" |
|
36 | 35 |
|
37 | 36 |
/* |
38 | 37 |
* TODO: |
... | ... | |
2801 | 2800 |
}, |
2802 | 2801 |
}; |
2803 | 2802 |
|
2804 |
static void cirrus_init_common(CirrusVGAState * s, int device_id, int is_pci) |
|
2803 |
static void cirrus_init_common(CirrusVGAState * s, int device_id, int is_pci, |
|
2804 |
MemoryRegion *system_memory) |
|
2805 | 2805 |
{ |
2806 | 2806 |
int i; |
2807 | 2807 |
static int inited; |
... | ... | |
2854 | 2854 |
memory_region_init_io(&s->low_mem, &cirrus_vga_mem_ops, s, |
2855 | 2855 |
"cirrus-low-memory", 0x20000); |
2856 | 2856 |
memory_region_add_subregion(&s->low_mem_container, 0, &s->low_mem); |
2857 |
memory_region_add_subregion_overlap(get_system_memory(),
|
|
2857 |
memory_region_add_subregion_overlap(system_memory,
|
|
2858 | 2858 |
isa_mem_base + 0x000a0000, |
2859 | 2859 |
&s->low_mem_container, |
2860 | 2860 |
1); |
... | ... | |
2897 | 2897 |
* |
2898 | 2898 |
***************************************/ |
2899 | 2899 |
|
2900 |
void isa_cirrus_vga_init(void)
|
|
2900 |
void isa_cirrus_vga_init(MemoryRegion *system_memory)
|
|
2901 | 2901 |
{ |
2902 | 2902 |
CirrusVGAState *s; |
2903 | 2903 |
|
2904 | 2904 |
s = g_malloc0(sizeof(CirrusVGAState)); |
2905 | 2905 |
|
2906 | 2906 |
vga_common_init(&s->vga, VGA_RAM_SIZE); |
2907 |
cirrus_init_common(s, CIRRUS_ID_CLGD5430, 0); |
|
2907 |
cirrus_init_common(s, CIRRUS_ID_CLGD5430, 0, system_memory);
|
|
2908 | 2908 |
s->vga.ds = graphic_console_init(s->vga.update, s->vga.invalidate, |
2909 | 2909 |
s->vga.screen_dump, s->vga.text_update, |
2910 | 2910 |
&s->vga); |
... | ... | |
2928 | 2928 |
|
2929 | 2929 |
/* setup VGA */ |
2930 | 2930 |
vga_common_init(&s->vga, VGA_RAM_SIZE); |
2931 |
cirrus_init_common(s, device_id, 1); |
|
2931 |
cirrus_init_common(s, device_id, 1, pci_address_space(dev));
|
|
2932 | 2932 |
s->vga.ds = graphic_console_init(s->vga.update, s->vga.invalidate, |
2933 | 2933 |
s->vga.screen_dump, s->vga.text_update, |
2934 | 2934 |
&s->vga); |
Also available in: Unified diff