Subject: evbarm, new board, start_init function USRSTACK problem
To: None <port-arm@NetBSD.org>
From: Janusz Dziedzic <janusz.dziedzic@gmail.com>
List: port-arm
Date: 11/02/2007 16:24:12
------=_Part_15718_30416432.1194017052203
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hello,
Two weeks ago I've started with my board and NetBSD.
Now I have problem with start_init function. I don't know that is a UVM
problem or I don't understand everything correctly.
/*
* Need just enough stack to hold the faked-up "execve()" arguments.
*/
addr = (vaddr_t)STACK_ALLOC(USRSTACK, PAGE_SIZE); // is 0xBFFFF000
/* should this add maping ( 0xBFFFF000 <---> Physical_Memory) to
pagetable? */
if (uvm_map(&p->p_vmspace->vm_map, &addr, PAGE_SIZE,
NULL, UVM_UNKNOWN_OFFSET, 0,
UVM_MAPFLAG(UVM_PROT_ALL, UVM_PROT_ALL, UVM_INH_COPY,
UVM_ADV_NORMAL,
UVM_FLAG_FIXED|UVM_FLAG_OVERLAY|UVM_FLAG_COPYONW)) != 0)
panic("init: couldn't allocate argument space");
p->p_vmspace->vm_maxsaddr = (void *)STACK_MAX(addr, PAGE_SIZE);
ipx = 0;
....
/* here I have data abort, because 0xBFFFFFFD is not mapped in MMU page
table */
(void)copyout((void *)flags, arg1, i);
So should I map this address in machdep file or where can I find problem?
Additional information:
http://valhalla.bofh.pl/~l4mer/userstack.PNG // from Lauterbach -
useful
http://valhalla.bofh.pl/~l4mer/beast.txt // console output
http://valhalla.bofh.pl/~l4mer/beast_machdep.c // machdep fiele
http://valhalla.bofh.pl/~l4mer/beast_start.S // startup file
KERNEL_BASE_PHYS=0x00200000
KERNEL_BASE_VIRT=0xc0200000
BR
--
Janusz
------=_Part_15718_30416432.1194017052203
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hello,<br><br>Two weeks ago I've started with my board and NetBSD.<br><br>Now I have problem with start_init function. I don't know that is a UVM problem or I don't understand everything correctly.<br><br><br><br>
/*<br> * Need just enough stack to hold the faked-up "execve()" arguments.<br> */<br> addr = (vaddr_t)STACK_ALLOC(USRSTACK, PAGE_SIZE); // is 0xBFFFF000<br> <br> /* <span style="font-weight: bold;">
should this add maping ( 0xBFFFF000 <---> Physical_Memory) to pagetable?</span> */<br> if (uvm_map(&p->p_vmspace->vm_map, &addr, PAGE_SIZE,<br> NULL, UVM_UNKNOWN_OFFSET, 0,<br> UVM_MAPFLAG(UVM_PROT_ALL, UVM_PROT_ALL, UVM_INH_COPY,
<br> UVM_ADV_NORMAL,<br> UVM_FLAG_FIXED|UVM_FLAG_OVERLAY|UVM_FLAG_COPYONW)) != 0)<br> panic("init: couldn't allocate argument space");<br> p->p_vmspace->vm_maxsaddr = (void *)STACK_MAX(addr, PAGE_SIZE);
<br><br> ipx = 0;<br><br> ....<br> /* <span style="font-weight: bold;">here I have data abort, because 0xBFFFFFFD is not mapped in MMU page table</span> */<br> (void)copyout((void *)flags, arg1, i);<br><br> So should I map this address in machdep file or where can I find problem?
<br><br><br clear="all">Additional information:<br><a href="http://valhalla.bofh.pl/~l4mer/userstack.PNG">http://valhalla.bofh.pl/~l4mer/userstack.PNG</a> // from Lauterbach - useful<br><a href="http://valhalla.bofh.pl/~l4mer/beast.txt">
http://valhalla.bofh.pl/~l4mer/beast.txt</a> // console output<br><a href="http://valhalla.bofh.pl/~l4mer/beast_machdep.c">http://valhalla.bofh.pl/~l4mer/beast_machdep.c</a> // machdep fiele<br><a href="http://valhalla.bofh.pl/~l4mer/beast_start.S">
http://valhalla.bofh.pl/~l4mer/beast_start.S</a> // startup file<br><br><br>KERNEL_BASE_PHYS=0x00200000<br>KERNEL_BASE_VIRT=0xc0200000<br><br><br>BR<br>-- <br>Janusz<br>
------=_Part_15718_30416432.1194017052203--