[okl4-developer] More NSLU2 debugging

Joshua Root jmr at cse.unsw.edu.au
Sun Jun 22 19:42:35 EST 2008


Geoffrey Lee wrote:
> On Sun, Jun 22, 2008 at 11:14:49AM +1000, Joshua Root wrote:
>> Hi all,
>>
> 
> Josh - 
> 
>> After getting skyeye working with Geoff's help, I've added an IXP420 
>> machine to it (created by copying pxa250 and setting up a different 
>> memory map). My OKL4/Iguana boot image now works fine in the simulator.
>>
>> On the hardware, before virtual memory is turned on I can get output by 
>> writing to the UART's physical address. But it seems to be dying 
>> somewhere between there and Platform::init, which of course adds the 
>> mapping so the UART can be used again.
> 
> It may worthwhile to bring forward the serial initialization by 
> manually adding a mapping to the serial device.  Places that
> you might want to inspect should be in init_memory().  I'd probably
> do a before-and-after print of some character to see how far you
> got within the function.  Places of interest might be when it tries
> to manipulate page tables and when it switches to virtual addressing.

So you'd expect something like:

add_mapping_init( kspace_phys, (addr_t)(XSCALE_DEV_PHYS+CONSOLE_OFFSET), 
(addr_t)(XSCALE_DEV_PHYS+CONSOLE_OFFSET), uncached );

to work if I do it at the same time as the other 1:1 mappings? And after 
VM is turned on here (init.cc:353):

/* Enable virtual memory, caching etc */
     write_cp15_register(C15_control, C15_CRm_default,
                     C15_OP2_default, C15_CONTROL_KERNEL);

I should be able to write to the UART, yes? (And indeed I can in the 
simulator...) I've been doing pretty much what you suggest to pinpoint 
where it's failing, but I can't get any output after that 
write_cp15_register call. Could kspace_phys be constructed incorrectly?

- Josh



More information about the Developer mailing list