numa: Fix format string for "Invalid node" message
[qemu.git] / hw / misc / sga.c
blob03b006d6f0a0629aace7918a35142e32809b3c28
1 /*
2 * QEMU dummy ISA device for loading sgabios option rom.
4 * Copyright (c) 2011 Glauber Costa, Red Hat Inc.
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
24 * sgabios code originally available at code.google.com/p/sgabios
27 #include "qemu/osdep.h"
28 #include "hw/pci/pci.h"
29 #include "hw/i386/pc.h"
30 #include "hw/loader.h"
31 #include "sysemu/sysemu.h"
33 #define SGABIOS_FILENAME "sgabios.bin"
35 #define TYPE_SGA "sga"
36 #define SGA(obj) OBJECT_CHECK(ISASGAState, (obj), TYPE_SGA)
38 typedef struct ISASGAState {
39 ISADevice parent_obj;
40 } ISASGAState;
42 static void sga_realizefn(DeviceState *dev, Error **errp)
44 rom_add_vga(SGABIOS_FILENAME);
47 static void sga_class_initfn(ObjectClass *klass, void *data)
49 DeviceClass *dc = DEVICE_CLASS(klass);
51 set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
52 dc->realize = sga_realizefn;
53 dc->desc = "Serial Graphics Adapter";
56 static const TypeInfo sga_info = {
57 .name = TYPE_SGA,
58 .parent = TYPE_ISA_DEVICE,
59 .instance_size = sizeof(ISASGAState),
60 .class_init = sga_class_initfn,
63 static void sga_register_types(void)
65 type_register_static(&sga_info);
68 type_init(sga_register_types)