7 #if !defined(_Operation_h_) 12 #include "DataSource.h" 13 #include "DataTarget.h" 14 #include "smart_ptr.h" 44 inline DataSource *getSource() {
return m_source; }
46 inline DataTarget *getTarget() {
return m_target; }
47 inline void setDCDLoad(
bool isDCD) { m_isDCDLoad = isDCD; }
48 inline bool isDCDLoad()
const {
return m_isDCDLoad; }
75 , m_isStackPointerSet(
false)
79 inline void setTarget(
DataTarget *target) { m_target = target; }
80 inline DataTarget *getTarget() {
return m_target; }
81 inline void setArgument(uint32_t arg) { m_argument = arg; }
82 inline uint32_t getArgument() {
return m_argument; }
83 inline void setExecuteType(execute_type_t type) { m_type = type; }
84 inline execute_type_t getExecuteType() {
return m_type; }
85 inline void setIsHAB(
bool isHAB) { m_isHAB = isHAB; }
86 inline bool isHAB()
const {
return m_isHAB; }
87 inline void setStackPointer(uint32_t sp) { m_stackPointer = sp; }
88 inline uint32_t getStackPointer() {
return m_stackPointer; }
89 inline void setIsStackPointerSet(
bool isSet) { m_isStackPointerSet = isSet; }
90 inline bool isStackPonterSet()
const {
return m_isStackPointerSet; }
94 uint32_t m_stackPointer;
95 execute_type_t m_type;
97 bool m_isStackPointerSet;
124 inline void setBootMode(uint32_t mode) { m_bootMode = mode; }
125 inline uint32_t getBootMode()
const {
return m_bootMode; }
155 void setRange(uint32_t start, uint32_t count)
157 m_startAddress = start;
160 void getRange(uint32_t *start, uint32_t *count)
const;
163 uint32_t m_startAddress;
164 uint32_t m_byteCount;
191 void setMemoryId(uint32_t memId) { m_memoryId = memId; }
192 uint32_t getMemoryId()
const {
return m_memoryId; }
219 , m_memControllerId(0)
223 void setMemControllerId(uint32_t memControllerId) { m_memControllerId = memControllerId; }
224 uint32_t getMemControllerId()
const {
return m_memControllerId; }
225 void setRange(uint32_t start, uint32_t count)
227 m_startAddress = start;
230 void getRange(uint32_t *start, uint32_t *count)
const;
233 uint32_t m_startAddress;
234 uint32_t m_byteCount;
235 uint32_t m_memControllerId;
254 , m_memSpace(memSpace)
258 void setMemorySpace(uint32_t memSpace) { m_memSpace = memSpace; }
259 uint32_t getMemorySpace()
const {
return m_memSpace; }
284 void setKeyblob(
Keyblob *keyblob) { m_keyblob = keyblob; }
285 Keyblob *getKeyblob() {
return m_keyblob; }
310 void setKeyblob(
Keyblob *keyblob) { m_keyblob = keyblob; }
311 Keyblob *getKeyblob() {
return m_keyblob; }
340 inline iterator_t begin() {
return m_operations.begin(); }
341 inline const_iterator_t begin()
const {
return m_operations.begin(); }
342 inline iterator_t end() {
return m_operations.end(); }
343 inline const_iterator_t end()
const {
return m_operations.end(); }
346 inline Operation *operator[](
unsigned index)
const {
return m_operations[index]; }
349 inline unsigned getCount()
const {
return m_operations.size(); }
355 inline void append(
Operation *op) { m_operations.push_back(op); }
374 #endif // _Operation_h_ EncryptOperation()
Default constructor.
Definition: Operation.h:297
Operation to encrypt data for OTFAD.
Definition: Operation.h:293
Operation to erase the entire external flash memory array.
Definition: Operation.h:182
operation_list_t m_operations
The list of operations.
Definition: Operation.h:369
Abstract base class for data sources.
Definition: apps/elftosb/common/DataSource.h:33
Operation to program persistent bits.
Definition: Operation.h:241
Ordered sequence of operations.
Definition: Operation.h:323
uint32_t m_bootMode
The new boot mode value.
Definition: Operation.h:127
operation_list_t::iterator iterator_t
Iterator over operations.
Definition: Operation.h:327
std::vector< Operation * > operation_list_t
Type for a list of operation objects.
Definition: Operation.h:326
KeywrapOperation()
Default constructor.
Definition: Operation.h:271
ProgramOperation()
Default constructor.
Definition: Operation.h:245
Operation to reset the device.
Definition: Operation.h:133
Operation to execute code at a certain address.
Definition: Operation.h:58
smart_ptr< Keyblob > m_keyblob
Active keyblob during this load.
Definition: Operation.h:287
Operation to enable external memory access.
Definition: Operation.h:212
Operation to erase flash memory.
Definition: Operation.h:145
Operation to wrap and program keys.
Definition: Operation.h:267
Simple, standard smart pointer class.
Definition: apps/elftosb/common/smart_ptr.h:18
Authenticate with HAB and execute the entry point.
Definition: Operation.h:103
Definition: BootImage.h:13
Abstract base class for the target address or range of data.
Definition: apps/elftosb/common/DataTarget.h:34
smart_ptr< Keyblob > m_keyblob
Active keyblob during this load.
Definition: Operation.h:313
operation_list_t::const_iterator const_iterator_t
Const iterator over operations.
Definition: Operation.h:328
Operation to erase the entire flash memory array.
Definition: Operation.h:170
Keyblob specification.
Definition: Keyblob.h:27
Operation to switch boot modes.
Definition: Operation.h:115
ProgramOperation(uint32_t memSpace)
Constructor. Takes a memory space argument.
Definition: Operation.h:252
Operation to erase the entire flash memory array, unsecure version.
Definition: Operation.h:200
Abstract base class for all boot operations.
Definition: Operation.h:22
Load data into memory operation.
Definition: Operation.h:32
EncryptOperation(Keyblob *keyblob)
Constructor. Takes a keyblob argument.
Definition: Operation.h:304
OperationSequence(Operation *soleElement)
Constructor. Makes a one-element sequence from soleElement.
Definition: Operation.h:334
OperationSequence & operator+=(const OperationSequence *other)
Appends other onto this sequence.
Definition: Operation.h:361
OperationSequence()
Default constructor.
Definition: Operation.h:332
KeywrapOperation(Keyblob *keyblob)
Constructor. Takes a keyblob argument.
Definition: Operation.h:278