~vcs-imports/qemu/git

« back to all changes in this revision

Viewing changes to hw/pc.c

  • Committer: aliguori
  • Date: 2009-01-16 19:04:14 UTC
  • Revision ID: git-v1:3023f3329d87a6203d03a0e9ccb948772940da96
graphical_console_init change (Stefano Stabellini)

Patch 5/7

This patch changes the graphical_console_init function to return an
allocated DisplayState instead of a QEMUConsole.

This patch contains just the graphical_console_init change and few other
modifications mainly in console.c and vl.c.
It was necessary to move the display frontends (e.g. sdl and vnc)
initialization after machine->init in vl.c.

This patch does *not* include any required changes to any device, these
changes come with the following patches.

Patch 6/7

This patch changes the QEMUMachine init functions not to take a
DisplayState as an argument because is not needed any more;

In few places the graphic hardware initialization function was called
only if DisplayState was not NULL, now they are always called.
Apart from these cases, the rest are all mechanical substitutions.

Patch 7/7

This patch updates the graphic device code to use the new
graphical_console_init function.

As for the previous patch, in few places graphical_console_init was called
only if DisplayState was not NULL, now it is always called.
Apart from these cases, the rest are all mechanical substitutions.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6344 c046a42c-6fe2-441c-8c8c-71466251a162

Show diffs side-by-side

added added

removed removed

Lines of Context:
752
752
 
753
753
/* PC hardware initialisation */
754
754
static void pc_init1(ram_addr_t ram_size, int vga_ram_size,
755
 
                     const char *boot_device, DisplayState *ds,
 
755
                     const char *boot_device,
756
756
                     const char *kernel_filename, const char *kernel_cmdline,
757
757
                     const char *initrd_filename,
758
758
                     int pci_enabled, const char *cpu_model)
946
946
    if (cirrus_vga_enabled) {
947
947
        if (pci_enabled) {
948
948
            pci_cirrus_vga_init(pci_bus,
949
 
                                ds, phys_ram_base + vga_ram_addr,
 
949
                                phys_ram_base + vga_ram_addr,
950
950
                                vga_ram_addr, vga_ram_size);
951
951
        } else {
952
 
            isa_cirrus_vga_init(ds, phys_ram_base + vga_ram_addr,
 
952
            isa_cirrus_vga_init(phys_ram_base + vga_ram_addr,
953
953
                                vga_ram_addr, vga_ram_size);
954
954
        }
955
955
    } else if (vmsvga_enabled) {
956
956
        if (pci_enabled)
957
 
            pci_vmsvga_init(pci_bus, ds, phys_ram_base + vga_ram_addr,
 
957
            pci_vmsvga_init(pci_bus, phys_ram_base + vga_ram_addr,
958
958
                            vga_ram_addr, vga_ram_size);
959
959
        else
960
960
            fprintf(stderr, "%s: vmware_vga: no PCI bus\n", __FUNCTION__);
961
961
    } else if (std_vga_enabled) {
962
962
        if (pci_enabled) {
963
 
            pci_vga_init(pci_bus, ds, phys_ram_base + vga_ram_addr,
 
963
            pci_vga_init(pci_bus, phys_ram_base + vga_ram_addr,
964
964
                         vga_ram_addr, vga_ram_size, 0, 0);
965
965
        } else {
966
 
            isa_vga_init(ds, phys_ram_base + vga_ram_addr,
 
966
            isa_vga_init(phys_ram_base + vga_ram_addr,
967
967
                         vga_ram_addr, vga_ram_size);
968
968
        }
969
969
    }
1111
1111
}
1112
1112
 
1113
1113
static void pc_init_pci(ram_addr_t ram_size, int vga_ram_size,
1114
 
                        const char *boot_device, DisplayState *ds,
 
1114
                        const char *boot_device,
1115
1115
                        const char *kernel_filename,
1116
1116
                        const char *kernel_cmdline,
1117
1117
                        const char *initrd_filename,
1118
1118
                        const char *cpu_model)
1119
1119
{
1120
 
    pc_init1(ram_size, vga_ram_size, boot_device, ds,
 
1120
    pc_init1(ram_size, vga_ram_size, boot_device,
1121
1121
             kernel_filename, kernel_cmdline,
1122
1122
             initrd_filename, 1, cpu_model);
1123
1123
}
1124
1124
 
1125
1125
static void pc_init_isa(ram_addr_t ram_size, int vga_ram_size,
1126
 
                        const char *boot_device, DisplayState *ds,
 
1126
                        const char *boot_device,
1127
1127
                        const char *kernel_filename,
1128
1128
                        const char *kernel_cmdline,
1129
1129
                        const char *initrd_filename,
1130
1130
                        const char *cpu_model)
1131
1131
{
1132
 
    pc_init1(ram_size, vga_ram_size, boot_device, ds,
 
1132
    pc_init1(ram_size, vga_ram_size, boot_device,
1133
1133
             kernel_filename, kernel_cmdline,
1134
1134
             initrd_filename, 0, cpu_model);
1135
1135
}