- 28 2月, 2023 40 次提交
-
-
由 Philippe Mathieu-Daudé 提交于
Avoid when including "hw/usb/hcd-ohci.h": hw/usb/hcd-ohci.h:100:5: error: unknown type name 'SysBusDevice' SysBusDevice parent_obj; ^ Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Message-Id: <20230203113650.78146-6-philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
hw/usb/u2f.h was added by commit 80e267f1 ("hw/usb: Add U2F key base class"), almost the same time of the automatic conversion done by commit c821774a ("Use OBJECT_DECLARE_TYPE where posible"). Manually convert to OBJECT_DECLARE_TYPE(). Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Message-Id: <20230220150515.32549-9-philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
To avoid forward-declaring CCIDBus, declare CCID_BUS QOM definitions before its use in the USBCCIDState structure. Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Message-Id: <20230220150515.32549-2-philmd@linaro.org>
-
由 BALATON Zoltan 提交于
These can be shared with other AC97 implementations. Signed-off-by: NBALATON Zoltan <balaton@eik.bme.hu> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <6f0980fdc3753624be6f3935a6ab0a2dc1df4b30.1677445307.git.balaton@eik.bme.hu> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Message-Id: <20230220131837.26292-5-philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Message-Id: <20230220131837.26292-4-philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
To avoid forward-declaring ES1370State, declare ES1370 QOM definitions before its use in the chan_bits structure. Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Message-Id: <20230220131837.26292-3-philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
To avoid forward-declaring HDAAudioState, declare HDA_AUDIO QOM definitions before its use in the HDAAudioStream structure. Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Message-Id: <20230220131837.26292-2-philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
Avoid when refactoring unrelated headers: hw/timer/hpet.c:776:39: error: array has incomplete element type 'Property' (aka 'struct Property') static Property hpet_device_properties[] = { ^ hw/timer/hpet.c:777:5: error: implicit declaration of function 'DEFINE_PROP_UINT8' is invalid in C99 [-Werror,-Wimplicit-function-declaration] DEFINE_PROP_UINT8("timers", HPETState, num_timers, HPET_MIN_TIMERS), ^ Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Acked-by: NRichard Henderson <richard.henderson@linaro.org> Message-Id: <20230215174353.37097-2-philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
rtc_get_memory() and rtc_set_memory() helpers only work with TYPE_MC146818_RTC devices. 'memory' in their name refer to the CMOS region. Rename them as mc146818rtc_get_cmos_data() and mc146818rtc_set_cmos_data() to be explicit about what they are doing. Mechanical change doing: $ sed -i -e 's/rtc_set_memory/mc146818rtc_set_cmos_data/g' \ $(git grep -wl rtc_set_memory) $ sed -i -e 's/rtc_get_memory/mc146818rtc_get_cmos_data/g' \ $(git grep -wl rtc_get_memory) Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Message-Id: <20230210233116.80311-4-philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
rtc_get_memory() and rtc_set_memory() methods can not take any TYPE_ISA_DEVICE object. They expect a TYPE_MC146818_RTC one. Simplify the API by passing a MC146818RtcState. Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Message-Id: <20230210233116.80311-3-philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
RTCState only represents a Motorola MC146818 model, not any RTC chipset. Rename the structure as MC146818RtcState using: $ sed -i -e s/RTCState/MC146818RtcState/g $(git grep -wl RTCState) Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Message-Id: <20230210233116.80311-2-philmd@linaro.org> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NThomas Huth <thuth@redhat.com> Message-Id: <20230215161641.32663-4-philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
isa_get_irq() was added in commit 3a38d437 ("Add isa_reserve_irq()" Fri Aug 14 11:36:15 2009) as: a temporary interface to be used to allocate ISA IRQs for devices which have not yet been converted to qdev, and for special cases which are not suited for qdev conversions, such as the 'ferr'. We still use it 14 years later, using the global 'isabus' singleton. In order to get rid of such *temporary* interface, extract isa_bus_get_irq() which can take any ISABus* object. Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NThomas Huth <thuth@redhat.com> Message-Id: <20230215161641.32663-3-philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
isa_get_dma() returns a DMA channel handler from an ISABus. To emphasize this, rename it as isa_bus_get_dma(). Mechanical change using: $ sed -i -e 's/isa_get_dma/isa_bus_get_dma/g' \ $(git grep -l isa_get_dma) Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NThomas Huth <thuth@redhat.com> Message-Id: <20230215161641.32663-2-philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230210163744.32182-11-philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
isa_bus_irqs() register an array of input IRQs on the ISA bus. Rename it as isa_bus_register_input_irqs(). Mechanical change using: $ sed -i -e 's/isa_bus_irqs/isa_bus_register_input_irqs/g' \ $(git grep -wl isa_bus_irqs) Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Message-Id: <20230210163744.32182-10-philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
No point in inlining isa_bus_from_device() which is only used at device realization time. Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230210163744.32182-9-philmd@linaro.org> Reviewed-by: NBernhard Beschow <shentey@gmail.com>
-
由 Philippe Mathieu-Daudé 提交于
Separate functions taking an ISABus* argument versus functions taking a ISADevice* one. Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Message-Id: <20230210163744.32182-8-philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
ISADeviceClass is an empty class and just increase code complexity. Remove it, directly embedding DeviceClass in classes expanding TYPE_ISA_DEVICE. Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NBernhard Beschow <shentey@gmail.com> Message-Id: <20230215161641.32663-19-philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
Keep reference to ISA input IRQs in EbusState. To emphasize input/output distinction, rename arrays as isa_irqs_in / isa_irqs_out. Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Message-Id: <20230210163744.32182-7-philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
Directly dispatch ISA IRQs to 'cpu_intr' output IRQ by removing the intermediate via_isa_request_i8259_irq() handler. Rename ISA IRQs array as 'isa_irqs_in' to emphasize these are input IRQs. Signed-off-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Message-Id: <20230210163744.32182-5-philmd@linaro.org> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
When the i82378 model was added in commit a04ff940 ("prep: Add i82378 PCI-to-ISA bridge emulation") the i8259 model was not yet QOM'ified. This happened later in commit 747c70af ("i8259: Convert to qdev"). Directly dispatch ISA IRQs to 'cpu_intr' output IRQ by removing the intermediate i82378_request_out0_irq() handler. Rename ISA IRQs array as 'isa_irqs_in' to emphasize these are input IRQs. Signed-off-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Message-Id: <20230210163744.32182-4-philmd@linaro.org> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
Commit a04ff940 ("prep: Add i82378 PCI-to-ISA bridge emulation") aimed to model the 2 output IRQs: CPU intr and NMI. Commit 5039d6e2 ("i8257: remove cpu_request_exit irq") removed the NMI IRQ. Since this model only use the CPU interrupt, replace the 'out[2]' array by a single 'cpu_intr'. Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Message-Id: <20230210163744.32182-3-philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
i8259_init() helper creates a i8259 device on an ISA bus, connects its IRQ output to the parent's input IRQ, and returns an array of 16 ISA input IRQs. Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Message-Id: <20230210163744.32182-2-philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
Fix 'interrutp' typo. Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Message-Id: <20230211152239.88106-2-philmd@linaro.org>
-
由 Bernhard Beschow 提交于
ICH9 is a south bridge which doesn't necessarily depend on x86, so move it into the southbridge folder, analoguous to PIIX. Signed-off-by: NBernhard Beschow <shentey@gmail.com> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230213173033.98762-13-shentey@gmail.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org>
-
由 Bernhard Beschow 提交于
Signed-off-by: NBernhard Beschow <shentey@gmail.com> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230213173033.98762-12-shentey@gmail.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org>
-
由 Bernhard Beschow 提交于
The ioapic sources reside in hw/intc already. Move the headers there as well. Signed-off-by: NBernhard Beschow <shentey@gmail.com> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230213173033.98762-11-shentey@gmail.com> [PMD: Keep ioapic_internal.h in hw/intc/, not under include/] Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org>
-
由 Bernhard Beschow 提交于
Most code uses IOAPIC_NUM_PINS. The only place where GSI_NUM_PINS defines the size of an array is ICH9LPCState::gsi which needs to match IOAPIC_NUM_PINS. Remove GSI_NUM_PINS for consistency. Signed-off-by: NBernhard Beschow <shentey@gmail.com> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230213173033.98762-10-shentey@gmail.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org>
-
由 Bernhard Beschow 提交于
ich9_lpc_reset() is the dc->reset callback which is called automatically. No need to call it explicitly during k->realize. Signed-off-by: NBernhard Beschow <shentey@gmail.com> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230213173033.98762-9-shentey@gmail.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org>
-
由 Bernhard Beschow 提交于
Make TYPE_ICH9_LPC_DEVICE more self-contained by moving the call to ich9_lpc_pm_init() from board code to its realize function. In order to propagate x86_machine_is_smm_enabled(), introduce an "smm-enabled" property like we have in piix4. Signed-off-by: NBernhard Beschow <shentey@gmail.com> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230213173033.98762-8-shentey@gmail.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org>
-
由 Bernhard Beschow 提交于
This is a preparation to make the next patch cleaner. Signed-off-by: NBernhard Beschow <shentey@gmail.com> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230213173033.98762-7-shentey@gmail.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org>
-
由 Bernhard Beschow 提交于
ich9_smb_init() is a legacy init function, so modernize the code. Note that the smb_io_base parameter was unused. Signed-off-by: NBernhard Beschow <shentey@gmail.com> Acked-by: NCorey Minyard <cminyard@mvista.com> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230213173033.98762-6-shentey@gmail.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org>
-
由 Bernhard Beschow 提交于
This is a preparation for the next commit to make it cleaner. Signed-off-by: NBernhard Beschow <shentey@gmail.com> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230213173033.98762-5-shentey@gmail.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org>
-
由 Bernhard Beschow 提交于
By using qdev_get_child_bus() we can eliminate ICH9LPCState::isa_bus and spare the ich9_lpc variable in pc_q35, too. Signed-off-by: NBernhard Beschow <shentey@gmail.com> Reviewed-by: NThomas Huth <thuth@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230213173033.98762-4-shentey@gmail.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org>
-
由 Bernhard Beschow 提交于
No need to rely on the board to wire up the ICH9 PCI IRQs. All functions access private state of the LPC device which suggests that it should wire up the IRQs. Signed-off-by: NBernhard Beschow <shentey@gmail.com> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230213173033.98762-3-shentey@gmail.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org>
-
由 Bernhard Beschow 提交于
The Q35_MASK macro is already defined by TYPE_Q35_HOST_DEVICE, so let TYPE_ICH9_LPC_DEVICE have its own one to prevent potential name clash. Signed-off-by: NBernhard Beschow <shentey@gmail.com> Reviewed-by: NThomas Huth <thuth@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230213173033.98762-2-shentey@gmail.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
This function is not used anywhere outside this file, so we can delete the prototype from include/hw/i386/x86.h and make the function "static void". This fixes when building with -Wall and using Clang ("Apple clang version 14.0.0 (clang-1400.0.29.202)"): ../hw/i386/x86.c:70:24: error: static function 'MACHINE' is used in an inline function with external linkage [-Werror,-Wstatic-in-inline] MachineState *ms = MACHINE(x86ms); ^ include/hw/i386/x86.h:101:1: note: use 'static' to give inline function 'init_topo_info' internal linkage void init_topo_info(X86CPUTopoInfo *topo_info, const X86MachineState *x86ms); ^ static include/hw/boards.h:24:49: note: 'MACHINE' declared here OBJECT_DECLARE_TYPE(MachineState, MachineClass, MACHINE) ^ Reported-by: NStefan Weil <sw@weilnetz.de> Suggested-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Message-Id: <20221216220158.6317-6-philmd@linaro.org>
-
由 Philippe Mathieu-Daudé 提交于
Copy part of the description of commit f7b78602 ("accel/tcg: Add cluster number to TCG TB hash") in tcg_cpu_init_cflags(), improving a bit CPUState::cluster_index documentation. Signed-off-by: NPhilippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Message-Id: <20230216142338.82982-2-philmd@linaro.org>
-