Classes | |
struct | rbu_packet |
struct | rbu_packet_0 |
struct | rbu_hdr_file_header |
Enumerations | |
enum | packet_type { pt_any, pt_mono, pt_packet, pt_init } |
enum | driver_type { rbu_unsupported, rbu_linux_v1, rbu_linux_v2 } |
Functions | |
DECLARE_EXCEPTION (RbuException) | |
DECLARE_EXCEPTION_EX (RbuNotSupported, rbu, RbuException) | |
DECLARE_EXCEPTION_EX (InvalidHdrFile, rbu, RbuException) | |
DECLARE_EXCEPTION_EX (UnsupportedSystemForHdrFile, rbu, RbuException) | |
DECLARE_EXCEPTION_EX (HdrFileIOError, rbu, RbuException) | |
DECLARE_EXCEPTION_EX (RbuDriverIOError, rbu, RbuException) | |
void | dellBiosUpdate (std::string fileName, packet_type force_type) |
Update BIOS on Dell systems. | |
void | cancelDellBiosUpdate () |
Cancel BIOS Update on Dell systems. | |
void | dumpHdrInfo (std::string fileName) |
Dump info for BIOS Update HDR file. | |
bool | checkSystemId (std::string fileName, u16 sysId) |
Check to see if a HDR file supports a specific System ID. | |
std::string | getHdrBiosVer (std::string fileName) |
Get BIOS ver of HDR file. | |
packet_type | getSupportedPacketType (void) |
void | activateRbuToken () |
void | cancelRbuToken () |
void | checksumPacket (rbu_packet *pkt, size_t size) |
driver_type | getDriverType () |
void | createPacket (char *buffer, size_t bufSize, size_t imageSize) |
static void | writePacket (const char *fn, const char *buffer, size_t bufSize, bool openclose) |
static void | pktUpdateLoop (FILE *hdr_fh, const char *packetFilename, char *buffer, size_t bufSize, bool openclose) |
static void | monoUpdateLoop (FILE *hdr_fh, FILE *data_fh) |
static void | setSize (const char *fn, size_t sz) |
static void | doPacketUpdate_v1 (FILE *hdr_fh) |
static void | doMonoUpdate_v1 (FILE *hdr_fh) |
static void | setPacketType (packet_type type) |
static void | waitForFile (const char *fn, time_t wait) |
static void | setLoadValue (char val) |
static void | doPacketUpdate_v2 (FILE *hdr_fh) |
static void | doMonoUpdate_v2 (FILE *hdr_fh) |
void | dellBiosUpdate (string fileName, packet_type force_type) |
static u16 | extractSystemId (u16 val) |
static struct rbu_hdr_file_header | getHdr (string fileName) |
bool | checkSystemId (string fileName, u16 sysId) |
void | dumpHdrInfo (string fileName) |
DEFINE_EXCEPTION_EX (RbuNotSupportedImpl, rbu, RbuNotSupported) | |
DEFINE_EXCEPTION_EX (InvalidHdrFileImpl, rbu, InvalidHdrFile) | |
DEFINE_EXCEPTION_EX (UnsupportedSystemForHdrFileImpl, rbu, UnsupportedSystemForHdrFile) | |
DEFINE_EXCEPTION_EX (HdrFileIOErrorImpl, rbu, HdrFileIOError) | |
DEFINE_EXCEPTION_EX (RbuDriverIOErrorImpl, rbu, RbuDriverIOError) | |
Variables | |
const int | SYSID_OVERRIDE = 1 |
const int | BIOSVER_OVERRIDE = 2 |
const char * | rbu_v1_mono_data_file = "/sys/firmware/rbu/rbudata" |
const char * | rbu_v1_mono_size_file = "/sys/firmware/rbu/rbudatasize" |
const char * | rbu_v1_pkt_data_file = "/sys/firmware/rbu/packetdata" |
const char * | rbu_v1_pkt_size_file = "/sys/firmware/rbu/packetdatasize" |
const char * | rbu_v2_fw_data_file = "/sys/class/firmware/dell_rbu/data" |
const char * | rbu_v2_fw_load_file = "/sys/class/firmware/dell_rbu/loading" |
const char * | rbu_v2_drv_data_file = "" |
const char * | rbu_v2_img_type_file = "/sys/devices/platform/dell_rbu/image_type" |
const char * | rbu_v2_pkt_size_file = "/sys/devices/platform/dell_rbu/packet_size" |
rbu::rbu_packet | LIBSMBIOS_PACKED_ATTR |
rbu::rbu_packet_0 | LIBSMBIOS_PACKED_ATTR |
rbu::rbu_hdr_file_header | LIBSMBIOS_PACKED_ATTR |
enum packet_type |
enum driver_type |
rbu::DECLARE_EXCEPTION | ( | RbuException | ) |
rbu::DECLARE_EXCEPTION_EX | ( | RbuNotSupported | , | |
rbu | , | |||
RbuException | ||||
) |
rbu::DECLARE_EXCEPTION_EX | ( | InvalidHdrFile | , | |
rbu | , | |||
RbuException | ||||
) |
rbu::DECLARE_EXCEPTION_EX | ( | UnsupportedSystemForHdrFile | , | |
rbu | , | |||
RbuException | ||||
) |
rbu::DECLARE_EXCEPTION_EX | ( | HdrFileIOError | , | |
rbu | , | |||
RbuException | ||||
) |
rbu::DECLARE_EXCEPTION_EX | ( | RbuDriverIOError | , | |
rbu | , | |||
RbuException | ||||
) |
void rbu::dellBiosUpdate | ( | std::string | fileName, | |
packet_type | force_type | |||
) |
Update BIOS on Dell systems.
void cancelDellBiosUpdate | ( | ) |
Cancel BIOS Update on Dell systems.
Definition at line 442 of file Rbu_Linux.cpp.
References cancelRbuToken(), getDriverType(), pt_init, rbu_linux_v1, rbu_linux_v2, rbu_v1_mono_size_file, rbu_v1_pkt_size_file, setLoadValue(), setPacketType(), and setSize().
void rbu::dumpHdrInfo | ( | std::string | fileName | ) |
Dump info for BIOS Update HDR file.
bool rbu::checkSystemId | ( | std::string | fileName, | |
u16 | sysId | |||
) |
Check to see if a HDR file supports a specific System ID.
std::string getHdrBiosVer | ( | std::string | fileName | ) |
Get BIOS ver of HDR file.
Definition at line 65 of file RbuHdr.cpp.
References rbu_hdr_file_header::biosVersion, and getHdr().
packet_type rbu::getSupportedPacketType | ( | void | ) |
Definition at line 55 of file Rbu_Linux.cpp.
References SmbiosFactory::getFactory(), SmbiosFactory::getSingleton(), ISmbiosItem::getU8(), pt_mono, pt_packet, and RBU_SMBIOS_STRUCT.
Referenced by dellBiosUpdate().
void rbu::activateRbuToken | ( | ) |
Definition at line 76 of file Rbu_Linux.cpp.
References TokenTableFactory::getFactory(), TokenTableFactory::getSingleton(), and RBU_ACTIVATE.
Referenced by dellBiosUpdate().
void rbu::cancelRbuToken | ( | ) |
Definition at line 83 of file Rbu_Linux.cpp.
References TokenTableFactory::getFactory(), TokenTableFactory::getSingleton(), and RBU_CANCEL.
Referenced by cancelDellBiosUpdate().
void rbu::checksumPacket | ( | rbu_packet * | pkt, | |
size_t | size | |||
) |
Definition at line 90 of file Rbu_Linux.cpp.
References rbu_packet::pktChksum.
Referenced by createPacket(), and pktUpdateLoop().
driver_type rbu::getDriverType | ( | ) |
Definition at line 102 of file Rbu_Linux.cpp.
References rbu_linux_v1, rbu_linux_v2, rbu_unsupported, rbu_v1_mono_data_file, and rbu_v2_fw_data_file.
Referenced by cancelDellBiosUpdate(), and dellBiosUpdate().
void rbu::createPacket | ( | char * | buffer, | |
size_t | bufSize, | |||
size_t | imageSize | |||
) |
Definition at line 112 of file Rbu_Linux.cpp.
References checksumPacket(), rbu_packet::hdrSize, rbu_packet::pktChksum, rbu_packet::pktId, rbu_packet::pktNum, rbu_packet::pktSetId, rbu_packet::pktSize, rbu_packet::pktVer, rbu_packet::reserved1, rbu_packet::reserved2, and rbu_packet::totPkts.
Referenced by pktUpdateLoop().
static void rbu::writePacket | ( | const char * | fn, | |
const char * | buffer, | |||
size_t | bufSize, | |||
bool | openclose | |||
) | [static] |
static void rbu::pktUpdateLoop | ( | FILE * | hdr_fh, | |
const char * | packetFilename, | |||
char * | buffer, | |||
size_t | bufSize, | |||
bool | openclose | |||
) | [static] |
Definition at line 161 of file Rbu_Linux.cpp.
References checksumPacket(), createPacket(), rbu_packet::pktData, rbu_packet::pktNum, and writePacket().
Referenced by doPacketUpdate_v1(), and doPacketUpdate_v2().
static void rbu::monoUpdateLoop | ( | FILE * | hdr_fh, | |
FILE * | data_fh | |||
) | [static] |
Definition at line 195 of file Rbu_Linux.cpp.
Referenced by doMonoUpdate_v1(), and doMonoUpdate_v2().
static void rbu::setSize | ( | const char * | fn, | |
size_t | sz | |||
) | [static] |
Definition at line 220 of file Rbu_Linux.cpp.
Referenced by cancelDellBiosUpdate(), doMonoUpdate_v1(), doPacketUpdate_v1(), and doPacketUpdate_v2().
static void rbu::doPacketUpdate_v1 | ( | FILE * | hdr_fh | ) | [static] |
Definition at line 236 of file Rbu_Linux.cpp.
References pktUpdateLoop(), rbu_v1_mono_size_file, rbu_v1_pkt_data_file, rbu_v1_pkt_size_file, and setSize().
Referenced by dellBiosUpdate().
static void rbu::doMonoUpdate_v1 | ( | FILE * | hdr_fh | ) | [static] |
Definition at line 248 of file Rbu_Linux.cpp.
References monoUpdateLoop(), rbu_v1_mono_data_file, rbu_v1_mono_size_file, rbu_v1_pkt_size_file, and setSize().
Referenced by dellBiosUpdate().
static void rbu::setPacketType | ( | packet_type | type | ) | [static] |
Definition at line 277 of file Rbu_Linux.cpp.
References pt_any, pt_init, pt_mono, pt_packet, and rbu_v2_img_type_file.
Referenced by cancelDellBiosUpdate(), and dellBiosUpdate().
static void rbu::waitForFile | ( | const char * | fn, | |
time_t | wait | |||
) | [static] |
static void rbu::setLoadValue | ( | char | val | ) | [static] |
Definition at line 314 of file Rbu_Linux.cpp.
References rbu_v2_fw_load_file, and waitForFile().
Referenced by cancelDellBiosUpdate(), doMonoUpdate_v2(), and doPacketUpdate_v2().
static void rbu::doPacketUpdate_v2 | ( | FILE * | hdr_fh | ) | [static] |
Definition at line 331 of file Rbu_Linux.cpp.
References pktUpdateLoop(), rbu_v2_fw_data_file, rbu_v2_pkt_size_file, setLoadValue(), and setSize().
Referenced by dellBiosUpdate().
static void rbu::doMonoUpdate_v2 | ( | FILE * | hdr_fh | ) | [static] |
Definition at line 342 of file Rbu_Linux.cpp.
References monoUpdateLoop(), rbu_v2_fw_data_file, and setLoadValue().
Referenced by dellBiosUpdate().
void rbu::dellBiosUpdate | ( | string | fileName, | |
packet_type | force_type | |||
) |
Definition at line 371 of file Rbu_Linux.cpp.
References activateRbuToken(), doMonoUpdate_v1(), doMonoUpdate_v2(), doPacketUpdate_v1(), doPacketUpdate_v2(), getDriverType(), getSupportedPacketType(), pt_any, pt_init, pt_packet, rbu_linux_v1, rbu_linux_v2, and setPacketType().
static struct rbu_hdr_file_header rbu::getHdr | ( | string | fileName | ) | [static] |
Definition at line 40 of file RbuHdr.cpp.
Referenced by checkSystemId(), dumpHdrInfo(), and getHdrBiosVer().
bool rbu::checkSystemId | ( | string | fileName, | |
u16 | sysId | |||
) |
Definition at line 55 of file RbuHdr.cpp.
References extractSystemId(), getHdr(), rbu_hdr_file_header::numSystems, and rbu_hdr_file_header::systemIdList.
void rbu::dumpHdrInfo | ( | string | fileName | ) |
Definition at line 72 of file RbuHdr.cpp.
References rbu_hdr_file_header::biosVersion, extractSystemId(), getHdr(), rbu_hdr_file_header::headerId, rbu_hdr_file_header::headerLength, rbu_hdr_file_header::headerMajorVer, rbu_hdr_file_header::headerMinorVer, rbu_hdr_file_header::numSystems, rbu_hdr_file_header::quickCheck, and rbu_hdr_file_header::systemIdList.
rbu::DEFINE_EXCEPTION_EX | ( | RbuNotSupportedImpl | , | |
rbu | , | |||
RbuNotSupported | ||||
) |
rbu::DEFINE_EXCEPTION_EX | ( | InvalidHdrFileImpl | , | |
rbu | , | |||
InvalidHdrFile | ||||
) |
rbu::DEFINE_EXCEPTION_EX | ( | UnsupportedSystemForHdrFileImpl | , | |
rbu | , | |||
UnsupportedSystemForHdrFile | ||||
) |
rbu::DEFINE_EXCEPTION_EX | ( | HdrFileIOErrorImpl | , | |
rbu | , | |||
HdrFileIOError | ||||
) |
rbu::DEFINE_EXCEPTION_EX | ( | RbuDriverIOErrorImpl | , | |
rbu | , | |||
RbuDriverIOError | ||||
) |
const int SYSID_OVERRIDE = 1 |
const int BIOSVER_OVERRIDE = 2 |
const char* rbu_v1_mono_data_file = "/sys/firmware/rbu/rbudata" |
const char* rbu_v1_mono_size_file = "/sys/firmware/rbu/rbudatasize" |
Definition at line 45 of file Rbu_Linux.cpp.
Referenced by cancelDellBiosUpdate(), doMonoUpdate_v1(), and doPacketUpdate_v1().
const char* rbu_v1_pkt_data_file = "/sys/firmware/rbu/packetdata" |
const char* rbu_v1_pkt_size_file = "/sys/firmware/rbu/packetdatasize" |
Definition at line 47 of file Rbu_Linux.cpp.
Referenced by cancelDellBiosUpdate(), doMonoUpdate_v1(), and doPacketUpdate_v1().
const char* rbu_v2_fw_data_file = "/sys/class/firmware/dell_rbu/data" |
Definition at line 49 of file Rbu_Linux.cpp.
Referenced by doMonoUpdate_v2(), doPacketUpdate_v2(), and getDriverType().
const char* rbu_v2_fw_load_file = "/sys/class/firmware/dell_rbu/loading" |
const char* rbu_v2_drv_data_file = "" |
Definition at line 51 of file Rbu_Linux.cpp.
const char* rbu_v2_img_type_file = "/sys/devices/platform/dell_rbu/image_type" |
const char* rbu_v2_pkt_size_file = "/sys/devices/platform/dell_rbu/packet_size" |