/******************************************************************************* NAME biosPlatInfo.h VERSION %version: 4 % UPDATE DATE %date_modified: Wed Mar 16 19:53:35 2016 % PROGRAMMER %created_by: dhoyer % Copyright 2015-2017 NetApp, Inc. All Rights Reserved. DESCRIPTION: This class determines the information specific to the platform for the BIOS package. Included is the ability to read the BIOS image, determine the size of the BIOS, and the version of the staged image. *******************************************************************************/ #ifndef __INCbiosPlatInfo #define __INCbiosPlatInfo /*** INCLUDES ***/ #include #include #include //#include // gis: cmnTypes.h are defined as below #include #define BIOS_SIZE 0x1000000 // Explicitly-sized signed types typedef int8_t INT8; typedef int16_t INT16; typedef int32_t INT32; typedef int64_t INT64; // Explicitly-sized unsigned types typedef uint8_t UINT8; typedef uint16_t UINT16; typedef uint32_t UINT32; typedef uint64_t UINT64; // Implicitly-sized signed types typedef int INT; typedef intptr_t INTPTR; // Implicitly-sized unsigned types typedef unsigned int UINT; typedef uintptr_t UINTPTR; typedef uint8_t BYTE; namespace bios { /** * \brief BiosPlatInfo classi * * This class provides information about the packaged BIOS for the specific platform */ class BiosPlatInfo { public: // Default constructor BiosPlatInfo(const std::string& biosInfoPath = std::string()); // Default destructor ~BiosPlatInfo() { free(m_Buffer); }; // Reads in the package BIOS image and returns pointer to image in memory UINT32* readBiosFile(); /** * \brief This function returns the expected size of the BIOS image * * \return Size of BIOS image */ UINT32 biosSizeGet() const { return m_BiosSize; }; /** * \brief This function returns the version of the BIOS image * * \return BIOS version */ // const std::string& biosVersion() const { return m_BiosVersion; }; /** * \brief This function returns the name of the BIOS image * * \return Name of BIOS image */ // const std::string& biosName() const { return m_BiosName; }; /** * \brief This function returns the network prefix of the BIOS image * * \return Network prefix of BIOS image */ // const std::string& biosPrefix() const { return m_BiosPrefix; }; private: // Returns string from "line". This string is the portion on // the right side of the string (stripping of leading and trailing spaces) static const std::string getValueFromString(const std::string& line); // Path to the package platform bios information file //std::string m_PlatformPath; // Full path to the package platform bios image std::string m_BiosFile; // Name of the package BIOS //std::string m_BiosName; // Expected size of the package BIOS UINT32 m_BiosSize; // Version of the package BIOS //std::string m_BiosVersion; // Name of the board as returned from HWL //const char* m_BoardName; // Buffer containing pointer to BIOS image in memory UINT32* m_Buffer; // Prefix for BIOS image when downloaded over network //std::string m_BiosPrefix; // Default path to the package platform bios information //static const std::string m_DefaultPath; }; } #endif /* End of __INCbiosPlatInfo */