760b4dcddd
* Fixes for x86 CPUID * Cleanups for configure, hw/isa and x86 -----BEGIN PGP SIGNATURE----- iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmXPW5sUHHBib256aW5p QHJlZGhhdC5jb20ACgkQv/vSX3jHroO1Mgf/USSqZxAyS1tyutpVslKmQjCyUiNW xEuHhAqoTz4Xg/8Q1J9aCcs2hdpBx2ULEQryUiTlH3LPLy3j9lGxMfg9Ma65mPVg KOSm/vfnw2VPXav8MJVNbm0gSI5fPmprRYgFi4TrkknmKnDo2TElrCG6Oe6LN/X+ kiJD9K8PE+OE7xVhNDf7JAxUHt531oX7iM8p6JGGBYQdPOZ8rGf4K5PDrDxnHckG dbKHhqkbrSHaX/gu4q0ukgfIprs40ChYQ10vZ95mYyuWgIHOi51PciPmQ/qLPof0 b/au08F0SpTE5cxx1Rk4cAuhP/PtzVln5lsSl9r9KzJ3Hcv6qnwXUU1nUg== =U+N2 -----END PGP SIGNATURE----- Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging * Some hw/isa cleanups * Fixes for x86 CPUID * Cleanups for configure, hw/isa and x86 # -----BEGIN PGP SIGNATURE----- # # iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmXPW5sUHHBib256aW5p # QHJlZGhhdC5jb20ACgkQv/vSX3jHroO1Mgf/USSqZxAyS1tyutpVslKmQjCyUiNW # xEuHhAqoTz4Xg/8Q1J9aCcs2hdpBx2ULEQryUiTlH3LPLy3j9lGxMfg9Ma65mPVg # KOSm/vfnw2VPXav8MJVNbm0gSI5fPmprRYgFi4TrkknmKnDo2TElrCG6Oe6LN/X+ # kiJD9K8PE+OE7xVhNDf7JAxUHt531oX7iM8p6JGGBYQdPOZ8rGf4K5PDrDxnHckG # dbKHhqkbrSHaX/gu4q0ukgfIprs40ChYQ10vZ95mYyuWgIHOi51PciPmQ/qLPof0 # b/au08F0SpTE5cxx1Rk4cAuhP/PtzVln5lsSl9r9KzJ3Hcv6qnwXUU1nUg== # =U+N2 # -----END PGP SIGNATURE----- # gpg: Signature made Fri 16 Feb 2024 12:56:59 GMT # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * tag 'for-upstream' of https://gitlab.com/bonzini/qemu: ci: Fix again build-previous-qemu usb: inline device creation functions target/i386: Generate an illegal opcode exception on cmp instructions with lock prefix i386: xen: fix compilation --without-default-devices configure: put all symlink creation together configure: do not create legacy symlinks smc37c669: remove useless is_enabled functions isa-superio: validate floppy.count value mips: remove unnecessary "select PTIMER" i386/cpuid: Move leaf 7 to correct group i386/cpuid: Remove subleaf constraint on CPUID leaf 1F i386/cpuid: Decrease cpuid_i when skipping CPUID leaf 1F physmem: replace function name with __func__ in ram_block_discard_range() i386/pc: Drop pc_machine_kvm_type() target/i386: Add support of KVM_FEATURE_ASYNC_PF_VMEXIT for guest i386/cpu: Mask with XCR0/XSS mask for FEAT_XSAVE_XCR0_HI and FEAT_XSAVE_XSS_HI leafs i386/cpu: Clear FEAT_XSAVE_XSS_LO/HI leafs when CPUID_EXT_XSAVE is not available Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
98 lines
2.2 KiB
C
98 lines
2.2 KiB
C
/*
|
|
* SMC FDC37C669 Super I/O controller
|
|
*
|
|
* Copyright (c) 2018 Philippe Mathieu-Daudé
|
|
*
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
* See the COPYING file in the top-level directory.
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
#include "qemu/osdep.h"
|
|
#include "hw/isa/superio.h"
|
|
#include "qemu/module.h"
|
|
|
|
/* UARTs (compatible with NS16450 or PC16550) */
|
|
|
|
static uint16_t get_serial_iobase(ISASuperIODevice *sio, uint8_t index)
|
|
{
|
|
return index ? 0x2f8 : 0x3f8;
|
|
}
|
|
|
|
static unsigned int get_serial_irq(ISASuperIODevice *sio, uint8_t index)
|
|
{
|
|
return index ? 3 : 4;
|
|
}
|
|
|
|
/* Parallel port */
|
|
|
|
static uint16_t get_parallel_iobase(ISASuperIODevice *sio, uint8_t index)
|
|
{
|
|
return 0x378;
|
|
}
|
|
|
|
static unsigned int get_parallel_irq(ISASuperIODevice *sio, uint8_t index)
|
|
{
|
|
return 7;
|
|
}
|
|
|
|
static unsigned int get_parallel_dma(ISASuperIODevice *sio, uint8_t index)
|
|
{
|
|
return 3;
|
|
}
|
|
|
|
/* Diskette controller (Software compatible with the Intel PC8477) */
|
|
|
|
static uint16_t get_fdc_iobase(ISASuperIODevice *sio, uint8_t index)
|
|
{
|
|
return 0x3f0;
|
|
}
|
|
|
|
static unsigned int get_fdc_irq(ISASuperIODevice *sio, uint8_t index)
|
|
{
|
|
return 6;
|
|
}
|
|
|
|
static unsigned int get_fdc_dma(ISASuperIODevice *sio, uint8_t index)
|
|
{
|
|
return 2;
|
|
}
|
|
|
|
static void smc37c669_class_init(ObjectClass *klass, void *data)
|
|
{
|
|
ISASuperIOClass *sc = ISA_SUPERIO_CLASS(klass);
|
|
|
|
sc->parallel = (ISASuperIOFuncs){
|
|
.count = 1,
|
|
.get_iobase = get_parallel_iobase,
|
|
.get_irq = get_parallel_irq,
|
|
.get_dma = get_parallel_dma,
|
|
};
|
|
sc->serial = (ISASuperIOFuncs){
|
|
.count = 2,
|
|
.get_iobase = get_serial_iobase,
|
|
.get_irq = get_serial_irq,
|
|
};
|
|
sc->floppy = (ISASuperIOFuncs){
|
|
.count = 1,
|
|
.get_iobase = get_fdc_iobase,
|
|
.get_irq = get_fdc_irq,
|
|
.get_dma = get_fdc_dma,
|
|
};
|
|
sc->ide.count = 0;
|
|
}
|
|
|
|
static const TypeInfo smc37c669_type_info = {
|
|
.name = TYPE_SMC37C669_SUPERIO,
|
|
.parent = TYPE_ISA_SUPERIO,
|
|
.class_size = sizeof(ISASuperIOClass),
|
|
.class_init = smc37c669_class_init,
|
|
};
|
|
|
|
static void smc37c669_register_types(void)
|
|
{
|
|
type_register_static(&smc37c669_type_info);
|
|
}
|
|
|
|
type_init(smc37c669_register_types)
|