changelog shortlog tags branches changeset file revisions annotate raw help

Mercurial > hg > plan9front / sys/src/9/bcm/main.c

revision 7155: 85c4b38d9a82
parent 6855: 01468da33a6e
child 7159: 66132ebbe687
     1.1--- a/sys/src/9/bcm/main.c
     1.2+++ b/sys/src/9/bcm/main.c
     1.3@@ -367,7 +367,7 @@ bootargs(uintptr base)
     1.4 	 * of the argument list checked in syscall.
     1.5 	 */
     1.6 	i = oargblen+1;
     1.7-	p = UINT2PTR(STACKALIGN(base + BY2PG - sizeof(Tos) - i));
     1.8+	p = (void*)STACKALIGN(base + BY2PG - sizeof(Tos) - i);
     1.9 	memmove(p, oargb, i);
    1.10 
    1.11 	/*
    1.12@@ -379,7 +379,7 @@ bootargs(uintptr base)
    1.13 	 * not the usual (int argc, char* argv[])
    1.14 	 */
    1.15 	av = (char**)(p - (oargc+1)*sizeof(char*));
    1.16-	ssize = base + BY2PG - PTR2UINT(av);
    1.17+	ssize = base + BY2PG - (uintptr)av;
    1.18 	for(i = 0; i < oargc; i++)
    1.19 		*av++ = (oargv[i] - oargb) + (p - base) + (USTKTOP - BY2PG);
    1.20 	*av = nil;
    1.21@@ -415,8 +415,8 @@ userinit(void)
    1.22 	/*
    1.23 	 * Kernel Stack
    1.24 	 */
    1.25-	p->sched.pc = PTR2UINT(init0);
    1.26-	p->sched.sp = PTR2UINT(p->kstack+KSTACK-sizeof(up->s.args)-sizeof(uintptr));
    1.27+	p->sched.pc = (uintptr)init0;
    1.28+	p->sched.sp = (uintptr)p->kstack+KSTACK-sizeof(up->s.args)-sizeof(uintptr);
    1.29 	p->sched.sp = STACKALIGN(p->sched.sp);
    1.30 
    1.31 	/*
    1.32@@ -445,7 +445,7 @@ userinit(void)
    1.33 	pg->txtflush = ~0;
    1.34 	segpage(s, pg);
    1.35 	k = kmap(s->map[0]->pages[0]);
    1.36-	memmove(UINT2PTR(VA(k)), initcode, sizeof initcode);
    1.37+	memmove((void*)VA(k), initcode, sizeof initcode);
    1.38 	kunmap(k);
    1.39 
    1.40 	ready(p);
    1.41@@ -485,7 +485,7 @@ confinit(void)
    1.42 		conf.mem[0].limit = conf.mem[0].base + memsize;
    1.43 
    1.44 	conf.npage = 0;
    1.45-	pa = PADDR(PGROUND(PTR2UINT(end)));
    1.46+	pa = PADDR(PGROUND((uintptr)end));
    1.47 
    1.48 	/*
    1.49 	 *  we assume that the kernel is at the beginning of one of the