Add MAC to FRU EEPROM

If FRU device and MAC offset configuration is found from entity-manager,
Set MAC command writes MAC to the FRU eeprom.

If FRU device config is not found or write to the device failed, MAC is
programmed using the existing method.

Tested:
issue ipmi command to write and read MAC

1. On system has the FRU EEPROM, MAC is programmed to the eeprom correctly.
	#read MAC
	ipmitool raw 0x30 0xa2 0
 	 01 ff ff ff ff ff ff
	#write MAC
	ipmitool raw 0x30 0xa1 0x00 0x16 0xc1 0x5f 0xb9 0x43 0x47
	#read MAC
	ipmitool raw 0x30 0xa2 0
	 01 16 c1 5f b9 43 47

2. On system that the eeprom is write protected, return as follow
	#read MAC
	ipmitool raw 0x30 0xa2 0
	01 ff ff ff ff ff ff
	#write MAC
	ipmitool raw 0x30 0xa1 0x0 0xbe 0x7f 0x17 0xff 0x59 0x7e
	Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0 cmd=0xa1 rsp=0xd5): Command not supported in present state
	#read MAC
	ipmitool raw 0x30 0xa2 0
	 01 ff ff ff ff ff ff

3. On system that does not has FRU EEPROM, MAC is programmed the same
way as before into filesystem.

Signed-off-by: Zhikui Ren <zhikui.ren@intel.com>
Change-Id: I74e6e4270523a9abb020745bf4b93b4411bce597
1 file changed
tree: a3537219c18527063118bfccedc90b77f84e3a81
  1. cmake/
  2. docs/
  3. include/
  4. non-yocto/
  5. src/
  6. tests/
  7. .clang-format
  8. .gitignore
  9. cmake-format.json
  10. CMakeLists.txt
  11. CMakeLists.txt.in
  12. generate-whitelist.py
  13. ipmi-whitelist.conf
  14. LICENSE
  15. MAINTAINERS
  16. OWNERS
  17. README.md
README.md

Intel IPMI OEM support library

This component is intended to provide Intel-specific IPMI[3] command handlers for OpenBMC. These handlers are intended to integrate BMC with servers based on Intel architecture.

Overview

intel-ipmi-oem serves as an extension[1] to OpenBMC IPMI daemon[2]. It is compiled as a shared library and intended to both:

  • override existing implementation of standard IPMI commands to comply with Intel-specific solutions,
  • provide implementation for non-standard OEM extensions.

Capabilities

Related features provided by the library are grouped in separate source files. Main extensions to vanilla OpenBMC IPMI stack are the following:

  • Acquiring SMBIOS data over IPMI
  • Commands for better integration with Intel hardware
  • Firmware update extensions
  • Extended parsing of IPMI Platform Events[4]

References

  1. OpenBMC IPMI Architecture
  2. Phosphor IPMI Host
  3. IPMI Specification v2.0
  4. Intel Platform Events parsing