root / hw / vga-isa.c @ c0b1905b
History | View | Annotate | Download (1.8 kB)
1 | 76323919 | Juan Quintela | /*
|
---|---|---|---|
2 | 76323919 | Juan Quintela | * QEMU ISA VGA Emulator.
|
3 | 76323919 | Juan Quintela | *
|
4 | 76323919 | Juan Quintela | * Copyright (c) 2003 Fabrice Bellard
|
5 | 76323919 | Juan Quintela | *
|
6 | 76323919 | Juan Quintela | * Permission is hereby granted, free of charge, to any person obtaining a copy
|
7 | 76323919 | Juan Quintela | * of this software and associated documentation files (the "Software"), to deal
|
8 | 76323919 | Juan Quintela | * in the Software without restriction, including without limitation the rights
|
9 | 76323919 | Juan Quintela | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10 | 76323919 | Juan Quintela | * copies of the Software, and to permit persons to whom the Software is
|
11 | 76323919 | Juan Quintela | * furnished to do so, subject to the following conditions:
|
12 | 76323919 | Juan Quintela | *
|
13 | 76323919 | Juan Quintela | * The above copyright notice and this permission notice shall be included in
|
14 | 76323919 | Juan Quintela | * all copies or substantial portions of the Software.
|
15 | 76323919 | Juan Quintela | *
|
16 | 76323919 | Juan Quintela | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17 | 76323919 | Juan Quintela | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18 | 76323919 | Juan Quintela | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
19 | 76323919 | Juan Quintela | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20 | 76323919 | Juan Quintela | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21 | 76323919 | Juan Quintela | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22 | 76323919 | Juan Quintela | * THE SOFTWARE.
|
23 | 76323919 | Juan Quintela | */
|
24 | 76323919 | Juan Quintela | #include "hw.h" |
25 | 76323919 | Juan Quintela | #include "console.h" |
26 | 76323919 | Juan Quintela | #include "pc.h" |
27 | 76323919 | Juan Quintela | #include "vga_int.h" |
28 | 76323919 | Juan Quintela | #include "pixel_ops.h" |
29 | 76323919 | Juan Quintela | #include "qemu-timer.h" |
30 | 76323919 | Juan Quintela | |
31 | 76323919 | Juan Quintela | int isa_vga_init(void) |
32 | 76323919 | Juan Quintela | { |
33 | 76323919 | Juan Quintela | VGACommonState *s; |
34 | 76323919 | Juan Quintela | |
35 | 76323919 | Juan Quintela | s = qemu_mallocz(sizeof(*s));
|
36 | 76323919 | Juan Quintela | |
37 | 76323919 | Juan Quintela | vga_common_init(s, VGA_RAM_SIZE); |
38 | 76323919 | Juan Quintela | vga_init(s); |
39 | 76323919 | Juan Quintela | register_savevm("vga", 0, 2, vga_common_save, vga_common_load, s); |
40 | 76323919 | Juan Quintela | |
41 | 76323919 | Juan Quintela | s->ds = graphic_console_init(s->update, s->invalidate, |
42 | 76323919 | Juan Quintela | s->screen_dump, s->text_update, s); |
43 | 76323919 | Juan Quintela | |
44 | 76323919 | Juan Quintela | #ifdef CONFIG_BOCHS_VBE
|
45 | 76323919 | Juan Quintela | /* XXX: use optimized standard vga accesses */
|
46 | 76323919 | Juan Quintela | cpu_register_physical_memory(VBE_DISPI_LFB_PHYSICAL_ADDRESS, |
47 | 76323919 | Juan Quintela | VGA_RAM_SIZE, s->vram_offset); |
48 | 76323919 | Juan Quintela | #endif
|
49 | 76323919 | Juan Quintela | return 0; |
50 | 76323919 | Juan Quintela | } |