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>
This commit is contained in:
Corey Minyard 2017-12-06 13:18:07 -06:00
parent 1739d54c8b
commit 79d29a9d06
7 changed files with 44 additions and 11 deletions

View file

@ -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

View file

@ -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);

View file

@ -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);