Re: RISCV - port to Mango Pi MQ-Pro (D1)
On Sat, Sep 23, 2023 at 09:15:30AM +0200, Peter J. Philipp wrote: > On Mon, Sep 18, 2023 at 02:37:50PM +0200, Peter J. Philipp wrote: > > Hi, > > > > I've been working a little bit on making OpenBSD run on Mango Pi, I haven't > > succeeded yet, but I think we're close. My patches are here: > > > > https://github.com/pbug44/openbsd-src/tree/MANGOPI > > Just a status report, I got it to boot to the exec'ing init. I had to > disable plic0 and com0, and am running on the boot loaders console. That is > probably why I see no installer message (no /dev/console). Well I'm out of time, given another month I might have made it work. Here is my final commit: https://github.com/pbug44/openbsd-src/commit/e25ff39b81043bbfb71c588fec7eb6c3c0025d91 Another failure, but I learned a lot so it was a success in my eyes. I'm going back to programming on my delphinusdnsd for the rest of this year. That's my priority. I'm passing the torch to Miguel, Moritz and Mark who I've been having steady contact with throughout this. They have this hardware and are able to make it work given time. If nothing happens by december, I may be able to pick up on this (if I want). Best Regards, -peter -- Over thirty years experience on Unix-like Operating Systems starting with QNX.
Re: RISCV - port to Mango Pi MQ-Pro (D1)
On Mon, Sep 18, 2023 at 02:37:50PM +0200, Peter J. Philipp wrote: > Hi, > > I've been working a little bit on making OpenBSD run on Mango Pi, I haven't > succeeded yet, but I think we're close. My patches are here: > > https://github.com/pbug44/openbsd-src/tree/MANGOPI Just a status report, I got it to boot to the exec'ing init. I had to disable plic0 and com0, and am running on the boot loaders console. That is probably why I see no installer message (no /dev/console). So that is the work that still needs to be done, getting the console working right. It's the same as the Allwinner H6 (APB driven), though when I enable cn_tab (which I hashed out) in /sys/dev/fdt/com_fdt.c then all I see is one or two bytes in the serial cu, and it reminds me of a speedrate problem. I haven't figured that out yet. The other thing is the plic. I did workarounds to get around its freezing, but those are likely wrong. Because when an IRQ gets enabled it freezes the boot process. I'll hopefully get this all fixed up by next weekend at which time I'm going back to dns programming (shift of priorities). Here is the dmesg to the point of WARNING: CHECK AND RESET THE DATE! ---> U-Boot 2022.10 (Jul 20 2023 - 09:48:42 +) Allwinner Technology DRAM: 1 GiB sunxi_set_gate: (CLK#24) unhandled Core: 54 devices, 20 uclasses, devicetree: separate WDT: Not starting watchdog@6011000 MMC: mmc@402: 0, mmc@4021000: 1 Loading Environment from FAT... PLL reg = 0xf8216300, freq = 12 OK In:serial@250 Out: serial@250 Err: serial@250 Net: eth0: ethernet@450 starting USB... Bus usb@4101000: USB EHCI 1.00 Bus usb@4101400: USB OHCI 1.0 Bus usb@420: USB EHCI 1.00 Bus usb@4200400: USB OHCI 1.0 scanning bus usb@4101000 for devices... 1 USB Device(s) found scanning bus usb@4101400 for devices... 1 USB Device(s) found scanning bus usb@420 for devices... 3 USB Device(s) found scanning bus usb@4200400 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Hit any key to stop autoboot: 0 => run bootobsd 24525 bytes read in 10 ms (2.3 MiB/s) 152332 bytes read in 30 ms (4.8 MiB/s) Card did not respond to voltage select! : -110 ** Unable to read file ubootefi.var ** Failed to load EFI variables Booting /\EFI\OpenBSD\BOOTRISCV64.EFI disks: sd0* >> OpenBSD/riscv64 BOOTRISCV64 1.5 boot> boot -c cannot open sd0a:/etc/random.seed: No such file or directory booting sd0a:/bsd: 2142436+1168164+8505520+538824 [181570+122+283152+186205]=0xf3f470 bootargs: -c [oh it's a Mango Pi, hold on this might take a whi. :-)] all mapped type 0x0 pa 0x4000 va 0x4000 pages 0x40 attr 0x8 type 0x7 pa 0x4004 va 0x4004 pages 0x1c0 attr 0x8 type 0x2 pa 0x4020 va 0x4020 pages 0x4000 attr 0x8 type 0x7 pa 0x4420 va 0x4420 pages 0x3d00 attr 0x8 type 0x9 pa 0x47f0 va 0x47f0 pages 0x9 attr 0x8 type 0x7 pa 0x47f09000 va 0x47f09000 pages 0x36cd7 attr 0x8 type 0x2 pa 0x7ebe va 0x7ebe pages 0x8 attr 0x8 type 0x4 pa 0x7ebe8000 va 0x7ebe8000 pages 0x1 attr 0x8 type 0x7 pa 0x7ebe9000 va 0x7ebe9000 pages 0x1 attr 0x8 type 0x2 pa 0x7ebea000 va 0x7ebea000 pages 0x100 attr 0x8 type 0x1 pa 0x7ecea000 va 0x7ecea000 pages 0x26 attr 0x8 type 0x4 pa 0x7ed1 va 0x7ed1 pages 0x5 attr 0x8 type 0x6 pa 0x7ed15000 va 0x7ed15000 pages 0x1 attr 0x8008 type 0x4 pa 0x7ed16000 va 0x7ed16000 pages 0x3 attr 0x8 type 0x6 pa 0x7ed19000 va 0x7ed19000 pages 0x1 attr 0x8008 type 0x4 pa 0x7ed1a000 va 0x7ed1a000 pages 0x1 attr 0x8 type 0x6 pa 0x7ed1b000 va 0x7ed1b000 pages 0x6 attr 0x8008 type 0x4 pa 0x7ed21000 va 0x7ed21000 pages 0x17 attr 0x8 type 0x2 pa 0x7ed38000 va 0x7ed38000 pages 0x122c attr 0x8 type 0x5 pa 0x7ff64000 va 0x7ff64000 pages 0x1 attr 0x8008 type 0x2 pa 0x7ff65000 va 0x7ff65000 pages 0x9b attr 0x8 Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. Copyright (c) 1995-2023 OpenBSD. All rights reserved. https://www.OpenBSD.org OpenBSD 7.3-current (MANGOPI) #185: Sat Sep 23 08:52:28 CEST 2023 p...@stern.mainrechner.de:/riscv64/compile/MANGOPI real mem = 1073741824 (1024MB) avail mem = 988495872 (942MB) SBI: OpenSBI v1.3, SBI Specification Version 1.0 User Kernel Config UKC> disable com 67 com* disabled UKC> disable plic 5 plic* disabled UKC> quit Continuing... random: boothowto does not indicate good seed mainbus0 at root: Allwinner D1 Nezha cpu0 at mainbus0: T-Head C906 imp 0 rv64imafdc intc0 at cpu0 cpu0: 32KB 64b/line 128-way L1 I-cache, 32KB 64b/line 256-way L1 D-cache "dcxo-clk" at mainbus0 not configured "display-engine" at mainbus0 not configured simplebus0 at mainbus0: "soc" sxipio0 at simplebus0: 88 pins sxiccmu0 at simplebus0 syscon0 at simplebus0: "audio-codec" "regulators" at syscon0 not configured "pwm" at simplebus0 not configured "iommu" at simplebus0 not configured "timer" at simplebus0 not configure
RISCV - port to Mango Pi MQ-Pro (D1)
Hi, I've been working a little bit on making OpenBSD run on Mango Pi, I haven't succeeded yet, but I think we're close. My patches are here: https://github.com/pbug44/openbsd-src/tree/MANGOPI it's a forked version of OpenBSD src with a "MANGOPI" branch. I used to send patches around to several OpenBSD devs but now it's probably better to have a repo for it. If you have this hardware and want OpenBSD running on it, help us! If you don't know how to program perhaps you can build-test. I haven't merged this patch yet, but I'll be working on this (it was compiling on a sept. 1st version of -current). A Mango Pi was sent to OpenBSD but came back to me after some time waiting to be picked up at a postal outlet. I don't know why they didn't call the OpenBSD dev, the number was on the address. Or perhaps they did and he was on vacation at the time. I still want to give this to the OpenBSD dev that I sent it to, unless he doesn't want it, I still want to give this to OpenBSD. OpenBSD, contact me with new postal address information. Best Regards, -peter -- Over thirty years experience on Unix-like Operating Systems starting with QNX.
Re: riscv questions
On Fri, Aug 18, 2023 at 06:44:48AM +0200, Peter J. Philipp wrote: > On Thu, Aug 17, 2023 at 06:03:42PM +, Mike Larkin wrote: > > On Sun, Aug 13, 2023 at 06:27:20PM +0200, Peter J. Philipp wrote: > > > Hi, > > > > > > I was wondering two things currently, both having to do with QEMU on > > > OpenBSD. > > > > > > I noticed in my QEMU that is running OpenBSD that it is supporting the > > > H-extension. The H is hypervisor. Does this mean that there is support > > > emulated for hypervisor host and guest in QEMU? Also is there any > > > efforts to > > > implement this where I can be an observer? > > > > I believe they have some support for that. > > > > There is no hardware currently available that has it though, from what I > > know. > > There is an FPGA core you can implement on a suitably large dev board > > though, > > but you'd be a 1-off. > > > > When you say "implement this", what do you mean? > > Oh I didn't know there was no hardware support for this yet. What I meant > for implementing this was if there is anyone porting vmm to riscv64. I guess > arm64 needs it too but riscv64 to me is the ultimate :-). > arm64 is first but the separation work was done already. There are about two dozen functions that need to be implemented in the kernel, plus a bunch of work in vmd. > I was wondering Mike, do you offer any more workgroups like the one that > ported riscv64? I know someone on IRC who lives in the Los Angeles region of It wasn't a workgroup. It was a group of four full time students working on their master's degrees as a final project. It took six months, more or less, and at that time we barely could print hello world from userland. It was another 6-12 months after that before it was stable, thanks to many other developers. > California that might be interested in such a workgroup. Though he may > not be available until 2024/2025 for something such as this, but the interest > would be there. I told him an effort to port vmm to riscv64 would be a > worthwhile endeavour, for everyone. Obviously it depends on hardware support > and someone to guide the group. > I'm prioritizing arm64 at this point, there isn't much value in porting vmm to hardware that is way too slow to matter (and I am unsure if such hardware even exists). powerpc64 is another choice, it has virtualization support, as do some octeons. We have real hardware for those, too. That said, if a diff appeared on tech@, I'd certainly take a look at it. > > > > > > > I saw somewhere that newer QEMU support RV128 cpu emulation. While this > > > is something for 20 years from now perhaps, I'm still curious if anyone is > > > considering a port to the RV128, or is at least turned on by the thought > > > of it. > > > > no > > > > > Unfortunately I believe the RV128 isn't intended for an 128 bit address > > > space > > > but has something planned for partitioning it in half so it will be 64 bit > > > space. With the other 64 bit for something security related. > > > > > > Also I'd like to say that I have my first piece of RV64 hardware for a few > > > weeks now and it can run linux ubuntu. It's a Mango Pi which is the same > > > form factor as a RPI zero. I also donated one to a developer so perhaps > > > we'll > > > see OpenBSD running on it one day. In half a dozen weeks or so I'm > > > considering > > > getting my second RV64 computer, which will be somewhat of a visionfive > > > 2-like > > > SBC for a router. Not sure which yet, though, let's see who can deliver > > > in > > > October. > > > > > > Next year I'd like to invest into a larger RV64 computer for workstation. > > > As > > > you can see I'm starting to get a bit serious around Risc-V > > > > get a milk-v pioneer then, it's the biggest you can currently buy. > > Interesting. Thanks! > > Best Regards, > -peter > > -- > Over thirty years experience on Unix-like Operating Systems starting with QNX.
Re: riscv questions
On Thu, Aug 17, 2023 at 06:03:42PM +, Mike Larkin wrote: > On Sun, Aug 13, 2023 at 06:27:20PM +0200, Peter J. Philipp wrote: > > Hi, > > > > I was wondering two things currently, both having to do with QEMU on > > OpenBSD. > > > > I noticed in my QEMU that is running OpenBSD that it is supporting the > > H-extension. The H is hypervisor. Does this mean that there is support > > emulated for hypervisor host and guest in QEMU? Also is there any efforts > > to > > implement this where I can be an observer? > > I believe they have some support for that. > > There is no hardware currently available that has it though, from what I know. > There is an FPGA core you can implement on a suitably large dev board though, > but you'd be a 1-off. > > When you say "implement this", what do you mean? Oh I didn't know there was no hardware support for this yet. What I meant for implementing this was if there is anyone porting vmm to riscv64. I guess arm64 needs it too but riscv64 to me is the ultimate :-). I was wondering Mike, do you offer any more workgroups like the one that ported riscv64? I know someone on IRC who lives in the Los Angeles region of California that might be interested in such a workgroup. Though he may not be available until 2024/2025 for something such as this, but the interest would be there. I told him an effort to port vmm to riscv64 would be a worthwhile endeavour, for everyone. Obviously it depends on hardware support and someone to guide the group. > > > > I saw somewhere that newer QEMU support RV128 cpu emulation. While this > > is something for 20 years from now perhaps, I'm still curious if anyone is > > considering a port to the RV128, or is at least turned on by the thought of > > it. > > no > > > Unfortunately I believe the RV128 isn't intended for an 128 bit address > > space > > but has something planned for partitioning it in half so it will be 64 bit > > space. With the other 64 bit for something security related. > > > > Also I'd like to say that I have my first piece of RV64 hardware for a few > > weeks now and it can run linux ubuntu. It's a Mango Pi which is the same > > form factor as a RPI zero. I also donated one to a developer so perhaps > > we'll > > see OpenBSD running on it one day. In half a dozen weeks or so I'm > > considering > > getting my second RV64 computer, which will be somewhat of a visionfive > > 2-like > > SBC for a router. Not sure which yet, though, let's see who can deliver in > > October. > > > > Next year I'd like to invest into a larger RV64 computer for workstation. As > > you can see I'm starting to get a bit serious around Risc-V > > get a milk-v pioneer then, it's the biggest you can currently buy. Interesting. Thanks! Best Regards, -peter -- Over thirty years experience on Unix-like Operating Systems starting with QNX.
Re: riscv questions
On Sun, Aug 13, 2023 at 06:27:20PM +0200, Peter J. Philipp wrote: > Hi, > > I was wondering two things currently, both having to do with QEMU on OpenBSD. > > I noticed in my QEMU that is running OpenBSD that it is supporting the > H-extension. The H is hypervisor. Does this mean that there is support > emulated for hypervisor host and guest in QEMU? Also is there any efforts to > implement this where I can be an observer? I believe they have some support for that. There is no hardware currently available that has it though, from what I know. There is an FPGA core you can implement on a suitably large dev board though, but you'd be a 1-off. When you say "implement this", what do you mean? > > I saw somewhere that newer QEMU support RV128 cpu emulation. While this > is something for 20 years from now perhaps, I'm still curious if anyone is > considering a port to the RV128, or is at least turned on by the thought of > it. no > Unfortunately I believe the RV128 isn't intended for an 128 bit address space > but has something planned for partitioning it in half so it will be 64 bit > space. With the other 64 bit for something security related. > > Also I'd like to say that I have my first piece of RV64 hardware for a few > weeks now and it can run linux ubuntu. It's a Mango Pi which is the same > form factor as a RPI zero. I also donated one to a developer so perhaps we'll > see OpenBSD running on it one day. In half a dozen weeks or so I'm > considering > getting my second RV64 computer, which will be somewhat of a visionfive 2-like > SBC for a router. Not sure which yet, though, let's see who can deliver in > October. > > Next year I'd like to invest into a larger RV64 computer for workstation. As > you can see I'm starting to get a bit serious around Risc-V get a milk-v pioneer then, it's the biggest you can currently buy. > > Best Regards, > -peter > > -- > Over thirty years experience on Unix-like Operating Systems starting with QNX. >
riscv questions
Hi, I was wondering two things currently, both having to do with QEMU on OpenBSD. I noticed in my QEMU that is running OpenBSD that it is supporting the H-extension. The H is hypervisor. Does this mean that there is support emulated for hypervisor host and guest in QEMU? Also is there any efforts to implement this where I can be an observer? I saw somewhere that newer QEMU support RV128 cpu emulation. While this is something for 20 years from now perhaps, I'm still curious if anyone is considering a port to the RV128, or is at least turned on by the thought of it. Unfortunately I believe the RV128 isn't intended for an 128 bit address space but has something planned for partitioning it in half so it will be 64 bit space. With the other 64 bit for something security related. Also I'd like to say that I have my first piece of RV64 hardware for a few weeks now and it can run linux ubuntu. It's a Mango Pi which is the same form factor as a RPI zero. I also donated one to a developer so perhaps we'll see OpenBSD running on it one day. In half a dozen weeks or so I'm considering getting my second RV64 computer, which will be somewhat of a visionfive 2-like SBC for a router. Not sure which yet, though, let's see who can deliver in October. Next year I'd like to invest into a larger RV64 computer for workstation. As you can see I'm starting to get a bit serious around Risc-V Best Regards, -peter -- Over thirty years experience on Unix-like Operating Systems starting with QNX.
Re: RISCV mailing list
develo...@robert-palm.de wrote: > Zitat von Theo de Raadt : > > > develo...@robert-palm.de wrote: > > > >> I suggest a mailing list for the RISCV arch. > >> > >> Ok? > > > > > > It will be as popular and useful as the other per-architecture lists, > > meaning -- it is the wrong approach. > > Understand. Thanks. > > In consequence the other arch lists should be dropped as there is not > much traffic anyway? this is more like a who cares
Re: RISCV mailing list
Zitat von Theo de Raadt : develo...@robert-palm.de wrote: I suggest a mailing list for the RISCV arch. Ok? It will be as popular and useful as the other per-architecture lists, meaning -- it is the wrong approach. Understand. Thanks. In consequence the other arch lists should be dropped as there is not much traffic anyway?
Re: RISCV mailing list
develo...@robert-palm.de wrote: > I suggest a mailing list for the RISCV arch. > > Ok? It will be as popular and useful as the other per-architecture lists, meaning -- it is the wrong approach.
RISCV mailing list
I suggest a mailing list for the RISCV arch. Ok?
openbsd-riscv mailing list?
Hi openbsd-misc ML, Is there any riscv emailing list yet to discuss riscv64? I see no emailing list discussion at all, however riscv64 arch support is there. I guess riscv will become more and more popular over time. Joseph References: http://www.openbsd.org/riscv64.html https://undeadly.org/cgi?action=article;sid=20210423090342 23 April https://undeadly.org/cgi?action=article;sid=20210619161607 6 June
Re: riscv
On 2020-03-14 23:19, Mike Larkin wrote: On Sat, Mar 14, 2020 at 11:18:11PM -0700, Mike Larkin wrote: On Fri, Mar 13, 2020 at 02:12:19PM -0700, Jordan Geoghegan wrote: On 2020-03-13 09:50, Christian Weisgerber wrote: On 2020-03-13, "Peter J. Philipp" wrote: Any developer working on a riscv port and willing to share their unofficial work for possible future collaboration? I think I'd have heard by now if somebody was, so I'll go out on a limb and say no, nobody's working on a RISC-V port. I stumbled across this a while back, this guy at least claims to be attempting a port to RISC-V... https://github.com/MengshiLi/openbsd-riscv-notes We have a riscv64 kernel booting up to the rootdev prompt, and are working on PS, "We" here is my student team. This is not being done as part of the main OpenBSD development effort. We hope to be able to get this committed when it is ready but we are nowhere near that yet. getting plic working so that we can use virtio disks. The link above is from one of my students that is working on this. This is not in the main tree, and I'm not sure what it will take to get it there (we are using a newer version of clang than is in base). -ml That's great to hear, I'm excited to see what comes of this work, hats off to you and your students! It's a shame that clang was re-licensed, I hope we don't end up with a repeat of the gcc 4.x saga. I've heard a number of people lamenting about various improvements made in clang post relicencing, especially for non x86 arches such as powerpc. Jordan
Re: riscv
On Sat, Mar 14, 2020 at 11:18:11PM -0700, Mike Larkin wrote: > On Fri, Mar 13, 2020 at 02:12:19PM -0700, Jordan Geoghegan wrote: > > > > > > On 2020-03-13 09:50, Christian Weisgerber wrote: > > > On 2020-03-13, "Peter J. Philipp" wrote: > > > > > > > Any developer working on a riscv port and willing to share their > > > > unofficial > > > > work for possible future collaboration? > > > I think I'd have heard by now if somebody was, so I'll go out on a > > > limb and say no, nobody's working on a RISC-V port. > > > > > > > I stumbled across this a while back, this guy at least claims to be > > attempting a port to RISC-V... > > > > https://github.com/MengshiLi/openbsd-riscv-notes > > > > We have a riscv64 kernel booting up to the rootdev prompt, and are working on PS, "We" here is my student team. This is not being done as part of the main OpenBSD development effort. We hope to be able to get this committed when it is ready but we are nowhere near that yet. > getting plic working so that we can use virtio disks. > > The link above is from one of my students that is working on this. This is not > in the main tree, and I'm not sure what it will take to get it there (we are > using a newer version of clang than is in base). > > -ml >
Re: riscv
On Fri, Mar 13, 2020 at 02:12:19PM -0700, Jordan Geoghegan wrote: > > > On 2020-03-13 09:50, Christian Weisgerber wrote: > > On 2020-03-13, "Peter J. Philipp" wrote: > > > > > Any developer working on a riscv port and willing to share their > > > unofficial > > > work for possible future collaboration? > > I think I'd have heard by now if somebody was, so I'll go out on a > > limb and say no, nobody's working on a RISC-V port. > > > > I stumbled across this a while back, this guy at least claims to be > attempting a port to RISC-V... > > https://github.com/MengshiLi/openbsd-riscv-notes > We have a riscv64 kernel booting up to the rootdev prompt, and are working on getting plic working so that we can use virtio disks. The link above is from one of my students that is working on this. This is not in the main tree, and I'm not sure what it will take to get it there (we are using a newer version of clang than is in base). -ml
Re: riscv
On 2020-03-13, Jordan Geoghegan wrote: > > > On 2020-03-13 09:50, Christian Weisgerber wrote: >> On 2020-03-13, "Peter J. Philipp" wrote: >> >>> Any developer working on a riscv port and willing to share their unofficial >>> work for possible future collaboration? >> I think I'd have heard by now if somebody was, so I'll go out on a >> limb and say no, nobody's working on a RISC-V port. >> > > I stumbled across this a while back, this guy at least claims to be > attempting a port to RISC-V... > > https://github.com/MengshiLi/openbsd-riscv-notes > > recent state: https://pastebin.com/QqLPs1GB
Re: riscv
On 2020-03-13 09:50, Christian Weisgerber wrote: On 2020-03-13, "Peter J. Philipp" wrote: Any developer working on a riscv port and willing to share their unofficial work for possible future collaboration? I think I'd have heard by now if somebody was, so I'll go out on a limb and say no, nobody's working on a RISC-V port. I stumbled across this a while back, this guy at least claims to be attempting a port to RISC-V... https://github.com/MengshiLi/openbsd-riscv-notes
Re: riscv
On 2020-03-13, "Peter J. Philipp" wrote: > Any developer working on a riscv port and willing to share their unofficial > work for possible future collaboration? I think I'd have heard by now if somebody was, so I'll go out on a limb and say no, nobody's working on a RISC-V port. -- Christian "naddy" Weisgerber na...@mips.inka.de
riscv
Any developer working on a riscv port and willing to share their unofficial work for possible future collaboration? Best Regards, -peter