[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Freeipmi-devel] [PATCH 4/5] Allow sysfs SPMI parsing on ARM platforms
From: |
dann frazier |
Subject: |
[Freeipmi-devel] [PATCH 4/5] Allow sysfs SPMI parsing on ARM platforms |
Date: |
Tue, 31 Jul 2018 11:42:26 -0600 |
SPMI parsing has been disabled on ARM because it relied on unsafe
trolling through /dev/mem to find ACPI tables. Now that we support
using the sysfs interface, it is safe to enable everywhere. Keep
the fallback /dev/mem disabled on ARM though.
---
libfreeipmi/locate/ipmi-locate-acpi-spmi.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/libfreeipmi/locate/ipmi-locate-acpi-spmi.c
b/libfreeipmi/locate/ipmi-locate-acpi-spmi.c
index c243d16f4..587bcc24b 100644
--- a/libfreeipmi/locate/ipmi-locate-acpi-spmi.c
+++ b/libfreeipmi/locate/ipmi-locate-acpi-spmi.c
@@ -1277,6 +1277,9 @@ _ipmi_acpi_get_table_dev_mem (ipmi_locate_ctx_t ctx,
{ 0, "", 0}
};
+#if defined(__arm__) || defined (__aarch64__)
+ return (-1);
+#endif
assert (ctx);
assert (ctx->magic == IPMI_LOCATE_CTX_MAGIC);
assert (signature);
@@ -1617,9 +1620,6 @@ ipmi_locate_acpi_spmi_get_device_info (ipmi_locate_ctx_t
ctx,
uint64_t val;
int rv = -1;
-#if defined(__arm__) || defined(__aarch64__)
- return (-1);
-#else
if (!ctx || ctx->magic != IPMI_LOCATE_CTX_MAGIC)
{
ERR_TRACE (ipmi_locate_ctx_errormsg (ctx), ipmi_locate_ctx_errnum (ctx));
@@ -1795,5 +1795,4 @@ ipmi_locate_acpi_spmi_get_device_info (ipmi_locate_ctx_t
ctx,
cleanup:
fiid_obj_destroy (obj_acpi_spmi_table_descriptor);
return (rv);
-#endif /* defined(__arm__) || defined(__aarch64__) */
}
--
2.18.0
- [Freeipmi-devel] [PATCH 0/5] Parse SPMI tables using sysfs, dann frazier, 2018/07/31
- [Freeipmi-devel] [PATCH 4/5] Allow sysfs SPMI parsing on ARM platforms,
dann frazier <=
- [Freeipmi-devel] [PATCH 3/5] Add support for parsing SPMI table exposed via sysfs, dann frazier, 2018/07/31
- [Freeipmi-devel] [PATCH 2/5] Split RSDT/XSDT parsing into new function, dann frazier, 2018/07/31
- [Freeipmi-devel] [PATCH 1/5] Don't try to separate the header from the ACPI table data, dann frazier, 2018/07/31
- [Freeipmi-devel] [PATCH 5/5] Correct order of bytes in specification_revision field of ACPI SPMI table, dann frazier, 2018/07/31
- Re: [Freeipmi-devel] [PATCH 0/5] Parse SPMI tables using sysfs, Albert Chu, 2018/07/31