**** BEGIN LOGGING AT Mon Aug 01 23:59:56 2005 Aug 02 02:57:09 guys, let's continue landslide's 128MB apex discussion here ... Aug 02 02:57:36 [19:07] landslide: u know how i have a 128mb slug (4 x 256mbit). Aug 02 02:57:36 [19:08] landslide: i set the bank size to 0x04000000 and enabled the second bank Aug 02 02:57:36 [19:08] landslide: then compiled Aug 02 02:57:36 [19:08] landslide: when i do version i get this Aug 02 02:57:37 [19:08] landslide: memory: Aug 02 02:57:37 [19:08] landslide: 0x0 0x02000000 (32 MiB) Aug 02 02:57:38 [19:08] landslide: 0x4000000 0x02000000 (32 MiB) Aug 02 02:57:40 [19:08] landslide: nor: 8MiB total 32B write buffer Aug 02 02:57:42 [19:08] landslide: region 0: 64 blocks of 131072 (0x20000) bytes Aug 02 02:57:44 [19:08] landslide: cpu: id 0x690541f1 ctrl 0xafa cpsr 0x200000d3 Aug 02 02:57:46 [19:09] landslide: it still thinks they are 32MiB yet the second bank starts at 64MiB. Aug 02 02:57:48 [19:09] landslide: i'm going to trace through the code and work out what's going on. Aug 02 02:57:52 (for beewoolie to see in the logs) Aug 02 03:02:38 #openjtag. the place where all the funky hardware developments happen. Aug 02 03:03:00 heh, thx Aug 02 03:08:55 ok here.. Aug 02 03:09:30 i'm just debugging the drv-mem.c memory_scan() function. Aug 02 03:09:50 where it does a mark and identify and counts the blocks. Aug 02 03:09:57 i'm trying to work out what it does. Aug 02 03:10:05 keep in mind I might have faulty ram chips... Aug 02 03:10:31 they were removed from another board so got 2 doses of heat from the rework station Aug 02 03:28:57 i think i need to load it into flash Aug 02 03:29:35 some of that drv-mem.c code uses the APEX_VMA_START/END which i don't understand why. Aug 02 04:12:54 how many regions is memoryscan() supposed to find? I think there is a bug in the identify portion, it seems that once it gets past 0x2000000 it keeps finding the region end.. should there be only 1 region found? Aug 02 04:13:20 or is this relying on some quirk or trick to find out how many ram chips there are? Aug 02 04:14:04 see i printed out the pointer and data and the data and pointer are the same until the second block of 16 mb. Aug 02 04:15:27 the data is then 0x02000000 less than the pointer. Aug 02 04:16:33 pointer = pl ... data = *pl Aug 02 05:38:26 i' Aug 02 05:38:32 i've had some success.. Aug 02 05:38:41 :) Aug 02 05:40:08 i found out that if i did printf("SDR_CONFIG %lX", (unsigned long)SDR_CONFIG); from drv_mem.c in function memory_init() Aug 02 05:40:19 it returned 0x18, which is wrong.. Aug 02 05:40:45 i had forced it to SDR_CONFIG = SDR_CONFIG_CAS3 | 0x03; in initialize.c Aug 02 05:40:53 for some reason it gets reset. Aug 02 05:41:18 anyway i forced it again in memory_init() and all the memory is now available. Aug 02 05:41:26 the memory_scan() function worked fine. Aug 02 05:41:34 for both banks. Aug 02 05:42:16 so anyway after reading SDR_CONFIG once i forced it in memory_init() it was 0x1B which is correct for my configuration (4x16Mx16) Aug 02 05:44:48 now i get this: -> Aug 02 05:44:56 apex => mem:0x00200000+0xe488 (58504 bytes) Aug 02 05:44:56 env => nor:128k+64k Aug 02 05:44:56 Services: Aug 02 05:44:57 memory: Aug 02 05:44:57 0x00000000 0x08000000 (128 MiB) Aug 02 05:44:58 nor: 8MiB total 32B write buffer Aug 02 05:44:59 region 0: 64 blocks of 131072 (0x20000) bytes Aug 02 05:45:01 cpu: id 0x690541f1 ctrl 0xafa cpsr 0x200000d3 Aug 02 05:49:10 the ram is working fine, i've done numerous fills and dump checks in each bank. Aug 02 06:19:54 so does it work? Aug 02 06:32:40 very close. Aug 02 06:32:46 i can't get the kernel to boot. Aug 02 06:32:55 mind you, i'm running apex from ram. Aug 02 06:33:57 even when i revert to the same configuration as the wiki the kernel will uncompress then say 'crc checksum error' Aug 02 11:03:04 prpplague: Hey. I just missed your ping yesterday. Aug 02 11:03:06 dyoung: hey man Aug 02 11:03:47 beewoolie-afk: hey, just saying hello Aug 02 11:03:51 beewoolie-afk: nothing major Aug 02 11:04:11 prpplague: FYI. The ethernet driver and IP stack for APEX are released. Aug 02 11:04:15 It's kinda handy. Aug 02 11:04:30 what ethernet controller are you guys using? Aug 02 11:05:53 cs8900 8-bit polled, i.e. the packet-wacker Aug 02 11:06:36 Hmm. I thought as much. Aug 02 11:06:49 I've got one on one of the KEV boards, so maybe I'll write the driver for that one, too. Aug 02 11:07:01 It isn't much work since APEX is so simple. Aug 02 11:07:10 beewoolie-afk: simple for you, hehe Aug 02 11:07:14 beewoolie-afk: you wrote it Aug 02 11:07:51 Perhaps. The interface for the ethernet drivers is pretty much three calls. init, read, write. Aug 02 11:08:13 beewoolie-afk: lovely Aug 02 11:08:21 beewoolie-afk: i'll have another look Aug 02 11:08:32 v1.3.0 Aug 02 11:09:25 dyoung: Are you listening? If we have the IAL linked into APEX we could use the TFTP code on the slug. Hint hint. Aug 02 11:20:02 beewoolie-afk: why not use the tftp code from rmk? Aug 02 13:20:24 prpplague: what code from RMK? The tftp code isn't really the hard part. In fact, the code isn't very interesting no matter how it is done. The tricky part is integrating the protocol into the loader. Aug 02 13:21:20 beewoolie-afk: rmk release a bootloader tftp code awhile back Aug 02 13:21:30 beewoolie-afk: let me look to see if i have a copy handy Aug 02 13:21:41 KO. It's kinda too late since it's already written. Aug 02 13:21:57 What we need is the IAL so that we can driver the MAC from APEX. Aug 02 13:22:31 prpplague: I'd be interested, tho, because I haven't added bootp or dhcp. Aug 02 13:24:43 beewoolie-afk: i can't seem to access our cvs server at the momment Aug 02 13:24:50 beewoolie-afk: i'll pull it down shortly Aug 02 13:24:55 thx Aug 02 13:28:45 beewoolie-afk: did you see landslide-zzzz's comments here earlier? Aug 02 13:29:10 rwhitby-asleep: Didn't. Scrolling... Aug 02 13:29:23 Looks like it was before I was on. Was it on this channel? Aug 02 13:29:30 yep Aug 02 13:29:45 Wanna give me the reader's digest version? Aug 02 13:29:55 he's got a 128MB slug and was getting apex to run on it Aug 02 13:30:04 Successfully? Aug 02 13:31:48 http://pastebin.ca/19125 Aug 02 13:31:55 thx Aug 02 13:34:40 Ah. One of the things that he didn't understand is that the SDRAM is *not* configured when APEX runs from ram. It should be obvious, but most people haven't thought it through. Aug 02 13:35:34 There is no way to know what should happen if we reconfigure the SDRAM controller when the running code out of RAM. Aug 02 13:35:56 In other words, the SDRAM mode isn't being reset in APEX. It's never being set. Aug 02 13:36:51 You can also tell him that if he's having problems with the kernel decompressing, it is a good idea to checksum the uploaded file before asking the kernel to decompress. Aug 02 13:37:41 http://pastebin.ca/19126 <- some stuff at the start of this before the previous one, and a bit in the middle and end Aug 02 13:37:46 I suspect the problem is that the SDRAM isn't properly configured Aug 02 13:38:32 beewoolie-afk: hey, you know a good tool to convert arm asm into some psuedo code for readability? Aug 02 13:38:43 beewoolie-afk: he's in AU timezone, like me (but I'm up early) Aug 02 13:38:46 ndisasm. Look at my wiki. Aug 02 13:39:09 prpplague: I linked the disasm there some time ago. wiki.buici.com Aug 02 13:39:52 rwhitby-asleep: Fair enough. I'm reviewing the SDRAM init code just to see if there is something I can see. Perhaps I should add a message at signon about the SDRAM *not* being initialized. Aug 02 13:40:16 beewoolie-afk: the OE compiler vs crosstool is intriging too (from the second pastebin) Aug 02 13:40:31 I haven't gotten all the way through yet. Aug 02 13:41:03 beewoolie-afk: cool thanks Aug 02 13:42:40 beewoolie-afk: I put apex into OpenEmbedded as a .bb file, but didn't test it. When we buld using OE, it seems to produce a binary which gives GDB codes on the serial console. Nobody knows why. Aug 02 13:42:42 rwhitby-asleep: The compiler stuff is odd. As I've never seen any such failures, it's hard to imagine why. I suspect that either a) they aren't using a big-endian compiler or b) there is something wrong with their config. Aug 02 13:42:59 rwhitby-asleep: That isn't what you think it is. Aug 02 13:43:07 The gdb codes come from redboot. Aug 02 13:43:23 ah Aug 02 13:43:27 beewoolie-afk: hmm, that doesn't appear to provide anything more than just objdump Aug 02 13:43:30 Apex has no GDB code at all. It means that you are runnning APEX from RAM and it's crashing. Aug 02 13:43:40 prpplague: What are you looking for? Aug 02 13:43:44 C code? Aug 02 13:44:09 beewoolie-afk: not nessarly c, but something psuedo like that easier to read Aug 02 13:44:32 rwhitby-asleep: If you send me one of these errant versions of APEX, I'll see if I can see what is the matter. Aug 02 13:44:42 i guess i'm slow with asm, takes me forever to step through the asm and write down what its doing Aug 02 13:44:49 rwhitby-asleep: It's important to set the MMU disable option in APEX so that it gets access to the whole address space. Aug 02 13:44:57 prpplague: Not sure what else there is. Aug 02 13:45:24 beewoolie-afk: I'll get dyoung to send you a failing binary Aug 02 13:45:29 K. Aug 02 13:45:56 I haven't run Apex myself yet (lack of time), so I'm only relaying messages at the moment :-) Aug 02 13:46:39 but I'm keen to get it into our standard builds, as we need it for DebianSlug Aug 02 13:47:19 rwhitby-asleep: I'll take a look as soon as I get a binary. The elf file is the most useful. Aug 02 13:48:16 rwhitby-asleep: BTW, there may be an error in the code. Aug 02 13:48:59 It looks like I'm assuming that the CPU clock is 133MHz. At least, that's the fundamental frequency for the SDRAM refresh clock. I need to make sure that a deunderclocked slug has the right refresh clock. Aug 02 13:49:45 beewoolie-afk: I might be able to build a binary for you now to look at Aug 02 13:49:51 k. Aug 02 13:50:12 can you /msg me an email address to send it to? Aug 02 13:54:44 beewoolie-afk: just the apex.bin file? Aug 02 13:54:51 The apex file is better. Aug 02 13:55:20 I added some code to the ixp init that will exclaim that SDRAM has not been initialized if it runs from SDRAM. Aug 02 13:57:50 beewoolie-afk: sent - I haven't tried this one, so I dunno if it works or not. Aug 02 13:58:19 I assume you're building it with the OE compiler. Aug 02 13:58:24 yep Aug 02 13:58:36 that's the automatically built one (bb apex) Aug 02 13:58:42 (bitbake apex that is) Aug 02 14:05:50 rwhitby-asleep: would you mind sending the .config file? Aug 02 14:08:09 sent Aug 02 14:08:51 rwhitby: It looks like the optimization level is different. Aug 02 14:08:55 What compiler are you using/ Aug 02 14:08:58 ? Aug 02 14:09:57 gcc 3.4.4 Aug 02 14:10:06 You've also set a ramdisk. Is this for unslung? We don't need a ramdisk for openslug. Aug 02 14:10:36 this is just for general nslu2 - we haven't sorted out the right config yet Aug 02 14:10:49 Shouldn't matter. Aug 02 14:10:49 just trying to get to the apex console at this stage Aug 02 14:11:26 Let me see about the compiler version. It's possible that there is some sort of new bug in the compiler. Aug 02 14:11:32 I'm using 3.4.2 Aug 02 14:12:29 I'll have to build a new compiler to test this. Aug 02 14:12:40 You know what that means. Aug 02 14:12:57 I can tar up the cross directory and send it to you if you like Aug 02 14:13:30 I'd rather build one just so I can track the pedigree. Aug 02 14:13:34 ok Aug 02 14:13:53 Besides, I'm going to test with the LH processors first and those are LE. Aug 02 14:14:10 ok Aug 02 14:14:14 Thanks for the help. Aug 02 14:14:28 I'll also send you the run.do_compile script which OE uses to compile it Aug 02 14:16:20 sent. Thank *you* :-) Aug 02 14:20:18 Alright. Aug 02 14:21:21 anything else that can help? Aug 02 14:26:48 I'll let you know. It'll be later today when I can look at this again. Aug 02 14:27:00 Trying to get an audio codec working ATM. Aug 02 14:27:44 just heading into work.. i scrolled back, and understand the problem now.. :) Aug 02 14:27:54 i'll have a look at it when i return home tonight. Aug 02 14:27:55 landslide-zzzz: hey man Aug 02 14:28:03 thanks beewoolie... :) Aug 02 14:28:09 cheers Aug 02 14:28:26 rwhitby: BTW, does the BB reference the openslug_config? Aug 02 14:28:42 It should do something like this: make openslug_config Aug 02 14:28:48 when it is doing the setup. Aug 02 14:32:38 landslide-zzzz: Do you get the chip config now? the 4x16Mx16 is 4 banks, 16M per bank, 16 bit access per chip Aug 02 14:33:22 beewoolie-afk: what does a "bx r0" do when r0=0x590000 ? Aug 02 14:34:26 I thought that the BX instruction was for switching to thumb mode. Aug 02 14:34:43 thats what i read as well Aug 02 14:35:04 Says, tho, that when the low bit is 0, it is *not* a thumb branch. Aug 02 14:35:20 That's a simple jump, but I couldn't tell you why it is being used. Aug 02 14:35:58 ok so if its not in thumb its going to do a simple jump to 0x590000 ? Aug 02 14:36:10 That's what I'd guess. Aug 02 14:36:13 It's an odd address. Aug 02 14:36:19 Odd as in wierd. Aug 02 14:36:40 beewoolie-afk: hehe yea they did alot of weird stuff on the juicebox Aug 02 14:36:57 Hm.. Back to the juicer. Aug 02 14:37:06 Juiceroni Aug 02 14:37:11 the jucierator Aug 02 14:37:17 yea, trying to take short break Aug 02 14:37:34 beewoolie-afk: i've got so much work to do, and i'm about a week behind schedule Aug 02 14:37:45 beewoolie-afk: and to add to it, i'm totally unmotivated today Aug 02 14:37:58 NAP TIME! Aug 02 14:40:13 beewollie: does that mean i can't access it? Aug 02 14:40:30 i configured the SDR_CONFIG register (memory selection) to 0x03. Aug 02 14:40:37 along with the CAS3 bit. Aug 02 14:45:01 l8r Aug 02 15:57:24 beewoolie: what were you saying about the memory configuration? Aug 02 15:57:42 is my 4x16M16 not going to work because of the 'word size'? Aug 02 17:41:40 landslide: Hey. I've been all over the place today. You still listening? Aug 02 18:06:19 haha yeah Aug 02 18:06:27 i'm around.. at work at the moment but can chat. Aug 02 18:18:41 Sorry. I only get a ping when my name is in the text. Aug 02 18:18:51 Do you understand the memory config stuff yet? Aug 02 18:19:15 It can be confusing when running from SDRAM and you expect that SDRAM is going to be reconfigured. Aug 02 18:19:23 landslide: beep Aug 02 18:37:52 landslide: ttfn Aug 02 18:48:57 sorry ;) Aug 02 18:49:21 beewoolie: what i'll do tonight it load apex into flash... Aug 02 18:49:35 do I use xmodem for the 'xreceive' command? or xmodem-1k Aug 02 18:50:04 beewoolie: another thing is I remember reading you said network support is working now? is that true for the nslu2? Aug 02 18:50:12 so i can tftp? **** ENDING LOGGING AT Tue Aug 02 23:59:56 2005