aboutsummaryrefslogtreecommitdiff
path: root/include/hw/ipmi
diff options
context:
space:
mode:
authorCorey Minyard <cminyard@mvista.com>2017-12-06 13:18:07 -0600
committerCorey Minyard <cminyard@mvista.com>2019-09-20 14:08:10 -0500
commit79d29a9d065d25f7f9da0dfca8ac9b6f1989978c (patch)
tree475f024301e35d9c3b4d1ab77fe6d00d62669de5 /include/hw/ipmi
parent1739d54c8bea120897e6170a3807ab8633c6d460 (diff)
ipmi: Allow a size value to be passed for I/O space
PCI device I/O must be >= 8 bytes in length or they don't work. Allow the size to be passed in, the default size of 2 or 3 won't work. Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'include/hw/ipmi')
-rw-r--r--include/hw/ipmi/ipmi.h7
-rw-r--r--include/hw/ipmi/ipmi_bt.h1
-rw-r--r--include/hw/ipmi/ipmi_kcs.h1
3 files changed, 8 insertions, 1 deletions
diff --git a/include/hw/ipmi/ipmi.h b/include/hw/ipmi/ipmi.h
index 70871da0a7..6f2413b39b 100644
--- a/include/hw/ipmi/ipmi.h
+++ b/include/hw/ipmi/ipmi.h
@@ -118,7 +118,12 @@ typedef struct IPMIInterface IPMIInterface;
typedef struct IPMIInterfaceClass {
InterfaceClass parent;
- void (*init)(struct IPMIInterface *s, Error **errp);
+ /*
+ * min_size is the requested I/O size and must be a power of 2.
+ * This is so PCI (or other busses) can request a bigger range.
+ * Use 0 for the default.
+ */
+ void (*init)(struct IPMIInterface *s, unsigned int min_size, Error **errp);
/*
* Perform various operations on the hardware. If checkonly is
diff --git a/include/hw/ipmi/ipmi_bt.h b/include/hw/ipmi/ipmi_bt.h
index 9667aaa88a..8a4316ea7c 100644
--- a/include/hw/ipmi/ipmi_bt.h
+++ b/include/hw/ipmi/ipmi_bt.h
@@ -56,6 +56,7 @@ typedef struct IPMIBT {
uint32_t io_base;
unsigned long io_length;
MemoryRegion io;
+ unsigned long size_mask;
void (*raise_irq)(struct IPMIBT *ib);
void (*lower_irq)(struct IPMIBT *ib);
diff --git a/include/hw/ipmi/ipmi_kcs.h b/include/hw/ipmi/ipmi_kcs.h
index 91d76d08f4..6e6ef4c539 100644
--- a/include/hw/ipmi/ipmi_kcs.h
+++ b/include/hw/ipmi/ipmi_kcs.h
@@ -59,6 +59,7 @@ typedef struct IPMIKCS {
uint32_t io_base;
unsigned long io_length;
MemoryRegion io;
+ unsigned long size_mask;
void (*raise_irq)(struct IPMIKCS *ik);
void (*lower_irq)(struct IPMIKCS *ik);