--- Log opened Mon Mar 02 00:00:04 2015 | ||
olofk | So, who wants to write a serial bootloader for OpenRISC? I like that idea more and more | 09:13 |
---|---|---|
olofk | This looks interesting http://tinypicbootload.sourceforge.net/ | 09:40 |
_franck_ | I've used "Tiny PIC Bootloader" a lot more than 15 years ago | 09:59 |
stekern | olofk: I have a simple serial bootloader for avr somewhere too | 10:33 |
stekern | writing one from scratch would be no-brainer though | 10:34 |
LoneTech | olofk: sorry, last I remember the controller was incomplete and had orpsoc bootloader drivers but not linux drivers. things may have changed. | 10:39 |
LoneTech | sdcard, that is | 10:40 |
olofk | LoneTech: Thanks. Good to know | 12:25 |
olofk | stekern: I bet you can't write one! ;) | 12:26 |
olofk | I assume it's not too hard to write one, but piggybacking on an existing one would be nice too if it has some nice utility software bundled with it | 12:28 |
olofk | But I have also become aware that I'm suffering badly from the Invented-Here syndrome, so writing one from scratch might be a better idea :) | 12:29 |
maxpaln | olofk: hi - i'm still around. Just had a little time off with our new addition :-) | 12:30 |
maxpaln | did you find out what you needed? | 12:30 |
maxpaln | just looked up the IIRC log link you sent - the problem was caused by my memory controller not supporting wrap bursts - disabling burst mode for the ethernet traffic got me up and running until I implemented a better memory controller. | 12:31 |
olofk | maxpaln: Welcome back! | 12:32 |
maxpaln | If your memoy controller is having problems you should try out the new BFM - I don't know who wrote it but it's awesome! :-P | 12:32 |
olofk | haha | 12:32 |
maxpaln | :-) | 12:32 |
olofk | But I'm not sure we're talking about the same issue. I want to prevent the phy from going up to 1gbps since the MAC can only handle 100 | 12:33 |
maxpaln | ah, THAT issue | 12:33 |
maxpaln | Actually, that was a tricky issue to solve | 12:34 |
maxpaln | I fudged it in the end by connecting through a 10/100 switch | 12:34 |
olofk | And good thing you reminded me about the BFM. I should get going with that ASAP | 12:34 |
olofk | Yeah, me too. | 12:34 |
maxpaln | but Linux seems to require the MAC to be in auto negotiate mode | 12:34 |
maxpaln | when I forced the link speed to 100 Mbps I got a bunch of errors from the kernel. | 12:34 |
olofk | I did find a tool called ethtool that can disable autoneg, but no way to do it in the driver or the device tree | 12:34 |
maxpaln | Well, my solution was going to centre around enabling autonegotiation but disbaling 1 Gbps mode | 12:35 |
maxpaln | Doing that required the datasheet for the PHY - which was really difficult to get hold of | 12:35 |
maxpaln | once I got it I had moved onto other things so I never actually determined if it was possible | 12:36 |
maxpaln | (to enable autonoegotiation whilst disbaling Gbps mode that is) | 12:36 |
maxpaln | but I can't see why not - it will probably just involve writing to a few registers, although which ones is the tricky thing. And that solution is VERY PHY specific. | 12:36 |
stekern | olofk: ha! I'll show you! | 12:49 |
stekern | ...waaait a second, I've got a feeling I got tricked somehow now... | 12:49 |
olofk | maxpaln: Let me guess, it's a Marvell phy | 13:08 |
stekern | the registers that you use to set the speed is ieee defined | 13:20 |
stekern | bit 13 (LSB) and bit 6 (MSB) in register 0 "Basic control" | 13:25 |
stekern | 0b10 = 1000Mbps, 0b01 = 100Mbps and 0b00 = 10Mbps | 13:25 |
stekern | and you disable autoneg by setting bit 12 in the same register to 0 | 13:26 |
maxpaln | I had real problems with Linux when I disabled autonegotiation though - this maybe due to my limited understanding of how to write a linux drivdr | 14:19 |
maxpaln | or it maybe something more subtle - but simply disabling autoneg produced a continual stream of errors from the kernel | 14:19 |
maxpaln | olofk: you are correct Marvell, god knows why we use their PHYs on our boards. | 14:20 |
olofk | maxpaln: Yes, it's incredible that they can manage to sell their PHY's when you need an NDA to look at any of their data sheets | 15:09 |
olofk | What the hell is or1300? https://sourceware.org/cgen/gen-doc/openrisc-insn.html#insn-l-slli | 15:39 |
LoneTech | olofk: probably an artifact of when it was thought those numbers would represent configurations | 16:02 |
LoneTech | e.g. those instructions look like the ones AlphaPC had relative to other Alphas | 16:03 |
LoneTech | my guess may be way off | 16:04 |
LoneTech | anyway, gtg | 16:04 |
mor1kx | [mor1kx] bandvig pushed 1 new commit to withfpu: https://github.com/openrisc/mor1kx/commit/889c41df66e905d8024a39806ff995b5f9e6ba34 | 17:45 |
mor1kx | mor1kx/withfpu 889c41d Andrey Bacherov: Remove obsolete and not used files | 17:45 |
mor1kx | [mor1kx] bandvig tagged fpu32_v2.0 at 8b75fa8: https://github.com/openrisc/mor1kx/commits/fpu32_v2.0 | 17:52 |
mor1kx | [mor1kx] bandvig pushed 1 new commit to withfpu: https://github.com/openrisc/mor1kx/commit/ec58c223b1fae1009095dd030b498987581733ef | 18:26 |
mor1kx | mor1kx/withfpu ec58c22 Andrey Bacherov: Remove obsolete port of OR1200's FPU | 18:26 |
bandvig | hello all! in several munutes I'm going to create pull request from 'withfpu' branch... | 18:33 |
stekern | bandvig: \o/ | 18:36 |
mor1kx | [mor1kx] bandvig opened pull request #26: Withfpu (master...withfpu) https://github.com/openrisc/mor1kx/pull/26 | 19:11 |
stekern | olofk: did you update this? | 19:12 |
stekern | bandvig: first comment, it would have been nicer to get a pull request with a 'revised set of commits'. I.e. the changes divided into logical commits instead of all the steps you took to get to the end result. | 19:17 |
stekern | I think in this case, a single commit could even be ok | 19:19 |
stekern | I like that you commented the 'parameter FEATURE_FPU = "NONE", // ENABLED|NONE' | 19:20 |
stekern | that's something I have on my todo-list for all the parameters, add a comment with all different valid values | 19:20 |
Me1234 | Is not that strange: https://drive.google.com/file/d/0B5U7b-LVTCGtR3VsVVlmOC1BYmM/view?usp=sharing ? | 19:31 |
Me1234 | iwbm_dat_i changing constantly. | 19:31 |
Me1234 | Actually it is not starnge | 19:33 |
Me1234 | I looked a wrong cyc_o | 19:33 |
Me1234 | Then why does it stop at f000019c ? | 19:34 |
Me1234 | This is orpsoc v3 from my repository. | 19:38 |
stekern | Me1234: how large is your bootrom now? | 19:41 |
Me1234 | stekern: 256. I updated the wb_intercon files. I am just trying again with the bootrom. Last time it worked https://drive.google.com/file/d/0B5U7b-LVTCGtWFJHeUd0U0ZUR1k/view?usp=sharing. | 19:44 |
Me1234 | I think I need to try to clone the repo again, I am working now on a local copy without git. | 19:45 |
Me1234 | Not try but clone. | 19:45 |
stekern | is that 256 words or bytes? | 19:47 |
Me1234 | stekern: 256 bytes. It was the same before. | 19:48 |
stekern | well, 0x19c is 412 | 19:49 |
Me1234 | Better now, will try on hardware. Synthezing. | 19:52 |
Me1234 | Now linux dies at bootup. No info in serial port | 19:59 |
Me1234 | 0xc00046c8 in die () | 19:59 |
Me1234 | Linux from https://github.com/openrisc/linux | 20:00 |
Me1234 | It wac updated to 3.19 yesterday | 20:00 |
Me1234 | Loaded with gdb, it works | 20:03 |
ysionneau | _florent_ from enjoy-digital added support for "verilator" simulation to MiSoC : https://news.ycombinator.com/item?id=9133811 | 20:03 |
ysionneau | you can now run MiSoC + mor1kx on your computer :) | 20:03 |
ysionneau | with no fpga | 20:03 |
bandvig | stekern: I'ill comment modifications in mor1kx_lsu_cappuccino.v tomorrow. It is very long story. | 20:05 |
stekern | bandvig: no hurry, but I think I did that for a reason. And I know that some stupid slaves doesn't like it. | 20:07 |
bandvig | stekern: Shortly speaking I faced with vice verse situation. I create very simple soc which consists of CPU-SRAM-BOOTROM-UART and faced that... | 20:10 |
bandvig | "hellow world" compiled with newlib isnt able initialze UART because of zerrowing these bits | 20:11 |
bandvig | Let me clarify, I tried to ran simulation with preloaded "hello world" in my model of SRAM | 20:12 |
bandvig | But "hello world" operates successfully on Atlys board. I think the reason is that I use U-boot to load programs into board. So, It looks like U-boot perform correct initialization of UART as it use his own initialization sequence than NewLIB | 20:16 |
olofk | stekern: Did I update what? | 20:18 |
bandvig | Perhaps, there is a bug in initialization sequence in libgloss | 20:19 |
olofk | bandvig: Which newlib are you using? There were a few bugs in the UART code after the rewrite. They were fixed quite recently | 20:21 |
olofk | There was at least one bug | 20:22 |
olofk | That bug corrupted output if you wrote more than 13 characters, so the "Hello world!\n" test didn't catch it | 20:23 |
olofk | ysionneau: Great! verilator is very handy for larger systems | 20:24 |
olofk | ok, so the intel hex format seems to be good for a serial bootloader | 20:28 |
bandvig | olofk: I use or1k-gcc at commit 1ee8ef4 on Nov-27-2014, and or1k-src at commit a8d7a52 on Nov-27-2014 | 20:32 |
olofk | bandvig: Ah ok. That means you are using newlib before the rewrite, so you won't be affected by that particular bug I guess | 20:34 |
bandvig | well, good luck to all, see soon :) | 20:35 |
olofk | Parsing a hexfile in the bootloader shouldn't be too hard, and then I can just pipe the file through the UART | 20:39 |
olofk | This would be really handy for those targets where I can't easily connect a debugger to load with OpenOCD | 20:41 |
stekern | why do you need to parse the hex file in the bootloader? | 20:48 |
stekern | I was thinking about using something like zmodem | 20:49 |
stekern | if you still want to look at my ultrasimple serial loader for avr: http://pastie.org/9994367 | 20:54 |
stekern | and this was the host program: http://pastie.org/9994372 | 20:55 |
stekern | olofk: sorry, forgot the link, did you update this? https://github.com/openrisc/mor1kx/pull/24 | 21:21 |
olofk | Ah yes. I thought about zmodem for a short while but forgot it | 21:38 |
olofk | Does it do checksums though? | 21:38 |
olofk | stekern: I think I updated it, because the comments are lost and one of the comments was that I had set a parameter to 1 instead of 0. They are all zero in that patch | 21:40 |
stekern | yes it do checsums | 21:41 |
stekern | and that's what I remember about the pr too | 21:41 |
olofk | Well, then zmodem it is. Hex files have a huge overhead | 21:41 |
stekern | I've written a zmodem implementation in java... | 21:42 |
olofk | Please don't tell me such things. I won't be able to sleep now | 21:43 |
stekern | sorry, that was xmodem | 21:44 |
olofk | That bootloader isn't for OpenRISC, right? | 21:48 |
stekern | what bootloader? | 21:50 |
olofk | http://pastie.org/9994367 | 21:50 |
stekern | no, for avr | 21:51 |
Me1234 | olofk: Why did you decide not to cache cores locally now? I mead they are downloaded every time | 21:51 |
stekern | as I mentioned earlier today | 21:51 |
olofk | Me1234: I'm a bit too tired for a proper explanation, but you can disable it by removing the line "cachable = false" from those cores | 21:58 |
blueCmd | so lowRISC got into GSoC | 22:55 |
Hesham | Yeah | 22:55 |
Hesham | Stefan is a mentor for some projects out there. | 22:56 |
blueCmd | cool! | 22:56 |
Hesham | I was wondering why don't GSoC involve some HDL projects like OpenRISC (it's still coding), I hope lowRISC would be the start for such a thing. | 22:58 |
dalias | :) | 22:59 |
dalias | looking forward to mentoring a student porting musl to risc-v | 22:59 |
dalias | hope somebody applies | 22:59 |
Hesham | Do they provide the actual lowRISC implementation? | 22:59 |
Hesham | I think it's still a work on progress, otherwise students will have to work with simulators or Zynq boards | 23:00 |
dalias | i don't know the details | 23:00 |
dalias | they just contacted me about possibly mentoring such a project and it sounds fun | 23:01 |
dalias | and i think stekern can vouch for my ability to mentor a port project :) | 23:01 |
Hesham | I tried to peek into their code before and asked them about it, but seems like it's not published/ready yet. | 23:02 |
stekern | dalias: I very much can :) | 23:03 |
--- Log closed Tue Mar 03 00:00:05 2015 |
Generated by irclog2html.py 2.15.2 by Marius Gedminas - find it at mg.pov.lt!