From e514d28aa34d5088c8a3e238e0ccb713b601fcff Mon Sep 17 00:00:00 2001 From: Varinder Pratap Date: Thu, 23 Jun 2022 13:19:26 +0530 Subject: [PATCH] Removed old maru PC and added new maru piix and q35 PCs. Change-Id: I194640523f8835e695f5b5288cfd07ade1a55425 Signed-off-by: Varinder Pratap --- hw/i386/pc_piix.c | 36 +++++++++++++++------ hw/i386/pc_q35.c | 28 ++++++++++++++++ tizen/src/hw/maru_board.c | 68 --------------------------------------- 3 files changed, 55 insertions(+), 77 deletions(-) delete mode 100644 tizen/src/hw/maru_board.c diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 0f0e92c4b8..deec104b5d 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -301,15 +301,6 @@ static void pc_init1(MachineState *machine, } } -#ifdef CONFIG_MARU -void maru_pc_init(MachineState *machine); - -void maru_pc_init(MachineState *machine) -{ - pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, TYPE_I440FX_PCI_DEVICE); -} -#endif - /* Looking for a pc_compat_2_4() function? It doesn't exist. * pc_compat_*() functions that run on machine-init time and * change global QEMU state are deprecated. Please don't create @@ -428,6 +419,33 @@ static void pc_i440fx_machine_options(MachineClass *m) machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE); } +#ifdef CONFIG_MARU +static void pc_maru_family_machine_options(MachineClass *m) +{ + pc_i440fx_machine_options(m); + m->desc = "Standard MARU PC (i440FX + PIIX, maru)"; + m->no_parallel = 1; + m->no_floppy = 1; + m->no_cdrom = 1; + m->no_sdcard = 1; + m->default_boot_order = "c"; +} + + +static void pc_maru_machine_options(MachineClass *m) +{ + PCMachineClass *pcmc = PC_MACHINE_CLASS(m); + pc_maru_family_machine_options(m); + m->alias = "maru-x86-machine"; + m->is_default = false; + pcmc->default_cpu_version = 1; +} + +DEFINE_I440FX_MACHINE(maru, "maru-x86-machine", NULL, + pc_maru_machine_options); + +#endif //CONFIG_MARU + static void pc_i440fx_5_0_machine_options(MachineClass *m) { PCMachineClass *pcmc = PC_MACHINE_CLASS(m); diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index d37c425e22..7dce63cead 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -360,6 +360,34 @@ static void pc_q35_5_0_machine_options(MachineClass *m) DEFINE_Q35_MACHINE(v5_0, "pc-q35-5.0", NULL, pc_q35_5_0_machine_options); +#ifdef CONFIG_MARU +static void pc_maru_family_machine_options(MachineClass *m) +{ + pc_q35_machine_options(m); + m->desc = "Standard MARU PC (Q35 + ICH9, maru)"; + m->no_parallel = 1; + m->no_floppy = 1; + m->no_cdrom = 1; + m->no_sdcard = 1; + m->default_boot_order = "c"; +} + + +static void pc_maru_machine_options(MachineClass *m) +{ + PCMachineClass *pcmc = PC_MACHINE_CLASS(m); + pc_maru_family_machine_options(m); + m->alias = "maru-x86-q35"; + m->is_default = false; + pcmc->default_cpu_version = 1; +} + +DEFINE_Q35_MACHINE(maru, "maru-x86-q35", NULL, + pc_maru_machine_options); + +#endif //CONFIG_MARU + + static void pc_q35_4_2_machine_options(MachineClass *m) { pc_q35_5_0_machine_options(m); diff --git a/tizen/src/hw/maru_board.c b/tizen/src/hw/maru_board.c deleted file mode 100644 index dc27b9bda4..0000000000 --- a/tizen/src/hw/maru_board.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * TIZEN base board - * - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * Contact: - * SeokYeon Hwang - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * Contributors: - * - S-Core Co., Ltd - * - * x86 board from pc_piix.c... - * add some TIZEN-speciaized device... - */ - -#include "emulator_common.h" -#include "hw/boards.h" -#include "hw/i386/pc.h" - -#include "maru_pm.h" - -/* maru specialized device init */ -static void maru_device_init(void) -{ - // do nothing for now... -} - -extern void maru_pc_init(MachineState *args); -static void maru_x86_board_init(MachineState *machine) -{ - maru_pc_init(machine); - - maru_device_init(); -} - -static void maru_x86_machine_options(MachineClass *m) -{ - m->family = "pc_piix"; - m->desc = "Maru Board (x86)"; - m->default_machine_opts = "firmware=bios-256k.bin"; - m->alias = "maru-x86-machine"; - m->default_display = "std"; - m->no_parallel = 1; - m->no_floppy = 1; - m->no_cdrom = 1; - m->no_sdcard = 1; - m->default_boot_order = "c"; -#ifdef CONFIG_HAX - compat_props_add(m->compat_props, hw_compat_2_6, hw_compat_2_6_len); -#endif -} - -DEFINE_PC_MACHINE(maru, "maru-x86-machine", maru_x86_board_init, - maru_x86_machine_options); -- 2.34.1