-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathloader.h
More file actions
27 lines (19 loc) · 882 Bytes
/
loader.h
File metadata and controls
27 lines (19 loc) · 882 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef BOOT_LOADER_H
#define BOOT_LOADER_H
// The loader is run directly from RDRAM for speed. We reserve a portion at
// the end of RDRAM for it.
#define LOADER_SIZE (28*1024)
// We put the first stage stack into the cache, at the same address as the loader.
// We reserve 4 KiB to it.
#define STACK1_SIZE (4*1024)
#define TOTAL_RESERVED_SIZE (LOADER_SIZE + STACK1_SIZE)
#define STACK1_BASE (0x80800000 - LOADER_SIZE - STACK1_SIZE)
#define STACK1_TOP (0x80800000 - LOADER_SIZE)
#define LOADER_BASE(memsize, stage2size) (0x80000000 + (memsize) - (stage2size))
#define STACK2_TOP(memsize, stage2size) (LOADER_BASE(memsize, stage2size) - 16)
#define LOADER_VADDR 0xE0000000
#ifndef __ASSEMBLER__
__attribute__((noreturn, far))
void demo(void);
#endif
#endif /* BOOT_LOADER_H */