From 3a198e2e2faf666bec1a0290a162a312696cc0bf Mon Sep 17 00:00:00 2001 From: Avi Weiss Date: Mon, 3 Apr 2023 12:24:34 +1000 Subject: [PATCH] Fix #1708, Align padding explicitly in cfe_tbl_msg.h --- docs/src/mnem_maps/cfe_tbl_tlm_mnem_map | 4 ++-- modules/tbl/config/default_cfe_tbl_msgdefs.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/src/mnem_maps/cfe_tbl_tlm_mnem_map b/docs/src/mnem_maps/cfe_tbl_tlm_mnem_map index a2eb427cb..209353130 100644 --- a/docs/src/mnem_maps/cfe_tbl_tlm_mnem_map +++ b/docs/src/mnem_maps/cfe_tbl_tlm_mnem_map @@ -27,7 +27,7 @@ TBL_VALSUCCESSCTR=$sc_$cpu_TBL_ValSuccessCtr \ TBL_VALFAILEDCTR=$sc_$cpu_TBL_ValFailedCtr \ TBL_VALREQCTR=$sc_$cpu_TBL_ValReqCtr \ TBL_NUMFREESHRBUF=$sc_$cpu_TBL_NumFreeShrBuf \ -TBL_BYTEALIGNPAD1=$sc_$cpu_TBL_ByteAlignPad1 \ +TBL_HKPADDING=$sc_$cpu_TBL_HkPadding \ TBL_MEMPOOLHANDLE=$sc_$cpu_TBL_MemPoolHandle \ TBL_LASTUPDTIME="$sc_$cpu_TBL_LastUpdTime, $sc_$cpu_TBL_SECONDS, $sc_$cpu_TBL_SUBSECONDS" \ TBL_LASTUPDTBLNAME=$sc_$cpu_TBL_LastUpdTblName[CFE_TB_MAX_FULL_NAME_LEN] \ @@ -51,4 +51,4 @@ TBL_NAME=$sc_$cpu_TBL_Name[CFE_TB_MAX_FULL_NAME_LEN] \ TBL_LASTFILEUPD=$sc_$cpu_TBL_LastFileUpd[OS_MAX_PATH_LEN] \ TBL_OWNERAPP=$sc_$cpu_TBL_OwnerApp[OS_MAX_API_NAME] \ TBL_CRITICAL=$sc_$cpu_TBL_Spare3 \ -TBL_SPARE4=$sc_$cpu_TBL_Spare4 +TBL_REGPADDING=$sc_$cpu_TBL_RegPadding diff --git a/modules/tbl/config/default_cfe_tbl_msgdefs.h b/modules/tbl/config/default_cfe_tbl_msgdefs.h index 7bd8fd04b..a25981d50 100644 --- a/modules/tbl/config/default_cfe_tbl_msgdefs.h +++ b/modules/tbl/config/default_cfe_tbl_msgdefs.h @@ -218,8 +218,8 @@ typedef struct CFE_TBL_HousekeepingTlm_Payload */ uint8 NumFreeSharedBufs; /**< \cfetlmmnemonic \TBL_NUMFREESHRBUF \brief Number of free Shared Working Buffers */ - uint8 ByteAlignPad1; /**< \cfetlmmnemonic \TBL_BYTEALIGNPAD1 - \brief Spare byte to ensure longword alignment */ + uint8 HkPadding[3]; /**< \cfetlmmnemonic \TBL_HKPADDING + \brief Structure Padding to align to 32-bit boundaries */ CFE_ES_MemHandle_t MemPoolHandle; /**< \cfetlmmnemonic \TBL_MEMPOOLHANDLE \brief Handle to TBL's memory pool */ CFE_TIME_SysTime_t LastUpdateTime; /**< \cfetlmmnemonic \TBL_LASTUPDTIME @@ -271,8 +271,8 @@ typedef struct CFE_TBL_TblRegPacket_Payload \brief Name of owning application */ bool Critical; /**< \cfetlmmnemonic \TBL_CRITICAL \brief Indicates whether table is Critical or not */ - uint8 ByteAlign4; /**< \cfetlmmnemonic \TBL_SPARE4 - \brief Spare byte to maintain byte alignment */ + uint8 RegPadding[3]; /**< \cfetlmmnemonic \TBL_REGPADDING + \brief Structure Padding to align to 32-bit boundaries */ } CFE_TBL_TblRegPacket_Payload_t; #endif