26,29 → 26,54 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
|
#ifndef __MAIN_H__ |
#define __MAIN_H__ |
|
/** Align to the nearest higher address. |
/** @addtogroup arm32boot |
* @{ |
*/ |
/** @file |
*/ |
|
|
#ifndef BOOT_arm32_MAIN_H |
#define BOOT_arm32_MAIN_H |
|
|
/** Aligns to the nearest higher address. |
* |
* @param addr Address or size to be aligned. |
* @param addr Address or number to be aligned. |
* @param align Size of alignment, must be power of 2. |
*/ |
#define ALIGN_UP(addr, align) (((addr) + ((align) - 1)) & ~((align) - 1)) |
|
/** Maximum number of tasks in the #bootinfo_t structure. */ |
#define TASKMAP_MAX_RECORDS 32 |
|
|
/** Structure holding information about single loaded task. */ |
typedef struct { |
/** Address where the task was placed. */ |
void *addr; |
/** Size of the task binary. */ |
unsigned int size; |
} task_t; |
|
|
/** Structure holding information about loaded tasks. */ |
typedef struct { |
/** Number of loaded tasks. */ |
unsigned int cnt; |
/** Array of loaded tasks. */ |
task_t tasks[TASKMAP_MAX_RECORDS]; |
} bootinfo_t; |
|
|
/** Run when the CPU is switched on. */ |
extern void start(void); |
|
extern void bootstrap(void); |
|
#endif |
|
/** @} |
*/ |
|