0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #define pr_fmt(fmt) "ACPI: " fmt
0014
0015 #include <linux/kernel.h>
0016 #include <linux/init.h>
0017 #include <linux/acpi.h>
0018 #include <linux/dmi.h>
0019
0020 #include "internal.h"
0021
0022 #ifdef CONFIG_DMI
0023 static const struct dmi_system_id acpi_rev_dmi_table[] __initconst;
0024 #endif
0025
0026
0027
0028
0029
0030 static struct acpi_platform_list acpi_blacklist[] __initdata = {
0031
0032 {"PTLTD ", " DSDT ", 0x06040000, ACPI_SIG_DSDT, less_than_or_equal,
0033 "Multiple problems", 1},
0034
0035 {"SONY ", "U0 ", 0x20010313, ACPI_SIG_DSDT, less_than_or_equal,
0036 "ACPI driver problem", 1},
0037
0038 {"INT440", "SYSFexxx", 0x00001001, ACPI_SIG_DSDT, less_than_or_equal,
0039 "Does not use _REG to protect EC OpRegions", 1},
0040
0041 {"IBM ", "TP600E ", 0x00000105, ACPI_SIG_DSDT, less_than_or_equal,
0042 "Incorrect _ADR", 1},
0043
0044 { }
0045 };
0046
0047 int __init acpi_blacklisted(void)
0048 {
0049 int i;
0050 int blacklisted = 0;
0051
0052 i = acpi_match_platform_list(acpi_blacklist);
0053 if (i >= 0) {
0054 pr_err("Vendor \"%6.6s\" System \"%8.8s\" Revision 0x%x has a known ACPI BIOS problem.\n",
0055 acpi_blacklist[i].oem_id,
0056 acpi_blacklist[i].oem_table_id,
0057 acpi_blacklist[i].oem_revision);
0058
0059 pr_err("Reason: %s. This is a %s error\n",
0060 acpi_blacklist[i].reason,
0061 (acpi_blacklist[i].data ?
0062 "non-recoverable" : "recoverable"));
0063
0064 blacklisted = acpi_blacklist[i].data;
0065 }
0066
0067 (void)early_acpi_osi_init();
0068 #ifdef CONFIG_DMI
0069 dmi_check_system(acpi_rev_dmi_table);
0070 #endif
0071
0072 return blacklisted;
0073 }
0074 #ifdef CONFIG_DMI
0075 #ifdef CONFIG_ACPI_REV_OVERRIDE_POSSIBLE
0076 static int __init dmi_enable_rev_override(const struct dmi_system_id *d)
0077 {
0078 pr_notice("DMI detected: %s (force ACPI _REV to 5)\n", d->ident);
0079 acpi_rev_override_setup(NULL);
0080 return 0;
0081 }
0082 #endif
0083
0084 static const struct dmi_system_id acpi_rev_dmi_table[] __initconst = {
0085 #ifdef CONFIG_ACPI_REV_OVERRIDE_POSSIBLE
0086
0087
0088
0089
0090
0091
0092 {
0093 .callback = dmi_enable_rev_override,
0094 .ident = "DELL XPS 13 (2015)",
0095 .matches = {
0096 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
0097 DMI_MATCH(DMI_PRODUCT_NAME, "XPS 13 9343"),
0098 },
0099 },
0100 {
0101 .callback = dmi_enable_rev_override,
0102 .ident = "DELL Precision 5520",
0103 .matches = {
0104 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
0105 DMI_MATCH(DMI_PRODUCT_NAME, "Precision 5520"),
0106 },
0107 },
0108 {
0109 .callback = dmi_enable_rev_override,
0110 .ident = "DELL Precision 3520",
0111 .matches = {
0112 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
0113 DMI_MATCH(DMI_PRODUCT_NAME, "Precision 3520"),
0114 },
0115 },
0116
0117
0118
0119
0120 {
0121 .callback = dmi_enable_rev_override,
0122 .ident = "DELL Latitude 3350",
0123 .matches = {
0124 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
0125 DMI_MATCH(DMI_PRODUCT_NAME, "Latitude 3350"),
0126 },
0127 },
0128 {
0129 .callback = dmi_enable_rev_override,
0130 .ident = "DELL Inspiron 7537",
0131 .matches = {
0132 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
0133 DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 7537"),
0134 },
0135 },
0136 #endif
0137 {}
0138 };
0139
0140 #endif