Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implicit padding being added to multiple MM commands #33

Open
dmknutsen opened this issue Jun 14, 2022 · 1 comment
Open

Implicit padding being added to multiple MM commands #33

dmknutsen opened this issue Jun 14, 2022 · 1 comment

Comments

@dmknutsen
Copy link
Contributor

Checklist (Please check before submitting)

  • [x ] I reviewed the Contributing Guide.
  • [x ] I reviewed the README file to see if the feature is in the major future work.
  • [x ] I performed a cursory search to see if the feature request is relevant, not redundant, nor in conflict with other tickets.

Is your feature request related to a problem? Please describe.
Some MM commands assume a 64 bit aligned header while others are offset by 32 bits. An example would be the Peek vs Poke commands.

Requester Info
Dan Knutsen
NASA Goddard

@skliper
Copy link
Contributor

skliper commented Jun 14, 2022

MM/fsw/src/mm_msg.h

Lines 76 to 84 in b0e3c20

typedef struct
{
CFE_MSG_CommandHeader_t CmdHeader; /**< \brief Command header */
uint8 DataSize; /**< \brief Size of the data to be read */
uint8 MemType; /**< \brief Memory type to peek data from */
uint8 Padding[2]; /**< \brief Structure padding */
MM_SymAddr_t SrcSymAddress; /**< \brief Symbolic source peek address */
} MM_PeekCmd_t;

MM/fsw/src/mm_msg.h

Lines 91 to 100 in b0e3c20

typedef struct
{
CFE_MSG_CommandHeader_t CmdHeader; /**< \brief Command header */
uint8 DataSize; /**< \brief Size of the data to be written */
uint8 MemType; /**< \brief Memory type to poke data to */
uint8 Padding[2]; /**< \brief Structure padding */
uint32 Data; /**< \brief Data to be written */
MM_SymAddr_t DestSymAddress; /**< \brief Symbolic destination poke address */
} MM_PokeCmd_t;

Padding may or may not get added depending on the alignment requirement of addresses and the alignment of the header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants