Rev 2145 | Rev 2349 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2145 | Rev 2323 | ||
|---|---|---|---|
| Line 24... | Line 24... | ||
| 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | */ |
27 | */ |
| 28 | 28 | ||
| 29 | #ifndef __MAIN_H__ |
- | |
| 30 | #define __MAIN_H__ |
- | |
| 31 | 29 | ||
| - | 30 | /** @addtogroup arm32boot |
|
| - | 31 | * @{ |
|
| - | 32 | */ |
|
| - | 33 | /** @file |
|
| - | 34 | */ |
|
| - | 35 | ||
| - | 36 | ||
| - | 37 | #ifndef BOOT_arm32_MAIN_H |
|
| - | 38 | #define BOOT_arm32_MAIN_H |
|
| - | 39 | ||
| - | 40 | ||
| 32 | /** Align to the nearest higher address. |
41 | /** Aligns to the nearest higher address. |
| 33 | * |
42 | * |
| 34 | * @param addr Address or size to be aligned. |
43 | * @param addr Address or number to be aligned. |
| 35 | * @param align Size of alignment, must be power of 2. |
44 | * @param align Size of alignment, must be power of 2. |
| 36 | */ |
45 | */ |
| 37 | #define ALIGN_UP(addr, align) (((addr) + ((align) - 1)) & ~((align) - 1)) |
46 | #define ALIGN_UP(addr, align) (((addr) + ((align) - 1)) & ~((align) - 1)) |
| 38 | 47 | ||
| - | 48 | /** Maximum number of tasks in the #bootinfo_t structure. */ |
|
| 39 | #define TASKMAP_MAX_RECORDS 32 |
49 | #define TASKMAP_MAX_RECORDS 32 |
| 40 | 50 | ||
| - | 51 | ||
| - | 52 | /** Structure holding information about single loaded task. */ |
|
| 41 | typedef struct { |
53 | typedef struct { |
| - | 54 | /** Address where the task was placed. */ |
|
| 42 | void *addr; |
55 | void *addr; |
| - | 56 | /** Size of the task binary. */ |
|
| 43 | unsigned int size; |
57 | unsigned int size; |
| 44 | } task_t; |
58 | } task_t; |
| 45 | 59 | ||
| - | 60 | ||
| - | 61 | /** Structure holding information about loaded tasks. */ |
|
| 46 | typedef struct { |
62 | typedef struct { |
| - | 63 | /** Number of loaded tasks. */ |
|
| 47 | unsigned int cnt; |
64 | unsigned int cnt; |
| - | 65 | /** Array of loaded tasks. */ |
|
| 48 | task_t tasks[TASKMAP_MAX_RECORDS]; |
66 | task_t tasks[TASKMAP_MAX_RECORDS]; |
| 49 | } bootinfo_t; |
67 | } bootinfo_t; |
| 50 | 68 | ||
| - | 69 | ||
| - | 70 | /** Run when the CPU is switched on. */ |
|
| 51 | extern void start(void); |
71 | extern void start(void); |
| - | 72 | ||
| 52 | extern void bootstrap(void); |
73 | extern void bootstrap(void); |
| 53 | 74 | ||
| 54 | #endif |
75 | #endif |
| - | 76 | ||
| - | 77 | /** @} |
|
| - | 78 | */ |
|
| - | 79 | ||