![]() |
Kinetis Bootloader Host
2.0.0
Host Tools for Kinetis devices
|
A non-bootable section of an Encore boot image. More...
#include <EncoreBootImage.h>
Inheritance diagram for elftosb::EncoreBootImage::DataSection:
Collaboration diagram for elftosb::EncoreBootImage::DataSection:Public Member Functions | |
| DataSection () | |
| Default constructor. | |
| DataSection (uint32_t identifier) | |
| Constructor taking the unique identifier for this section. | |
| void | setData (const uint8_t *data, unsigned length) |
| Set the data section's contents. More... | |
| void | setDataNoCopy (const uint8_t *data, unsigned length) |
| Set the data section's contents without copying data. More... | |
| virtual void | debugPrint () const |
| Print out a string representation of the object. | |
Cipher blocks | |
| virtual unsigned | getBlockCount () const |
| Returns the total number of cipher blocks occupied by this section. | |
| virtual unsigned | getBlocks (unsigned offset, unsigned maxCount, cipher_block_t *data) |
| Returns the contents of up to maxCount cipher blocks. | |
Public Member Functions inherited from elftosb::EncoreBootImage::Section | |
| Section () | |
| Default constructor. | |
| Section (uint32_t identifier) | |
| Constructor taking the unique identifier for this section. | |
| void | setIdentifier (uint32_t identifier) |
| uint32_t | getIdentifier () const |
| virtual void | setFlags (uint32_t flags) |
| Sets explicit flags for this section. | |
| virtual uint32_t | getFlags () const |
| Returns the flags for this section. More... | |
| virtual void | fillSectionHeader (section_header_t &header) |
| Pure virtual method to construct the header for this section. More... | |
| void | setImage (EncoreBootImage *image) |
| Called when the section is added to an image. | |
| EncoreBootImage * | getImage () const |
| Returns a pointer to the image that this section belongs to. | |
| void | setAlignment (unsigned alignment) |
| Sets the required alignment in the output file for this section. More... | |
| unsigned | getAlignment () const |
| Returns the current alignment, the minimum of which will be 16. | |
| unsigned | getPadBlockCountForOffset (unsigned offset) |
| Computes padding amount for alignment requirement. More... | |
| void | setLeaveUnencrypted (unsigned flag) |
| Sets whether the section will be left unencrypted. | |
| bool | getLeaveUnencrypted () const |
| Returns true if the section will remain unencrypted. | |
Cipher blocks | |
Protected Attributes | |
| smart_array_ptr< uint8_t > | m_data |
| The section's contents. | |
| unsigned | m_length |
| Number of bytes of data. | |
Protected Attributes inherited from elftosb::EncoreBootImage::Section | |
| uint32_t | m_identifier |
| Unique identifier for this section. | |
| EncoreBootImage * | m_image |
| The image to which this section belongs. | |
| unsigned | m_alignment |
| Alignment requirement for the start of this section. | |
| uint32_t | m_flags |
| Section flags set by the user. | |
| bool | m_leaveUnencrypted |
| Set to true to prevent this section from being encrypted. | |
A non-bootable section of an Encore boot image.
| void EncoreBootImage::DataSection::setData | ( | const uint8_t * | data, |
| unsigned | length | ||
| ) |
Set the data section's contents.
A copy is made of data. Any previously assigned data is disposed of.
| void EncoreBootImage::DataSection::setDataNoCopy | ( | const uint8_t * | data, |
| unsigned | length | ||
| ) |
Set the data section's contents without copying data.
The section takes ownership of data and will dispose of it using the array delete operator upon its destruction.