[PATCH openpower-host-ipmi-oem 1/2] Support OpenPOWERs OEM commands on openbmc

Patrick Williams patrick at stwcx.xyz
Fri Oct 16 06:16:35 AEDT 2015


On Wed, Oct 14, 2015 at 09:23:22AM -0500, OpenBMC Patches wrote:
> From: Chris Austen <austenc at us.ibm.com>
> 
> diff --git a/ipmid-api.h b/ipmid-api.h
> new file mode 100644
> index 0000000..ef2be38
> --- /dev/null
> +++ b/ipmid-api.h
> @@ -0,0 +1,83 @@

This file should be used from the phosphor-host-ipmid package.  We need
to make a recipe for phosphor-host-ipmid-devel in bitbake.

> diff --git a/oemhandler.C b/oemhandler.C
> new file mode 100644
> index 0000000..c4eae21
> --- /dev/null
> +++ b/oemhandler.C
> @@ -0,0 +1,92 @@
> +#include "oemhandler.h"
> +#include "ipmid-api.h"
> +#include <stdio.h>
> +#include <string.h>
> +
> +void register_netfn_oem_partial_esel() __attribute__((constructor));
> +
> +
> +
> +const char *g_esel_path = "/tmp/";
> +uint16_t g_record_id = 0x0100;
> +
> +
> +#define LSMSSWAP(x,y) (y<<8|x)

inline function for this?

Recommend ((y)<<8|(x)) if left as a macro.  Otherwise, if 'y' isn't just
a variable or value, unexpected things happen.  LSMSWAP(3 ^ 2,1) might not
do what you expect:  3 ^ 2 << 8 | 1 = 515 , but (3 ^ 2) << 8 | 1 = 257.

-- 
Patrick Williams



More information about the openbmc mailing list