**** BEGIN LOGGING AT Mon Dec 01 02:59:58 2008 Dec 01 22:44:11 hello... I pulled from openocd svn last night... and whoah... some nice new xscale commands... Dec 01 22:47:40 but I am facing a problem when I try and boot a kernel... which is in itself a bootloader. If I do a reset halt, then a resume... it still winds up dying with the pc=0xffff0018... Dec 01 22:49:39 I have posted a help! on the openocd forum at sparkfun... titled XScale: setting hw breakpoint in Linux kernel possible? Dec 01 22:50:31 johnrw: how/why are you trying to u se a linux kernel as a bootloader? Dec 01 22:51:05 It's a very long story Dec 01 22:51:52 because i can see using the linux kernel as a second stage loader, but not as a primary Dec 01 22:52:11 Bought router... It can't handle a hard drive that goes to sleep... because of a crappy linux implementation... by a company named Jungo Dec 01 22:52:41 Whe the hard disk goes into sleep mode... that linux kernel thinks the superblock has been corrupted... Dec 01 22:53:04 \and refuses access to the drive... Dec 01 22:53:21 so it lasts for about 15 minutes... Dec 01 22:53:24 lol Dec 01 22:53:26 johnrw: you need to place a hw breakpoint at the point where the exception vectors get re-written Dec 01 22:53:31 That was day 1 Dec 01 22:53:33 so why no replace the kernel with one that works? Dec 01 22:53:35 johnrw: to give the openocd a chance to re-read the new vectors Dec 01 22:54:09 johnrw: otherwise your xscale is going to use stale data from the mini i-cache Dec 01 22:54:34 johnrw: breaking and resuming at some point after the new vectors have been written, but before the first exception occurs, solves this problem Dec 01 22:57:06 prpplague: I am in progress already... http://wiki.openwrt.org/OpenWrtDocs/Hardware/USRobotics/USR8200 Dec 01 22:58:36 johnrw: ah, and there could be a problem with some of the cache flush functions - at some point (2.5.xxx) the linux kernel used a cache flushing instruction that invalidated the mini-icache that is required for debugging Dec 01 22:59:40 That project has 3 routers available... 2 that have a working pci, noz's in the uk, and mine that has a really broken pci... So I just bought 2 more today... and hopefully on them... the redboot can setup pci correctly as noz's does... Dec 01 23:00:15 drath... thank you... oooooh so much for openocd! Dec 01 23:01:09 drath: now that is an interesting note... so how would I go about finding that instruction? Dec 01 23:01:52 johnrw: first make sure you're breaking at the right point for the mini icache to be updated Dec 01 23:02:24 johnrw: if you're doing that, and it still doesn't work, let me know, and I'll see if I can dig out some old notes Dec 01 23:06:37 drath: so I would start out by setting a hw wp on 0xffff0000 length? r/w/a? value? mask? Dec 01 23:06:38 I would say a length of 0x200 and on any write access... but value and mask I am not too sure about? Dec 01 23:08:34 am i close? :) value and mask look like they are optional... Dec 01 23:09:23 johnrw: it's not that complicated - there used to be a "BDI2000 option" in the linux kernel specifically for this Dec 01 23:09:33 johnrw: it was just a software breakpoint within some function Dec 01 23:09:44 johnrw: breaking in that function would be enough Dec 01 23:14:02 how to find that function in this kernel... which can hardly be built from the sources Jungo provides... would be above my paygrade Dec 01 23:14:20 but I did alot of single stepping Dec 01 23:14:55 Can I ask why single step doesn't take a numeric parameter? :) Dec 01 23:15:11 johnrw: because noone implemented a step ;) Dec 01 23:15:23 johnrw: try the watchpoint then Dec 01 23:15:34 johnrw: write watchpoint at address 0xffff001c, 4 bytes long Dec 01 23:15:44 johnrw: the vector table is 32 bytes long Dec 01 23:18:09 ok.. I will try that... Let me just say... I really, really, really tried to answer this myself... Dec 01 23:19:07 but my mentor... well he didn't even want to touch it... Dec 01 23:19:29 thank you drath! Dec 01 23:37:42 drath... itworked! Dec 01 23:39:16 I can even stop this board now! Dec 01 23:51:11 johnrw: heh, ok, glad it worked Dec 01 23:51:50 hmm now asking it to display memory... is giving me a runtime error in commands.c Dec 01 23:52:38 which is okay... I am a happy guy! Dec 01 23:53:54 Is this working because I am using a recent version... or would it also have worked in v728...? Dec 01 23:54:19 this should have worked since june or july 2007 Dec 01 23:54:53 anyway, i'm out, bye and gn8 Dec 01 23:55:04 ok. g'night Dec 02 02:26:04 Epilogue...Well turning off the mmu... gave me access to the memory... i guess you guy knew that :) **** ENDING LOGGING AT Tue Dec 02 02:59:57 2008