mirror of
https://github.com/xemu-project/xemu.git
synced 2024-12-13 23:08:57 +00:00
602b458201
Qemu's ACPI table generation sets the fields OEM ID and OEM table ID to "BOCHS " and "BXPCxxxx" where "xxxx" is replaced by the ACPI table name. Some games like Red Dead Redemption 2 seem to check the ACPI OEM ID and OEM table ID for the strings "BOCHS" and "BXPC" and if they are found, the game crashes(this may be an intentional detection mechanism to prevent playing the game in a virtualized environment). This patch allows you to override these default values. The feature can be used in this manner: qemu -machine oem-id=ABCDEF,oem-table-id=GHIJKLMN The oem-id string can be up to 6 bytes in size, and the oem-table-id string can be up to 8 bytes in size. If the string are smaller than their respective sizes they will be padded with space. If either of these parameters is not set, the current default values will be used for the one missing. Note that the the OEM Table ID field will not be extended with the name of the table, but will use either the default name or the user provided one. This does not affect the -acpitable option (for user-defined ACPI tables), which has precedence over -machine option. Signed-off-by: Marian Postevca <posteuca@mutex.one> Message-Id: <20210119003216.17637-3-posteuca@mutex.one> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
44 lines
1.4 KiB
C
44 lines
1.4 KiB
C
/*
|
|
* HMAT ACPI Implementation Header
|
|
*
|
|
* Copyright(C) 2019 Intel Corporation.
|
|
*
|
|
* Author:
|
|
* Liu jingqi <jingqi.liu@linux.intel.com>
|
|
* Tao Xu <tao3.xu@intel.com>
|
|
*
|
|
* HMAT is defined in ACPI 6.3: 5.2.27 Heterogeneous Memory Attribute Table
|
|
* (HMAT)
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
*
|
|
* This library 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
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, see <http://www.gnu.org/licenses/>
|
|
*/
|
|
|
|
#ifndef HMAT_H
|
|
#define HMAT_H
|
|
|
|
#include "hw/acpi/aml-build.h"
|
|
|
|
/*
|
|
* ACPI 6.3: 5.2.27.3 Memory Proximity Domain Attributes Structure,
|
|
* Table 5-145, Field "flag", Bit [0]: set to 1 to indicate that data in
|
|
* the Proximity Domain for the Attached Initiator field is valid.
|
|
* Other bits reserved.
|
|
*/
|
|
#define HMAT_PROXIMITY_INITIATOR_VALID 0x1
|
|
|
|
void build_hmat(GArray *table_data, BIOSLinker *linker, NumaState *numa_state,
|
|
const char *oem_id, const char *oem_table_id);
|
|
|
|
#endif
|