Documentation ¶
Overview ¶
Package ocp implements OCP/Facebook-specific IPMI client functions.
Package ocp implements OCP/Facebook-specific IPMI client functions.
Index ¶
- Constants
- Variables
- func CheckBMCBootOrder(i *ipmi.IPMI, bmcBootOverride bool) error
- func ClearCMOSClearValidBits(i *ipmi.IPMI, data []byte) error
- func IsCMOSClearSet(i *ipmi.IPMI) (bool, []byte, error)
- func SendOemIpmiDimmInfo(i *ipmi.IPMI, info []DimmInfo) error
- func SendOemIpmiProcessorInfo(i *ipmi.IPMI, info []ProcessorInfo) error
- func SetOemIpmiPostEnd(i *ipmi.IPMI) error
- type BootOrder
- type DimmInfo
- type ProcessorInfo
Constants ¶
View Source
const ( // Boot order bit[2:0] defined as // 000b: USB device // 001b: Network // 010b: SATA HDD // 011b: SATA-CDROM // 100b: Other removable Device // If bit[2:0] is 001b (Network), bit3 determines IPv4/IPv6 order, // when bit3 is 0: IPv4 first, bit3 is 1: IPv6 first NETWORK_BOOT = 0x1 LOCAL_BOOT = 0x2 INVALID_BOOT = 0xff // Default boot order systembooter configurations NETBOOTER_CONFIG = "{\"type\":\"netboot\",\"method\":\"dhcpv6\"}" LOCALBOOTER_CONFIG = "{\"type\":\"localboot\",\"method\":\"grub\"}" )
Variables ¶
View Source
var ( // BmcUpdatedBootorder is true when IPMI set boot order has been issued BmcUpdatedBootorder bool = false // BootEntries is created with the new boot order and will be used to boot this time BootEntries []systembooter.BootEntry )
View Source
var OENMap = map[string][3]uint8{
"Wiwynn": {0x0, 0x9c, 0x9c},
}
OENMap maps OEM names to a 3 byte OEM number.
OENs are typically serialized as the first 3 bytes of a request body.
Functions ¶
func CheckBMCBootOrder ¶
CheckBMCBootOrder synchronize BIOS's boot order with BMC's boot order. When BMC IPMI sets boot order (valid bit 1), BIOS will update VPD boot order and create new BootEntries accordingly. If BMC didn't set boot order, BIOS would set its current boot order to BMC.
func ClearCMOSClearValidBits ¶
Set BIOS boot order with both CMOS clear and valid bits cleared
func IsCMOSClearSet ¶
Get BIOS boot order data and check if CMOS clear bit and valid bit are both set
func SendOemIpmiProcessorInfo ¶
func SendOemIpmiProcessorInfo(i *ipmi.IPMI, info []ProcessorInfo) error
func SetOemIpmiPostEnd ¶
Types ¶
type DimmInfo ¶
type DimmInfo struct { ManufacturerID [3]uint8 Index uint8 ParameterSelector uint8 DIMMPresent uint8 NodeNumber uint8 ChannelNumber uint8 DIMMNumber uint8 DIMMType uint8 DIMMSpeed uint16 DIMMSize uint32 ModulePartNumber [20]byte ModuleSerialNumber uint32 ModuleManufacturerIDLSB uint8 ModuleManufacturerIDMSB uint8 }
type ProcessorInfo ¶
type ProcessorInfo struct { ManufacturerID [3]uint8 Index uint8 ParameterSelector uint8 ProductName [48]byte CoreNumber uint8 ThreadNumberLSB uint8 ThreadNumberMSB uint8 ProcessorFrequencyLSB uint8 ProcessorFrequencyMSB uint8 Revision1 uint8 Revision2 uint8 }
func GetOemIpmiProcessorInfo ¶
func GetOemIpmiProcessorInfo(si *smbios.Info) ([]ProcessorInfo, error)
Click to show internal directories.
Click to hide internal directories.