#define MB_MODS_BASE 0x82000000
#define MB_PARAM_MOD 0x88000000
#define MB_MODS_ALIGN 0x00800000 /* 8 MB */
-#define MB_MODS_SIZE 0x00400000 /* 4 MB */
#define MB_MMAP_START 0x80000000
#define MB_MMAP_SIZE 0x10000000 /* 256 MB */
int i;
for (i = 0; i < MB_MODS_NR; ++i) {
mb_modlist[i].mod_start = MB_MODS_BASE + i * MB_MODS_ALIGN;
- mb_modlist[i].mod_end = mb_modlist[i].mod_start + MB_MODS_SIZE ;
+ mb_modlist[i].mod_end = mb_modlist[i].mod_start + MB_MODS_ALIGN
+ - ARM_PAGE_SIZE;
mb_modlist[i].cmdline = 0;
}
pop {r0, r3}
1: /* Restore the registers */
- ldr r1, [r0, #REG1] /* Restore r1 */
- ldr r2, [r0, #REG2] /* Restore r2 */
- ldr r3, [r0, #REG3] /* Restore r3 */
ldr r4, [r0, #REG4] /* Restore r4 */
ldr r5, [r0, #REG5] /* Restore r5 */
ldr r6, [r0, #REG6] /* Restore r6 */
ldr fp, [r0, #FPREG] /* Restore fp */
ldr sp, [r0, #SPREG] /* Restore sp */
ldr lr, [r0, #LRREG] /* Restore lr */
- mov r4, r0
- ldr r0, [r4, #REG0] /* Restore r0 */
+ mov r3, r0
+ ldr r0, [r3, #REG0] /* Restore r0 */
2:
- ldr pc, [r4, #PCREG] /* Restore pc */
+ ldr pc, [r3, #PCREG] /* Restore pc */
/* void ctx_start()
int tll_islocked(tll_t *tllp)
{
+ assert(tllp >= (tll_t *) PAGE_SIZE);
return(tllp->t_current != TLL_NONE);
}
int tll_locked_by_me(tll_t *tllp)
{
+ assert(tllp >= (tll_t *) PAGE_SIZE);
assert(self != NULL);
return(tllp->t_owner == self && !(tllp->t_status & TLL_PEND));
}
/* Try to lock three-level-lock tll with type locktype */
assert(self != NULL);
- assert(tllp != NULL);
+ assert(tllp >= (tll_t *) PAGE_SIZE);
assert(locktype != TLL_NONE);
self->w_next = NULL;