initial support for Q35 platform

Add option for "-machine kAFL64-Q35"

Co-authored-by: Benoit Morgan <benoit.morgan@intel.com>
This commit is contained in:
Steffen Schulz 2022-02-03 13:57:12 -08:00
parent c1d29a2399
commit dacb4d5126
3 changed files with 23 additions and 0 deletions

View File

@ -533,3 +533,20 @@ static void pc_q35_2_4_machine_options(MachineClass *m)
DEFINE_Q35_MACHINE(v2_4, "pc-q35-2.4", NULL, DEFINE_Q35_MACHINE(v2_4, "pc-q35-2.4", NULL,
pc_q35_2_4_machine_options); pc_q35_2_4_machine_options);
#ifdef QEMU_NYX
static void pc_kAFL64_vmx_v1_0_machine_options(MachineClass *m)
{
pc_q35_4_2_machine_options(m);
m->alias = "kAFL64";
//m->is_default = 1;
m->desc = "kAFL64 PC (Q35 + ICH9, 2009)";
}
static void kAFL64_init(MachineState *machine)
{
pc_q35_init(machine);
}
DEFINE_PC_MACHINE(v1, "kAFL64-Q35", kAFL64_init, pc_kAFL64_vmx_v1_0_machine_options);
#endif

View File

@ -479,6 +479,7 @@ static void ich9_lpc_rcba_update(ICH9LPCState *lpc, uint32_t rcba_old)
if (rcba_old & ICH9_LPC_RCBA_EN) { if (rcba_old & ICH9_LPC_RCBA_EN) {
memory_region_del_subregion(get_system_memory(), &lpc->rcrb_mem); memory_region_del_subregion(get_system_memory(), &lpc->rcrb_mem);
} }
// Nyx snapshot reload fails here if ICH9_LPC_RCBA_EN=1
if (rcba & ICH9_LPC_RCBA_EN) { if (rcba & ICH9_LPC_RCBA_EN) {
memory_region_add_subregion_overlap(get_system_memory(), memory_region_add_subregion_overlap(get_system_memory(),
rcba & ICH9_LPC_RCBA_BA_MASK, rcba & ICH9_LPC_RCBA_BA_MASK,

View File

@ -177,7 +177,12 @@ typedef struct ICH9LPCState {
#define ICH9_LPC_RCBA 0xf0 #define ICH9_LPC_RCBA 0xf0
#define ICH9_LPC_RCBA_BA_MASK Q35_MASK(32, 31, 14) #define ICH9_LPC_RCBA_BA_MASK Q35_MASK(32, 31, 14)
#ifdef QEMU_NYX
// Nyx snapshot restore fails on this
#define ICH9_LPC_RCBA_EN 0x0
#else
#define ICH9_LPC_RCBA_EN 0x1 #define ICH9_LPC_RCBA_EN 0x1
#endif
#define ICH9_LPC_RCBA_DEFAULT 0x0 #define ICH9_LPC_RCBA_DEFAULT 0x0
#define ICH9_LPC_PIC_NUM_PINS 16 #define ICH9_LPC_PIC_NUM_PINS 16