summaryrefslogtreecommitdiff
path: root/fw_comps_mgr
diff options
authorBenjamin Drung <benjamin.drung@cloud.ionos.com>2020-02-17 12:58:21 +0100
committergit-ubuntu importer <ubuntu-devel-discuss@lists.ubuntu.com>2020-02-17 16:37:52 +0000
commit5224041de03bb5f267037dfcbbc8c10453b91d64 (patch)
treedcf55bec3e057ad0e5259c622a2c6bcbfcd11ad4 /fw_comps_mgr
parente923c26736e661c278f771861b47823f470a8115 (diff)
4.13.3+2-1 (patches unapplied)import/4.13.3+2-1
Imported using git-ubuntu import.
Notes
Notes: * New upstream release (Closes: #951417) * Drop spelling mistake fix (accepted upstream) * Refresh remaining patches * Bump Standards-Version to 4.5.0 (no changes required)
Diffstat (limited to 'fw_comps_mgr')
-rwxr-xr-xfw_comps_mgr/fw_comps_mgr.cpp14
-rwxr-xr-xfw_comps_mgr/fw_comps_mgr.h7
-rwxr-xr-xfw_comps_mgr/fw_comps_mgr_dma_access.cpp3
3 files changed, 13 insertions, 11 deletions
diff --git a/fw_comps_mgr/fw_comps_mgr.cpp b/fw_comps_mgr/fw_comps_mgr.cpp
index 0616fee..88503d7 100755
--- a/fw_comps_mgr/fw_comps_mgr.cpp
+++ b/fw_comps_mgr/fw_comps_mgr.cpp
@@ -368,7 +368,7 @@ bool FwCompsMgr::queryComponentInfo(u_int32_t componentIndex,
return true;
}
-reg_access_status_t FwCompsMgr::getGI(mfile *mf, struct tools_open_mgir *gi)
+reg_access_status_t FwCompsMgr::getGI(mfile *mf, mgirReg *gi)
{
reg_access_status_t rc = ME_REG_ACCESS_OK;
u_int32_t tp = 0;
@@ -918,7 +918,7 @@ u_int8_t transRomType(u_int8_t mgirRomType)
}
}
-void FwCompsMgr::extractRomInfo(tools_open_mgir *mgir, fwInfoT *fwQuery)
+void FwCompsMgr::extractRomInfo(mgirReg *mgir, fwInfoT *fwQuery)
{
if (!fwQuery || !mgir) {
return;
@@ -977,7 +977,7 @@ bool FwCompsMgr::queryFwInfo(fwInfoT *query, bool next_boot_fw_ver)
* MGIR
*/
reg_access_status_t rc;
- struct tools_open_mgir mgir;
+ mgirReg mgir;
memset(&mgir, 0, sizeof(mgir));
rc = getGI(_mf, &mgir);
if (rc) {
@@ -989,10 +989,10 @@ bool FwCompsMgr::queryFwInfo(fwInfoT *query, bool next_boot_fw_ver)
query->hw_dev_id = mgir.hw_info.hw_dev_id;
query->dev_id = mgir.hw_info.device_id;
query->rev_id = mgir.hw_info.device_hw_revision;
- query->security_type.secure_fw = mgir.fw_info.secure_fw;
+ query->security_type.secure_fw = mgir.fw_info.secured;
query->security_type.signed_fw = mgir.fw_info.signed_fw;
- query->security_type.debug_fw = mgir.fw_info.debug_fw;
- query->security_type.dev_fw = mgir.fw_info.dev_fw;
+ query->security_type.debug_fw = mgir.fw_info.debug;
+ query->security_type.dev_fw = mgir.fw_info.dev;
query->signed_fw = _compsQueryMap[FwComponent::COMPID_BOOT_IMG].comp_cap.signed_updates_only;
query->base_mac_orig.uid = ((u_int64_t)mgir.hw_info.manufacturing_base_mac_47_32 << 32 | mgir.hw_info.manufacturing_base_mac_31_0);
@@ -1172,7 +1172,7 @@ void FwCompsMgr::deal_with_signal()
sig = mft_signal_is_fired();
if (sig) {
unlock_flash_semaphore();
- // reset recieved signal
+ // reset received signal
mft_signal_set_fired(0);
// retore prev handler
mft_signal_set_handling(0);
diff --git a/fw_comps_mgr/fw_comps_mgr.h b/fw_comps_mgr/fw_comps_mgr.h
index e6e389f..297d36e 100755
--- a/fw_comps_mgr/fw_comps_mgr.h
+++ b/fw_comps_mgr/fw_comps_mgr.h
@@ -63,6 +63,7 @@ typedef struct reg_access_hca_mcqs_reg comp_status_st;
typedef struct reg_access_hca_mcqi_reg comp_info_st;
typedef struct reg_access_hca_mcc_reg fsm_control_st;
typedef struct reg_access_hca_mcqi_cap comp_cap_st;
+typedef struct reg_access_hca_mgir mgirReg;
typedef struct reg_access_hca_mcqi_version component_version_st;
@@ -78,7 +79,7 @@ struct uid_entry {
typedef struct {
u_int8_t type;
u_int8_t arch;
- u_int32_t version;
+ reg_access_hca_rom_version version;
} mgirRomInfo;
typedef struct {
@@ -463,9 +464,9 @@ private:
void getInfoAsVersion(std::vector<u_int32_t>& infoData,
component_version_st *cmpVer);
- reg_access_status_t getGI(mfile *mf, struct tools_open_mgir *gi);
+ reg_access_status_t getGI(mfile *mf, mgirReg *gi);
bool extractMacsGuids(fwInfoT *fwQuery);
- void extractRomInfo(tools_open_mgir *mgir, fwInfoT *fwQuery);
+ void extractRomInfo(mgirReg *mgir, fwInfoT *fwQuery);
bool refreshComponentsStatus();
std::vector<comp_query_st> _compsQueryMap;
diff --git a/fw_comps_mgr/fw_comps_mgr_dma_access.cpp b/fw_comps_mgr/fw_comps_mgr_dma_access.cpp
index 9219c66..07d8a78 100755
--- a/fw_comps_mgr/fw_comps_mgr_dma_access.cpp
+++ b/fw_comps_mgr/fw_comps_mgr_dma_access.cpp
@@ -179,6 +179,7 @@ bool DMAComponentAccess::accessComponent(u_int32_t updateHandle, u_int32_t offse
prepareParameters(updateHandle, &accessData, offset + (data_size - leftSize), data, data_size, access, leftSize, page, mailboxPage);
int nIteration = 0;
while (leftSize > 0) {
+ memset((u_int8_t*)mailboxPage.va, 0, TOOLS_OPEN_MCDD_DESCRIPTOR_SIZE);
memset(&mailboxVirtPtr_1, 0, TOOLS_OPEN_MCDD_DESCRIPTOR_SIZE);//set zero before each transaction
maxDataSize = leftSize > PAGE_SIZE ? PAGE_SIZE : leftSize;
mft_signal_set_handling(1);
@@ -297,7 +298,7 @@ bool DMAComponentAccess::accessComponent(u_int32_t updateHandle, u_int32_t offse
#ifndef UEFI_BUILD
}
catch (std::exception &e) {
- DPRINTF("DMAComponentAccess::Exception occured %s\n", e.what());
+ DPRINTF("DMAComponentAccess::Exception occurred %s\n", e.what());
return false;
}
#endif