From nobody Sun May 5 12:34:12 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1631905195; cv=none; d=zohomail.com; s=zohoarc; b=Vdt6v9fUL/dX/Z7ptGV5MQ7vfMXrbBkKRtsanMR9SF1fGbBKYt5DwaZEzCNwfNJGtK22K4CeQSCR+GEOMIpogRCpb7+9/RPn0Buu+1XjmXeex3Olm4WJeFysA4k2qAdd1r9j0Rtbuj3o+b7aI8Jbb5RXDnNCn7AwMSgLlJNAWaY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1631905195; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=G05cTUCHwzS6cXSpZNXkIEEVYtlshGTI4V0WMUKZa7o=; b=RCjekx2Zk2MEGckmFP/elp7hj44pHjUQIjZF3XMqZwtYtiWdxQL4IjyQLBt02vDc9v9huo+I7aDkqRenAUkXPwLEl5EG5qR73+zumnFJOOPgk8liwCM1BxXecCqx5w6F43GC01je3ESGfsAjtS09rFVIxeqbs2WPzOvX/FwMw0w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 16319051955171020.9398168655434; Fri, 17 Sep 2021 11:59:55 -0700 (PDT) Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-105-kpnpncq3PcaeaQogX2ileQ-1; Fri, 17 Sep 2021 14:59:53 -0400 Received: by mail-wr1-f71.google.com with SMTP id x2-20020a5d54c2000000b0015dfd2b4e34so4016982wrv.6 for ; Fri, 17 Sep 2021 11:59:52 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.. (14.red-83-35-25.dynamicip.rima-tde.net. [83.35.25.14]) by smtp.gmail.com with ESMTPSA id 129sm7222720wmz.26.2021.09.17.11.59.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 11:59:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631905194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G05cTUCHwzS6cXSpZNXkIEEVYtlshGTI4V0WMUKZa7o=; b=bTZwztExKCEeHaZDxUgCLKMTBX44x00ydPHgUSnkQyvc7Z7HNPmbVvLJ006g679ZIr+COp C8W/HnOQOQcwu6IvjYjQ9VA2wVV6k7EOJQmQUetd4xm/xvwvI93GRGs9uHwR0bzHE4wWFj ubCdT2bJwkINHIgXGpXPMYdd8Prt4m8= X-MC-Unique: kpnpncq3PcaeaQogX2ileQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=G05cTUCHwzS6cXSpZNXkIEEVYtlshGTI4V0WMUKZa7o=; b=SUt0F7DFq1SgiNrq5qXS7KmFyiQJNWrPcC+OKmBDcRB3Xap8X/H6A3v0iTgzs1eJ0z icLnsmCpmZ7K6qBFfW1jniZXox5Y6GE+es4VWW7urhDRW7Q68TOH3ZO3IUS0QOwr4ifA kWyChBAM276z+w4vNKNI6/tSGcHx8QzJ8i+zmxEFVyC384x5YM4+T+7n7lnWl7kBXJhv 7rk5pYIQfmTb+4ofOe4zrLUoU40IPhYU/3kMZvoPCYasriJRI3zK6Q7X7CSX7Atz4KxU Dc2a5rSCjm61SuUop03s+sKGjZlDSLkEm7Rh/l+zGUp83VmApbtYMiQQ3fJhOUyg/Kxa RmiA== X-Gm-Message-State: AOAM532hi9JLtv0C+tVzF9QlOiivQQD3q9n42F7vegZz4vS7qVcE6w// 6kcZGtHSRyC14o5Qxjth491XRiKd/ZrlOS/65jN0yCJQAGX60edww7I1B/bLQTp6N+8SVWNX4Mj b/BNIi/9OT/xwkg== X-Received: by 2002:a1c:149:: with SMTP id 70mr16511782wmb.187.1631905191849; Fri, 17 Sep 2021 11:59:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvDHyCcd9/t84rtWDdBPlMMkOO9PF/uGvQEV1OxrNCnRSlzemjNwIDUsY1Rg74IDIzEsrkcA== X-Received: by 2002:a1c:149:: with SMTP id 70mr16511761wmb.187.1631905191611; Fri, 17 Sep 2021 11:59:51 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Marcel Apfelbaum , "Michael S. Tsirkin" , Richard Henderson , Paolo Bonzini , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH] hw/loader: Restrict PC_ROM_* definitions to hw/i386/pc Date: Fri, 17 Sep 2021 20:59:49 +0200 Message-Id: <20210917185949.2244956-1-philmd@redhat.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1631905196291100001 The PC_ROM_* definitions are only used by the PC machine, and are irrelevant to the other architectures / machines. Reduce their scope by moving them to hw/i386/pc.c. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Laurent Vivier --- include/hw/loader.h | 6 ------ hw/i386/pc.c | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/hw/loader.h b/include/hw/loader.h index cbfc1848737..81104cb02fe 100644 --- a/include/hw/loader.h +++ b/include/hw/loader.h @@ -336,12 +336,6 @@ void hmp_info_roms(Monitor *mon, const QDict *qdict); #define rom_add_blob_fixed_as(_f, _b, _l, _a, _as) \ rom_add_blob(_f, _b, _l, _l, _a, NULL, NULL, NULL, _as, true) =20 -#define PC_ROM_MIN_VGA 0xc0000 -#define PC_ROM_MIN_OPTION 0xc8000 -#define PC_ROM_MAX 0xe0000 -#define PC_ROM_ALIGN 0x800 -#define PC_ROM_SIZE (PC_ROM_MAX - PC_ROM_MIN_VGA) - int rom_add_vga(const char *file); int rom_add_option(const char *file, int32_t bootindex); =20 diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 7e523b913ca..557d49c9f8f 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -843,6 +843,12 @@ void xen_load_linux(PCMachineState *pcms) x86ms->fw_cfg =3D fw_cfg; } =20 +#define PC_ROM_MIN_VGA 0xc0000 +#define PC_ROM_MIN_OPTION 0xc8000 +#define PC_ROM_MAX 0xe0000 +#define PC_ROM_ALIGN 0x800 +#define PC_ROM_SIZE (PC_ROM_MAX - PC_ROM_MIN_VGA) + void pc_memory_init(PCMachineState *pcms, MemoryRegion *system_memory, MemoryRegion *rom_memory, --=20 2.31.1