Re: I.MX8 evk
> I do not have access to the hardware currently but from the order > documents we use the following devices (which differ only slightly in > MIPI-DSI configuration). > > MCIMX8M-EVK > MCIMX8M-EVKB Ok both are discontinued. I guess I need to search for it in some other way. Thanks Michael ___ users mailing list -- users@lists.genode.org To unsubscribe send an email to users-le...@lists.genode.org Archived at https://lists.genode.org/mailman3/hyperkitty/list/users@lists.genode.org/message/37SKZLDO5W3LDZDFGLOF4FSJU5C5YBAY/
Re: I.MX8 evk
On Thu, 2 May 2024 at 23:37, Michael Grunditz wrote: > > Hi > > Does anyone on this list know if there are any distributors that have > IMX8MQ evk in stock? I need it for testing my iMX8 genode projects. > > Michael Grunditz To Labs: Which board do you have ... full part number ___ users mailing list -- users@lists.genode.org To unsubscribe send an email to users-le...@lists.genode.org Archived at https://lists.genode.org/mailman3/hyperkitty/list/users@lists.genode.org/message/Z4QXHWPLMJPW44LDTDNCL6CJ57MLTW5V/
I.MX8 evk
Hi Does anyone on this list know if there are any distributors that have IMX8MQ evk in stock? I need it for testing my iMX8 genode projects. Michael Grunditz ___ users mailing list -- users@lists.genode.org To unsubscribe send an email to users-le...@lists.genode.org Archived at https://lists.genode.org/mailman3/hyperkitty/list/users@lists.genode.org/message/KOF326QCFRHQ26M7KAA6U6OXAJMR76JT/
Re: open/ close/ read
In message <20240207074350.gb2...@genode-labs.com> Christian Helmuth wrote: > Hello Michael, > On Tue, Feb 06, 2024 at 13:08:22 CET, Michael Grunditz wrote: >> Is open() read() close() supposed to work? For me they doesnt. It >> works sometimes but not all times. It also doesnt read the file it >> just reads the first bytes or kbytes if large file. > Yes, those functions are supposed to work and also do in quite some > components, most of them ported applications. Could you be a bit more > specific about the parameters and results in failing cases? I forgot.. fstat also fails (but returns without error). Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: open/ close/ read
In message <20240207074350.gb2...@genode-labs.com> Christian Helmuth wrote: > Hello Michael, > On Tue, Feb 06, 2024 at 13:08:22 CET, Michael Grunditz wrote: >> Is open() read() close() supposed to work? For me they doesnt. It >> works sometimes but not all times. It also doesnt read the file it >> just reads the first bytes or kbytes if large file. > Yes, those functions are supposed to work and also do in quite some > components, most of them ported applications. Could you be a bit more > specific about the parameters and results in failing cases? I basicly do: open read only fstat to get file size malloc a buffer with that size read from it using that size close the file >> fopen fread fclose is ok and stat. > This hints the libc implementation copes with corner cases of the > low-level functions your code does not. I have changed most of my code to use f* functions instead. It works just fine so no worries. Thanks, Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: open/ close/ read
In message <20240207073905.ga2...@genode-labs.com> Christian Helmuth wrote: > Hello, > I do not know which "issue" you are referring to but I'm quite aware > that we had repeating discussions about "partial reads". I see words > above as your "opinion" about the matter and in no way "standard". > POSIX and also the ISO C standard are quite explicit about the > problematic nature of read() returning a short count in some cases. > Both standards leave it to the programmer to cope with these > situations and additionally provide a tool for the lazy - fread() [1]. > So, if you don't want to treat short/partial reads in your code, just > use fread(), but never spread misleading opinions as universal truth. Thanks for the clarification. Didn't know that it was as it should. I use fread from now on. Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
open/ close/ read
Hi Is open() read() close() supposed to work? For me they doesn’t. It works sometimes but not all times. It also doesn’t read the file it just reads the first bytes or kbytes if large file. fopen fread fclose is ok and stat. Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Getting screen coordinate of a window
In message <77f3e8285b.mickenx@armx6> Michael Grunditz wrote: > In message > In the loop that sets cpu .. how can I make it interrupting all cpus? I > have tried this _irqdistr.write(1U<<31, i); or by > adding a bitfield struct i Irouter. It works now, a exercise not suitable for the faint of heart :-) I still wonder how MU is supposed to work. I Need to trigger interrupt from the same "cpu" set of regs. But since it works I will not follow that down.. I have landed on having a "1" for irq routing. If this would be expanded I might do 1<<31 ,, but for now Genode doesn't have anything connected. Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Getting screen coordinate of a window
In message Stefan Kalkowski wrote: > > So that is the software architectural limitation right now. > Technically it should be no problem at all to route your interrupt to > CPU 1. One way to achieve this within an Genode-only system without > changing the IRQ service would be, to use the affinity of the caller > to set the CPU target. But if I remember correctly you want to route > the interrupt to a different core, which is managed by RISC OS. So in > that case you could either use a hack (just hardcode it for the > designated interrupts), or in the longer run the IRQ session gets > equipped with a way to express the affinity explicitely. The latter > solution however is nothing I would pledge to do overhasty. However, > we have to re-think the quite simple form of the IRQ session in the > midterm future anyway, because of other limitations, and we shall keep > your use-case in the back of our heads therefore. Replying from better client , thanks. > For an instant hack, you might have a look at file: > repos/base-hw/src/bootstrap/spec/arm/gicv3.cc > where the affinity routing of all interupts is initialized now. The > interesting register is `Distributor::Irouter` (line 53 in my > version). If I understand it right by reading real world example ( freertos/m4/imx8) it seems like MU should be set up using boot core. The manual doesn't mention this. I have tried to change in repos/base-hw/src/bootstrap/spec/arm/gicv3.cc In the loop that sets cpu .. how can I make it interrupting all cpus? I have tried this _irqdistr.write(1U<<31, i); or by adding a bitfield struct i Irouter. Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Getting screen coordinate of a window
Thanks Stefan. I have actually tried routing it from gicv3 code. I have decide to rebase my interrupt Hal. Not home today but I think that it will fix my problem. Interrupts is to most hairy part of what I am doing now I need to do some init bits from the other core but at the same time not breaking it for Genode. What’s the fun if everything works right away! Michael > 24 jan. 2024 kl. 11:53 skrev Stefan Kalkowski > : > > Hi Michael, > >> On Tue, Jan 23, 2024 at 04:04:42PM +0100, Michael Grunditz wrote: >> In message >> Norman Feske wrote: >> Another issue: >> I don't know if anyone knows about this but ( long shot :-) ), >> I am relying on the imx8 message unit (MU). I have been using polling >> against it, but now I need interrupts. But I can't get it to work. I am >> trying to enable it on CPUB side. no effect. So I tried it in Genode CPUA >> (Core 0) and after setting up interrupt in the MU chip I got interrupts >> from the cpu. So the qeustion is: Is it only possible to set it on Core 0 >> and if so , can I route it to Core 1 in Genode. I have been looking in the >> gicv3 code and it seems like it only does core 0. I have also tried to >> enable it in genode and after that setting affinity on the second core ( >> from the second core). No effect. Interresting enough is that I can enable >> SoC timer and get it to interrupt core 1 ( not setting anything in Genode >> / Core 0). > > The reason why we use a fixed route to CPU 0 for all interrupts here, > is the fact that till now only one thread (on CPU 0) in core serves > the interrupt service in base-hw. Moreover, the platform driver > intercepted in the recent past the interrupt service to support > interrupt sharing (also having just one thread, typically running on > CPU 0), although it doesn't do this necessarily anymore for devices > having distinct interrupts. Finally, the current interrupt service > does not provide a way to tell core/kernel which CPU affinity to use > for a specific interrupt. > > So that is the software architectural limitation right now. > Technically it should be no problem at all to route your interrupt to > CPU 1. One way to achieve this within an Genode-only system without > changing the IRQ service would be, to use the affinity of the caller > to set the CPU target. But if I remember correctly you want to route > the interrupt to a different core, which is managed by RISC OS. So in > that case you could either use a hack (just hardcode it for the > designated interrupts), or in the longer run the IRQ session gets > equipped with a way to express the affinity explicitely. The latter > solution however is nothing I would pledge to do overhasty. However, > we have to re-think the quite simple form of the IRQ session in the > midterm future anyway, because of other limitations, and we shall keep > your use-case in the back of our heads therefore. > > For an instant hack, you might have a look at file: > repos/base-hw/src/bootstrap/spec/arm/gicv3.cc > where the affinity routing of all interupts is initialized now. The > interesting register is `Distributor::Irouter` (line 53 in my > version). > > Best regards > Stefan > >> >> Michael >> >> ___ >> Genode users mailing list >> users@lists.genode.org >> https://lists.genode.org/listinfo/users > > -- > Stefan Kalkowski > Genode labs > > https://github.com/skalk | https://genode.org > > ___ > Genode users mailing list > users@lists.genode.org > https://lists.genode.org/listinfo/users ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Getting screen coordinate of a window
In message Norman Feske wrote: > both the nitpicker GUI server as well as the wm deliver only absolute > motion events. Events delivered by nitpicker refer to the upper-left > corner of the screen. Events delivered by the wm "virtualize" this > upper-left corner so that the real window position is not exposed to the > application. When creating a view at position (0,0), the received motion > events refer to the position within the window. > BTW, the easiest way to see what input events you receive is to print > each event. You can pass an Input::Event directly to the 'log' function. > The wm (specifically the layouter) reports the window layout (including > pixel positions for each window) as "window_layout" report. This report > is normally consumed only by the decorator. By reflecting this report as > a ROM (using report_rom) to your application, you can make the > application aware of the complete layout if you want so. You may have a > look at [1] to see the interplay of the window-management components > (wm, layouter, decorator). Thanks . I sorted it .. turned out to be a misunderstandng from my side. Can I hide the system mouse pointer? Another issue: I don't know if anyone knows about this but ( long shot :-) ), I am relying on the imx8 message unit (MU). I have been using polling against it, but now I need interrupts. But I can't get it to work. I am trying to enable it on CPUB side. no effect. So I tried it in Genode CPUA (Core 0) and after setting up interrupt in the MU chip I got interrupts from the cpu. So the qeustion is: Is it only possible to set it on Core 0 and if so , can I route it to Core 1 in Genode. I have been looking in the gicv3 code and it seems like it only does core 0. I have also tried to enable it in genode and after that setting affinity on the second core ( from the second core). No effect. Interresting enough is that I can enable SoC timer and get it to interrupt core 1 ( not setting anything in Genode / Core 0). Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Getting screen coordinate of a window
In message <7d6a5e265b.mickenx@armx6> Michael Grunditz wrote: > Hello! > Can I get screen coordinates of a window? I would like to be able to > caputure absolute mouse events and convert them to the window coordinate > system. I don't want to have relative mouse movement like I see in many > examples. In my context it doesn't work very well. > BTW the handle_relative_motion never seems to return anything. Is there a > configuration that I need? Would be terific if I could by some function > get window internal coordinates, but handle_relative_motion might not be > something for that? > I also want to know if there are routines better suited than memcpy for > ploting large buffers? I have noticed that if I put something in a loop > without a little delay the system crawls. Is the Gui not preemptive? As > little as 10ns is enough. > I plot 640x480x4. It acts a bit strange. Each second a frame takes less > than 1/60 seconds. There are 3 frames that runs slower and back to quick. > I have nano sleep that is based on that timing. > /Michael To follow up the memcpy issue .. with Genode::memcpy I get about 5 fps. But in this very even and nice situation some neon code made it 60fps. Happy! Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Getting screen coordinate of a window
Hello! Can I get screen coordinates of a window? I would like to be able to caputure absolute mouse events and convert them to the window coordinate system. I don't want to have relative mouse movement like I see in many examples. In my context it doesn't work very well. BTW the handle_relative_motion never seems to return anything. Is there a configuration that I need? Would be terific if I could by some function get window internal coordinates, but handle_relative_motion might not be something for that? I also want to know if there are routines better suited than memcpy for ploting large buffers? I have noticed that if I put something in a loop without a little delay the system crawls. Is the Gui not preemptive? As little as 10ns is enough. I plot 640x480x4. It acts a bit strange. Each second a frame takes less than 1/60 seconds. There are 3 frames that runs slower and back to quick. I have nano sleep that is based on that timing. /Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Map ram for framebuffer
Hi I would like to mmu map a piece of ram and make that a framebuffer dataspace. Is this possible? Thanks, Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Options for interfacing C application
Hi I woud like to know what options I have for interfacing a C app with Genode. I guess I can make it a libc styled app. The only thing I need is to have a piece of RAM (framebuffer) shared. If possible .. can I put in .a archives into build system and link with a libc app/server? It would be very helpfull. Ideally I would like to have a seperate server for framebuffer. Good night and thanks, Michael Grunditz ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Goa armv8
Thanks .. was reading help and not help config. Side question: My app needs to flush cpu caches , can do without but it would be great if it worked. I get this error: ep: not entitled to do kernel call Can I allow this in some way? Michael On Fri, 12 Jan 2024 at 15:32, Johannes Schlatow wrote: > > Hi Michael, > > you have to set the `arch` variable. Have a look at `goa help config`. > > Johannes > > On 12/01/2024 13:43, Michael Grunditz wrote: > > Hi > > > > I have in the past compiled stuff with Goa targeting armv8. But now I > > can't find info about how to do that. The toolchain goa wants to use > > is x86. I guess there is variable I need to have , but I don't know > > what. > > > > Any hints? > > Michael > > > > ___ > > Genode users mailing list > > users@lists.genode.org > > https://lists.genode.org/listinfo/users ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Goa armv8
Hi I have in the past compiled stuff with Goa targeting armv8. But now I can't find info about how to do that. The toolchain goa wants to use is x86. I guess there is variable I need to have , but I don't know what. Any hints? Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Genode, RISC OS and the lot .. demo in Bristol
I am happy to say that I am fully funded! So the demo is on! Lucky to have a month for doing the coding. On Mon, 8 Jan 2024 at 22:44, Michael Grunditz wrote: > > Hi everyone, > > I am planing to show my efforts with Genode and RISC OS on the RISC OS > South West show in Bristol 24/2. > > I plan to stay there from thursday evening to monday morning and if > someone would like to join me it would be terrific! Plenty of time > during friday to talk about new ports usb , and what not! > > > But there is a big IF around this. I have a psychosis diagnose that > prevents me from normal work for money. This means that I can't travel > to Bristol without substantial help. > > For the first time I am running a (humiliating) GoFundMe campaign. It > is aimed to RISC OS users. It is kind of embarrassing to post this on > this list , but I don't have much of a choice :-( > (the link would be here,, send me a email for the link) > > Any surplus will finance new dev boards. > > Sorrry and thanks, > Michael Grunditz ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Genode, RISC OS and the lot .. demo in Bristol
Hi everyone, I am planing to show my efforts with Genode and RISC OS on the RISC OS South West show in Bristol 24/2. I plan to stay there from thursday evening to monday morning and if someone would like to join me it would be terrific! Plenty of time during friday to talk about new ports usb , and what not! But there is a big IF around this. I have a psychosis diagnose that prevents me from normal work for money. This means that I can't travel to Bristol without substantial help. For the first time I am running a (humiliating) GoFundMe campaign. It is aimed to RISC OS users. It is kind of embarrassing to post this on this list , but I don't have much of a choice :-( (the link would be here,, send me a email for the link) Any surplus will finance new dev boards. Sorrry and thanks, Michael Grunditz ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Roadmap 2024
In message Norman Feske wrote: > Hi Michael, > thank you for your response. Replying with real email client :-) >> I started out 2023 very ambitious, porting Genode to rockchip 3528. Err should have been RK3588 :-) >> For various reasons I needed to work on other projects. My plan for >> 2024 is to add RK3399 as a sub target. That means Pinebook Pro and >> Pinephone Pro. I guess that those two targets are wanted. > I guess so too, as I see the latter being picked by the open-source > hardware community, i.e., Lukas Hartmann in his recent posting [1]. > [1] https://mastodon.social/@mntmn/111649131139949948 A much needed upgrade for the MNT Reform laptop. i.MX8M is a bit slow for use in a consumer device for general computing. >> I also would like to see a layer for USB controllers like EHCI and >> XHCI. I would be most happy if someone can walk me thru the pc usb >> stack. I would like to cut lose EHCI from it and use that in my ports. >> I believe that this is better than using linux driver all up to the >> actual stack. > I'd be curious how your goals are aligned with Stefan's ongoing redesign > of Genode's USB infrastructure (explained at [2]) and his further plans > down the road. I'm hopeful that you might benefit from his line of work. > [2] https://github.com/genodelabs/genode/issues/5021 I don't know. The plans linked is above what I want to do, if I understand it right. I come from RISC OS lands , and in our rom we have EHCI,OHCI and XHCI in seperate controller drivers. This all connects to what we call USBDriver which is the main USB stack. In Genode I would like to have something similar. It makes it very easy to bring up on new platforms. In my case, Rockchip, I start USB ( power/phy) from U-Boot. After that I only need to assign address and irq to the controller driver. If Genode doesn't have native controller drivers at all (in pc port) ( sorry haven't checked yet), I could try to bring in controler drivers from BSD. > Cheers and happy holidays! > Norman Happy end of 2023! Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Roadmap 2024
my ambition for the next year to "Sculpt OS usability". > > Device-wise, I'm going to continue my engagement with the PinePhone and > look forward to the upcoming MNT PocketReform laptop. > > > Above I presented my personal view. How about your's? I would very much > appreciate you sharing your feedback, ideas, concerns, and plans > regarding Genode. > > How are your interests aligned with the perspective shared above? > > Do you see specific pain points that deserve the attention of Genode's > core developer team? > > What is your perspective on Genode's past year's accomplishments? > > Can you share your ambitions or even concrete plans? > > How and where would you like to see Genode at the end of 2024? > I started out 2023 very ambitious, porting Genode to rockchip 3528. For various reasons I needed to work on other projects. My plan for 2024 is to add RK3399 as a sub target. That means Pinebook Pro and Pinephone Pro. I guess that those two targets are wanted. I also would like to see a layer for USB controllers like EHCI and XHCI. I would be most happy if someone can walk me thru the pc usb stack. I would like to cut lose EHCI from it and use that in my ports. I believe that this is better than using linux driver all up to the actual stack. I wish you all happy holidays! Michael Grunditz ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Can Genode run on the Mixtile Blade 3?
Den lör 6 maj 2023 00:46Jacek Rużyczka skrev: > I'm returning to my original question as I've now got the chance to get a > Mixtile board within a month or so. I've read a thread about Genode being > ported to the Pinephone Explorer. Is it based on the RK3399S, not on the > RK3588, > right? I also wonder how the so-called U.2 interface /* in fact it's > necessary to use an adapter board to attach a U.2 drive */ will work with > Genode. > > My RK3588 port probably works on your board. It requires that uboot sets up the graphics chip and usb is not supported in my github repo. It is possible to get usb and I am happy to share how it can be done. However, it is a hack that never will end up on github. U.2 would require working pcie ( I guess ). Michael > ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
BBC Basic binary for Genode / armv8
Hello Genodians, I have added a BBC Basic binary to my genode-rockchip gitbub repo [1]. Put it in your build/armv8_a/bin directory. I don't have any ready to use run files. You need to run the terminal scenario and make sure that stdout/in is to the terminal. The reason for not doing source upload is that the build system for it is broken. This will change in the future. The status for my RISC OS / Genode project is that I am prototyping the cpu emulation layer on pc/linux. Right now I can boot RISC OS and run some simple commands. The main issues on a target system is to get interrupts to the emulation from hardware. I think that I can map up the GIC without much problems, but the GIC will interrupt the cpu that runs the emulation. It will be a slight an adventure to get it into the emulation! Have fun with basic , tell me if you can use it! Michael [1] https://github.com/mickenx/genode-rockchip/tree/main/bin/armv8a ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Rockchip USB revisited
In message Stefan Kalkowski wrote: > Hi Michael, > On Mon, Mar 20, 2023 at 03:29:48PM +0100, Michael Grunditz wrote: >> Hi again, >> >> How does the dts extraction work? I would like to have a local copy in >> the repo.. In order to build the driver I needed to do brute force >> hacks into dde_linux.. can I override files from it in my repo? > We provide a device tree source extraction tool in `tool/dts/extract`. > You can see how it is used, e.g., within > `genode-imx/src/drivers/linux_mnt_reform2_drv_target.inc` at the end > of the file. > First you need to preprocess the Linux original device tree source, > and then use `extract --select XXX --select YYY` to extract the nodes > and their transitive closure you're interested in. Ok. I tried my best to get the dts to be included but all I got was empty file. I actually injected it to th kernel tree that I have on my vps ( tarball) > Regarding the shadowing of files within dde_linux: I would > try to avoid that as far as possible to stay update compliant. Maybe > you can explain in more detail where it doesn't fit your needs? > But of course it is possible to use or not use whatever shadow file > exists within dde_linux. In that case you might need to avoid the > usage of `repos/dde_linux/lib/import/import-lx_emul_common.inc`, and > define your own stripped version of it defining what file is included > exactly. OK. Yes I don't want to hack in dde_linux, but on the other hand, it isn't goood to patch the kernel in page handling. I will make a diff next week so you can look at it. I added a couple of things to pg_table and page. The thing is , I am using a newer kernel than the one you use for alwinner. I can use the public kernel , since it got the required phy driver. I just got the little task to bring up PCIe on rk3399 -:) So I will be occupied with that for a while. -- Best regards, Michael Grunditz ** ** ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Rockchip USB revisited
Hi again, How does the dts extraction work? I would like to have a local copy in the repo.. In order to build the driver I needed to do brute force hacks into dde_linux.. can I override files from it in my repo? Thanks, Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Rockchip USB revisited
I got it to build with Rockchip kernel ,but the dts files are incomplete from the only public repo I know about. I will try BSP , but I can't share that. The dts I have now , doesn't make any sense at all comparing the TRMs, ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Rockchip USB revisited
> Using the Linux kernel drivers is simply an economic decision. When > using the latest lx_emul/lx_kit approach it tooks very few days to > enable a new driver, and it tooks even less to update the code base, > which is not the case with the deprecated dde_linux usb_host driver > mentioned above. I hope you can understand this motivation. > However, if you are strongly motivated to implement dedicated USB > protocol stacks from scratch, I assume nobody will argue against it. OK. I understand. It is just that I am unfamiliar with linux drivers. I will try a bit more. The rockchip kernel fais quite early in page table. I think I got around that, but reverted the change. ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Rockchip USB revisited
On Fri, 17 Mar 2023 at 10:39, Stefan Kalkowski wrote: > > Hi Michael, > > On Tue, Mar 14, 2023 at 03:47:48PM +0100, Michael Grunditz wrote: > > > Do you generate the "dep" files automatically? I gave up and added all > > > headers. > > > > Oh well.. I can't get rockchip kernel to build ( it does build by > > itself). I have injected my dts files into a64 kernel and I plan to > > skip phy init , only using ehci and uboot initiated hw. > > > > However build fails with this little message: > > LINK a64_usb_host_drv > > cc1: fatal error: > > /home/micken/oldhome/micken/src/new/genode/depot/genodelabs/api/a64_linux/2023-03-14-z-x-x-x-x-x-x-x-x- > > x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x/src/linux/: No > > such file or directory > > I'm not quite sure what the problem is, but the very long > automatically generated depot package name indicates that your > observed problems have to do with the package build of your driver. As > said in the mail before, please try to develop the driver without > packaging to circumvent that class of problems in the first place. Thanks for replying. I have more or less given up building from A64 driver. I need to have a custom kernel and that refuses to build. Having the driver in dde_linux works without problems, except for not building from "interactive". I need to do make drivers/usb_host. How do I set the controller address for ehci? /Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Rockchip USB revisited
> That directory is there , so I have no clue what it means. > > Michael Just thinking ... the dde_linux driver is much better for me. Much more generic. Is it possible to drive that from my rockchip dir? I have tried that before without luck. If I put a driver in dde_linux/src/drivers/usb_host/spec/ and enable dde_linux in build.conf I get a working driver. To be honest , I think that having generic ohci, ehci and xhci and use linux kernel for phy is a better approach rather than doing the whole driver stack for each platform. I would be happy to get some input on this. ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Rockchip USB revisited
> Do you generate the "dep" files automatically? I gave up and added all > headers. Oh well.. I can't get rockchip kernel to build ( it does build by itself). I have injected my dts files into a64 kernel and I plan to skip phy init , only using ehci and uboot initiated hw. However build fails with this little message: LINK a64_usb_host_drv cc1: fatal error: /home/micken/oldhome/micken/src/new/genode/depot/genodelabs/api/a64_linux/2023-03-14-z-x-x-x-x-x-x-x-x- x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x/src/linux/: No such file or directory That directory is there , so I have no clue what it means. Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Rockchip USB revisited
On Mon, 13 Mar 2023 at 17:59, Michael Grunditz wrote: > > > To cross-check, does the creation of the binary archive > > bin/arm_v8a/a64_usb_host_drv using the genode-allwinner repository work > > as it should? > > > Thanks for help! It builds ( but no cigar!). I managed to put a > comment in a list , so everything failed :-) Seems like my linux kernel changed paging code.. quite a lot. This will take some time. Do you generate the "dep" files automatically? I gave up and added all headers. ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Rockchip USB revisited
> To cross-check, does the creation of the binary archive > bin/arm_v8a/a64_usb_host_drv using the genode-allwinner repository work > as it should? > Thanks for help! It builds ( but no cigar!). I managed to put a comment in a list , so everything failed :-) ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Rockchip USB revisited
> In the genode-allwinner repository, the Linux kernel's config step > happens via the 'a64_linux_generated' pseudo library [1]. > > [1] > https://github.com/genodelabs/genode-allwinner/blob/master/lib/mk/spec/arm_v8/a64_linux_generated.mk > > If a target has 'a64_lx_emul' added to the 'LIBS' variable, the > corresponding import file implicitly adds the 'a64_linux_generated' > library [2]. Yes I got that..If I do build the linux kernel it works. The problem is that when it tries to use source tree from "depot" iit isn't configured. I haven't refactored the sources yet (everything is named a64) and this is the output I get: checking library dependencies... Library a64_linux MERGEa64_linux.lib.a Library a64_linux_generated MERGEa64_linux_generated.lib.a CONFIG Linux [Linux] /home/micken/oldhome/micken/src/new/genode/depot/genodelabs/api/a64_linux/2023-03-13/src/linux/ Makefile:621: arch/arm64/Makefile: No such file or directory [Linux] make[9]: *** No rule to make target 'arch/arm64/Makefile'. Stop. [Linux] make[8]: *** [Makefile:185: __sub-make] Error 2 ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Rockchip USB revisited
Hi I am trying to bring up EHCI using the A64 driver. I configiured build system to download a tar ball with linux kernel. However in the: "CONFIG Linux" step I get this: Makefile:621: arch/arm64/Makefile: No such file or directory Which is natural since the source tree in depot isn't configured. So the first questions is; when is the tree configured? Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
rockchip git updated
Hi I just updated my rockchip repo to match Genode current. https://github.com/mickenx/genode-rockchip Cheers, Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Trustzone with virt_qemu_arm_v8a
On Wed, 1 Mar 2023 at 11:20, Stefan Kalkowski wrote: > > Hello Divya, > > my colleague Norman raised the reasonable question, why don't you use > virtualization for your use-case instead of TrustZone? It is much more > appropriated, and already supported. > > Regards > Stefan > This is the only sensible option. As Stefan explained; it is very large amount of work to device some kind of secure vmm from scratch. It is possible to overwrite ATF and run "simple" functions from the new exception table. Another option is to use something I have tinkered with. I use a dedicated CPU core and since it is started without any EL switching it can run , in the background behind Genode, and can be kept secure. In order to communicate with it you probably need to do a exception vector for the CPU cores Genode runs on. When all is setup , you can message your crypto routines running on the dedicated CPU core by doing SVC calls and in the vector entries use the soc's mailboxing. But, *really*, "normal" virtualization is the best option. Every other option requires a lot of assembly and would step away from Genodes software design. Regards, MIchael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Running genode on QEMU having board support of raspberry pi for arm_v8.
On Sun, 5 Feb 2023 at 15:37, DHIRAJ PRAJAPATI wrote: > > Thanks, Michael for suggesting the uboot tools. > > I generated the uImage successfully. > Now to boot the image on QEMU I first tried to get the log.img using > make run/log KERNEL=hw BOARD=rpi3 VERBOSE= > by adding QEMU_RUN_OPT := --include image/disk > But could not figure out to resolve the problem that the kernel is not > getting loaded. > Also, guide me if I can do something with uImage(var/run/log/boot/uImage) to > get the GUI in QEMU. Reading your error log. Do you have a var/run/log/boot/image.elf? When it works qemu should print messages in your terminal. Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Running genode on QEMU having board support of raspberry pi for arm_v8.
On Sat, 4 Feb 2023 at 05:58, DHIRAJ PRAJAPATI wrote: > > Thanks, Martin for your quick response. > > I followed your steps and generated the > genode/build/arm_v8a/var/run/log/boot/image.elf. > While going to the real hardware I got stuck for > boot/uImage(var/run/log/boot/uImage) getting the following error. > Kindly guide me on how to proceed further. Install the tool "mkimage". In ubuntu: sudo apt-get install u-boot-tools Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: First Rockchip port repo.
> Regarding the USB host driver, I would suggest to not base it on the old > dde_linux version but on our current porting approach [1] [2] [3] [7] [8]. As > a > reference you could use the Allwinner USB host driver [4]. Stefan will also > give > a talk about it at FOSDEM'23 [4]. This should make porting easier and you > could > base the driver on possible vendor kernel sources. The imx repo already > contains > a DWC3 controller port, but doesn't use the tiny config approach [9]. It still > can be used as reference. > > [1] http://genodians.org/skalk/2021-04-06-dde-linux-experiments > [2] http://genodians.org/skalk/2021-04-08-dde-linux-experiments-1 > [3] http://genodians.org/skalk/2021-06-21-dde-linux-experiments-2 > [4] > https://github.com/genodelabs/genode-allwinner/tree/master/src/drivers/usb_host/a64 > [5] https://fosdem.org/2023/schedule/event/ddtransplant/ > [6] > https://github.com/genodelabs/genode-imx/tree/master/src/drivers/usb_host/imx8mq > [7] http://genodians.org/nfeske/2021-09-03-pine-fun-networking > [8] http://genodians.org/nfeske/2021-12-21-pine-fun-display > [9] https://genodians.org/nfeske/2021-05-12-pine-fun-linux > Thanks for your input on this. I will try this in a week or so. I decided to take a break from coding, since I coded 24/7 from new year to some days ago. Linux pc is disconnected from power :-) Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: First Rockchip port repo.
On Mon, 30 Jan 2023 at 14:49, Stefan Kalkowski wrote: > > Hello Michael, > > thank you very much for providing your source code to everyone, and > congratulations for rocking Genode on rk3588! > > Currently, I'm quite busy with preparations regarding the FOSDEM 2023. > But after that weekend, I'm looking forward to review your crt0.s > additions and will try to integrate it upstream into base-hw Should be fine.. just need to lowercase the change :-) ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: First Rockchip port repo.
Den mån 30 jan. 2023 15:45Christian Helmuth < christian.helm...@genode-labs.com> skrev: > Grats Michael, > > On Thu, Jan 26, 2023 at 11:51:42 CET, Michael Grunditz wrote: > > I have made a github repo for my Rockchip port. > [...] > > The requirement for running this is a RK3588 board > > with uboot that support USB and HDMI. You need to run > > "usb start" before booting. > > Sounds easy to reproduce. Which hardware would you recommend? It seems > the QuartzPro64 is not (resp. no longer) for sale. > > https://preorder.pine64.org/ , you need to register in order to get one. The enduser systems aren't out yet. On Qp64 uboot needs a bit of help to convince the vop ( graphic chip). I am happy to share patch if someone decides to get a board. I would like to have help with the build system regarding usb drivers. Thanks, Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: First Rockchip port repo.
Den tors 26 jan. 2023 11:51Michael Grunditz skrev: > Hi > > I have made a github repo for my Rockchip port. > It is only RK3588 for now, but I plan to add rk3399 > for supporting Pinebook Pro. > > There are a number of things not working.Most > irritating is USB. My old tree had driver in dde_linux > repo. Currently if built with drivers-interactive it fails > in a couple of library dependencies. If built from a run > file it won't build all lx_kit files needed. Feel free to help > me, fork and make pull request. > > There is a crt0.s in the start directory that you can copy > to base-hw. I hope it doesn't break things. It is required > for this platform, probably because I start genode with > "go" and not bootm. I can't get bootm to work. > > The requirement for running this is a RK3588 board > with uboot that support USB and HDMI. You need to run > "usb start" before booting. > > The video driver gets the screen mode from what uboot > has configured with EDID. Works just fine with 1080p > monitor. But not with a 4k monitor, > > Well this is it! I have enjoyed it so far. I have tried to > being careful with authours by adding myself and kept > original developer where appropriate. Please fix if I > did something wrong there. It might also be traces from > A64 port , which you also can remove if you find any. > > I also kept the license and base copyright which means > that I give this away to The labs. > > Have fun. > > The repo: > https://github.com/mickenx/genode-rockchip > > > > The rockchip uart header is the imx header. I will reduce that to what I > need. ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
First Rockchip port repo.
Hi I have made a github repo for my Rockchip port. It is only RK3588 for now, but I plan to add rk3399 for supporting Pinebook Pro. There are a number of things not working.Most irritating is USB. My old tree had driver in dde_linux repo. Currently if built with drivers-interactive it fails in a couple of library dependencies. If built from a run file it won't build all lx_kit files needed. Feel free to help me, fork and make pull request. There is a crt0.s in the start directory that you can copy to base-hw. I hope it doesn't break things. It is required for this platform, probably because I start genode with "go" and not bootm. I can't get bootm to work. The requirement for running this is a RK3588 board with uboot that support USB and HDMI. You need to run "usb start" before booting. The video driver gets the screen mode from what uboot has configured with EDID. Works just fine with 1080p monitor. But not with a 4k monitor, Well this is it! I have enjoyed it so far. I have tried to being careful with authours by adding myself and kept original developer where appropriate. Please fix if I did something wrong there. It might also be traces from A64 port , which you also can remove if you find any. I also kept the license and base copyright which means that I give this away to The labs. Have fun. The repo: https://github.com/mickenx/genode-rockchip Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: memcpy_cpu on 64bit arm
> I have rebased my code to git level and into a separate tree now. > Can I have the start file , crt0.s , in my tree? I still need register > clearing. > > I will put in on github asap. I have based it on Alllwinner , so I > need to remove the allwinner file and (not exactly necessary for first > commit) change header ifdefs. > A little issue. My version of usb driver relies on headers in dde_linux. Is there a way to add "dde_linux/src/include/spec/arm_64" to my target.mk as incdir? I can hardcode it ,, but naturally it needs to be dynamic. ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: memcpy_cpu on 64bit arm
On Tue, 24 Jan 2023 at 09:48, Norman Feske wrote: > > Hi Michael, > > > About the blitting: > > I will do benchmarks with and without clipping/flushing. > > for such microbenchmarking, let me point you to the GENODE_LOG_TSC > utility [1], which makes this dead easy. > > [1] https://genodians.org/nfeske/2021-04-07-performance > Thanks I will check it out! I have rebased my code to git level and into a separate tree now. Can I have the start file , crt0.s , in my tree? I still need register clearing. I will put in on github asap. I have based it on Alllwinner , so I need to remove the allwinner file and (not exactly necessary for first commit) change header ifdefs. Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: memcpy_cpu on 64bit arm
On Tue, 24 Jan 2023 at 08:21, Christian Helmuth wrote: > > Hello, > > On Mon, Jan 23, 2023 at 15:56:48 CET, Michael Grunditz wrote: > > On Mon, 23 Jan 2023 at 14:15, Michael Grunditz > > wrote: > > > Anyway init crashes somewhere. > > > > > > 2043 MiB RAM and 64533 caps assigned to init > > > no RM attachment (READ pf_addr=0x81 pf_ip=0x9f3f4 from pager_object: > > > pd='init' thread='init') > > > Warning: page fault, pager_object: pd='init' thread='init' ip=0x9f3f4 > > > fault-addr=0x81 type=no-page > > > > I *think* it fails right in start of first child. It seems ok around > > the starting. > > The last memcpy seems ok. I have printed both buffers and they are > > identical. > > I'm wondering why you replaced the general memcpy() in the first place > as this brings maximal (potential negative) impact in many places. You > could alternatively just optimize your framebuffer blitting and > proceed with your porting work. Yes you are absolutely right. I just got a bit excited about what might be gained. > > Also, it is not known which NEON instructions and registers your > memcpy utilizes. I'm not an ARM expert but: Does the current > FPU-switching implementation of base-hw suffice or do you need to > save/restore extended state? As you do not share your developments > (i.e. source code) with the public it is hard to provide specific > help. > Right again. > Any information which code is at 0x9f3f4 in ld.lib.so? No.Sorry. At the top level it crashes at the first elf starting, init. It seems to be able to start the thread but fails in the jump ( or something ). Anyway I will stop doing this little hack. Sorry for sending unwanted email and thanks for reading! About the blitting: I will do benchmarks with and without clipping/flushing. Also: I want to put things together in a target tree and publish that on github and at the same time rebase everything to git level. I think this is the task I will do first. Things are scattered across several repos now, and it is quite hard to handle. I also want to be open with what I am doing. Thanks for you patience, Michae ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: memcpy_cpu on 64bit arm
On Mon, 23 Jan 2023 at 14:15, Michael Grunditz wrote: > > > I have something that seems to work, even though I get a crash from > > test-log that I haven't solved. > > It could be because the .S file is built in every component. So the > > question is, where do I put it!?! > > It needs to live in "base", I guess. But I don't know how. The rest of > > the system doesn't resolve > > the symbol. > > > I added to base.mk .. seems ok , but it should be in a platform file :-) > Anyway init crashes somewhere. > > 2043 MiB RAM and 64533 caps assigned to init > no RM attachment (READ pf_addr=0x81 pf_ip=0x9f3f4 from pager_object: > pd='init' thread='init') > Warning: page fault, pager_object: pd='init' thread='init' ip=0x9f3f4 > fault-addr=0x81 type=no-page I *think* it fails right in start of first child. It seems ok around the starting. The last memcpy seems ok. I have printed both buffers and they are identical. /Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: memcpy_cpu on 64bit arm
> I have something that seems to work, even though I get a crash from > test-log that I haven't solved. > It could be because the .S file is built in every component. So the > question is, where do I put it!?! > It needs to live in "base", I guess. But I don't know how. The rest of > the system doesn't resolve > the symbol. I added to base.mk .. seems ok , but it should be in a platform file :-) Anyway init crashes somewhere. 2043 MiB RAM and 64533 caps assigned to init no RM attachment (READ pf_addr=0x81 pf_ip=0x9f3f4 from pager_object: pd='init' thread='init') Warning: page fault, pager_object: pd='init' thread='init' ip=0x9f3f4 fault-addr=0x81 type=no-page /Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: memcpy_cpu on 64bit arm
On Fri, 20 Jan 2023 at 20:15, Michael Grunditz wrote: > > > There is no particular reason why the implementation is (i.e. "was") > > empty. You can find a recent commit on the staging branch that applies a > > few obvious optimisations to all architectures, though: > > https://github.com/genodelabs/genode/commit/4d06661d7c3f7b798ec8228f04983bd4ae7cddcf > > > Is there any content in the commit? > > > For 32bit arm, I optimised the memcpy_cpu implementation a while ago > > (see Issue #4456). Interestingly, I could not see any improvements when > > using neon, at least on arm v7. I got the impression that the > > instruction density is not an issue when using the multi-word > > load/store (ldm/stm). > > Ok. I think that it makes more sense now. But yes for v7 it might not > help.The only > way , from my experience, neon could be used effectively is a > test/copy routine for > all sizes. Most arm/arm64 libc do that. > > I would like to try this. But I have no Idea where to put the .s file > in order to build it. > I don't want to have it inline since it is quite big.. I have something that seems to work, even though I get a crash from test-log that I haven't solved. It could be because the .S file is built in every component. So the question is, where do I put it!?! It needs to live in "base", I guess. But I don't know how. The rest of the system doesn't resolve the symbol. /Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: memcpy_cpu on 64bit arm
> There is no particular reason why the implementation is (i.e. "was") > empty. You can find a recent commit on the staging branch that applies a > few obvious optimisations to all architectures, though: > https://github.com/genodelabs/genode/commit/4d06661d7c3f7b798ec8228f04983bd4ae7cddcf > Is there any content in the commit? > For 32bit arm, I optimised the memcpy_cpu implementation a while ago > (see Issue #4456). Interestingly, I could not see any improvements when > using neon, at least on arm v7. I got the impression that the > instruction density is not an issue when using the multi-word > load/store (ldm/stm). Ok. I think that it makes more sense now. But yes for v7 it might not help.The only way , from my experience, neon could be used effectively is a test/copy routine for all sizes. Most arm/arm64 libc do that. I would like to try this. But I have no Idea where to put the .s file in order to build it. I don't want to have it inline since it is quite big.. Thanks, Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
memcpy_cpu on 64bit arm
Hello, Is there any particular reason why it is empty? My rect copy to fb in riscos uses neon. It is a speed gain of about 40% compared to word/long word copy from c. But I don't know how much it affects Genode. It seems like it ends up in /* eight bytes chunks */ but isn't that a byte copy? I have the feeling that in my case, with blit,mem copy without crop is faster than doing it with crop every time. Ram, accesses are proved to be very fast on this hardware. The extra cycles for cropping might be a bottleneck. Combined with a neon run through , testing and copying without leaving routine could probably make a big performance gain. But. I am happy, as always, to be proved wrong! Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: video and usb driver (rk3588)
OK so stupid me.. Invalidation should be after Blit. I don't know where my brain is :-) Thanks for reading! ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: video and usb driver (rk3588)
> > I have tested with full screen invalidate. It doesn't look pretty when > moving a window.. but mouse pointer > is ok. I have tried the below. Result: No traces if moving up , left > or right. Down , traces. So the start address > is wrong, probably. > > cache_clean_invalidate_data(xxx+invalid,(size.count()*sizeof(Pixel))-invalid); The imx8 doesn't use cached dma-buffer? Is there soeḿething (apart from imx53) that does use cached framebuffer? /Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: video and usb driver (rk3588)
On Thu, 19 Jan 2023 at 17:04, Michael Grunditz wrote: > > > > > It might be easier to (1) calculate both the start offset and the end > > offset, then (2) truncate the start offset to the cache-line size, (3) > > round the end offset to the cache-line size, (4) calculate the size > > argument by subtracting the start from the end offset. > > > > Regarding (2), when calculating the end offset via surface.w()*rect.y2() > > + rect.x2(), it will refer to the pixel at the lower-right corner of the > > dirty rectangle. You have to add 1 to this offset value, so that the > > subsequent subtraction yields the number of covered pixels, not the > > difference. E.g., think of a rectangle of only one pixel where p1 == p2. > > Here we want to flush the cache line around this pixel. The difference > > between the start and end offsets would be zero. But the number of > > covered pixels is one. > > I have tried with 16,32 and 64. Same result. Movement y wise makes > traces with mouse and bigger artifacts for windows. > These sorts of things are really my weak spot. > > int a=0; > int r=0; > a=64; > Genode::addr_t invalid = > (rect.x1()+(rect.y1()*(size.w(*sizeof(Pixel); > log("unaligned invalid: ",invalid); > > invalid = invalid&~63; > > Genode::addr_t endoffset = > (1+(size.w()*rect.y2())+ rect.x2())*sizeof(Pixel); > log("endoffset: ",endoffset); > > r = endoffset%a; > endoffset = r? endoffset + (a - r) : endoffset; > log("invalid: ",invalid); > log("invalidz: ",endoffset); > > Genode::addr_t xxx = (Genode::addr_t)surface.addr(); > > cache_clean_invalidate_data(xxx+invalid,endoffset-invalid); I have tested with full screen invalidate. It doesn't look pretty when moving a window.. but mouse pointer is ok. I have tried the below. Result: No traces if moving up , left or right. Down , traces. So the start address is wrong, probably. cache_clean_invalidate_data(xxx+invalid,(size.count()*sizeof(Pixel))-invalid); ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: video and usb driver (rk3588)
> > It might be easier to (1) calculate both the start offset and the end > offset, then (2) truncate the start offset to the cache-line size, (3) > round the end offset to the cache-line size, (4) calculate the size > argument by subtracting the start from the end offset. > > Regarding (2), when calculating the end offset via surface.w()*rect.y2() > + rect.x2(), it will refer to the pixel at the lower-right corner of the > dirty rectangle. You have to add 1 to this offset value, so that the > subsequent subtraction yields the number of covered pixels, not the > difference. E.g., think of a rectangle of only one pixel where p1 == p2. > Here we want to flush the cache line around this pixel. The difference > between the start and end offsets would be zero. But the number of > covered pixels is one. I have tried with 16,32 and 64. Same result. Movement y wise makes traces with mouse and bigger artifacts for windows. These sorts of things are really my weak spot. int a=0; int r=0; a=64; Genode::addr_t invalid = (rect.x1()+(rect.y1()*(size.w(*sizeof(Pixel); log("unaligned invalid: ",invalid); invalid = invalid&~63; Genode::addr_t endoffset = (1+(size.w()*rect.y2())+ rect.x2())*sizeof(Pixel); log("endoffset: ",endoffset); r = endoffset%a; endoffset = r? endoffset + (a - r) : endoffset; log("invalid: ",invalid); log("invalidz: ",endoffset); Genode::addr_t xxx = (Genode::addr_t)surface.addr(); cache_clean_invalidate_data(xxx+invalid,endoffset-invalid); ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: cpu id for big cpu 0x400
On Thu, 19 Jan 2023 at 14:36, Stefan Kalkowski wrote: > > Hello Michael, > > On Thu, Jan 19, 2023 at 01:33:57PM +0100, Michael Grunditz wrote: > > I did some more printing and the cpuid is 0x4 when passed into the > > el2->el1 switch. > > > > Maybe I should change number of cpus to 8, but not starting the others. > > > > This is what I would expect, and should be correct. Unfortunately it didn't help. I wonder, is it possible at all to boot up on the 5th cpu? /MIchael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: cpu id for big cpu 0x400
In message Michael Grunditz wrote: > On Thu, 19 Jan 2023 at 11:23, Stefan Kalkowski > wrote: >> >> Hello Michael, >> >> On Tue, Jan 17, 2023 at 11:14:52AM +0100, Michael Grunditz wrote: >>> Hi >>> >>> I am testing starting from the big cpu on rk3588. The cpu id is 0x400. >>> Starting is fine up to core entry. But there it stops. >>> EL switching works. >> >> I'm a bit puzzled what you mean exactly by "... fine up to core >> entry." In this case you do not mean CPU core, but Genode's core >> component entry, don't you? > Yes ,I meant the jump to Genode core. >> >>> >>> The question is , every other core is compared to NR_OF_CPUS, which is >>> from 0 and up. >>> What do I need to change? >> >> You have said cpu id is 0x400? Is this what `Cpu::current_core_id()` >> has returned? I'm wondering because the implementation should always >> return values below 256. Or do you mean the raw hardware value from >> register MPIDR? Could you please provide that register's value by >> printing Cpu::Mpidr::read()`? > 0x81000400 > This was printed with error(). Genode::raw gives me an assert in lock. >> >> Actually, this function is meant to map the CPU topology to a >> continuous range of natural numbers beginning from zero. > The thing is. U-boot starts at core 0x0. So in order to get to the > big cpu I need to do psci to power it up. The big cpu starts at > 0x400 ( from a psci point of view). > So I started the big cpu at the beginning. Every comparing is done > with NR_OF_CPUS. which obvisually is starting from 0 and up. > Correct me if I am wrong. > I actually didn't try the zeroing the regs when doing this. It could > actually be the problem, since after starting a new core, that core > needs some initial setup. > In riscos we have a function "init_arm" which does this. On rk3399 we > switch to the big cpu right at the start. > The cpu init in riscos is designed to work > without uboot. riscos has been around for quite some time :) > Originally it was a physical rom and definitely not with uboot. >> >>> >> >> This is what we try to do actually, but of course the environment >> bootstrap starts in depends on the state the bootloader has left us. >> The claim that for instance Linux kernel resets every possible system >> register isn't true either. > Sorry for being uneducated, in regards to the linux kernel. I like > to be corrected :-) >> We cannot forsee every potential hardware >> configuration, but of course things are getting more easy the more >> different SoC and boards are getting ported. > Ofcourse. Just thought that zeroing regs wouldn't hurt. > Is it possible to override the start file in a soc tree? I did some more printing and the cpuid is 0x4 when passed into the el2->el1 switch. Maybe I should change number of cpus to 8, but not starting the others. -- Best regards, Michael Grunditz ** ** ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: cpu id for big cpu 0x400
On Thu, 19 Jan 2023 at 11:23, Stefan Kalkowski wrote: > > Hello Michael, > > On Tue, Jan 17, 2023 at 11:14:52AM +0100, Michael Grunditz wrote: > > Hi > > > > I am testing starting from the big cpu on rk3588. The cpu id is 0x400. > > Starting is fine up to core entry. But there it stops. > > EL switching works. > > I'm a bit puzzled what you mean exactly by "... fine up to core > entry." In this case you do not mean CPU core, but Genode's core > component entry, don't you? Yes ,I meant the jump to Genode core. > > > > > The question is , every other core is compared to NR_OF_CPUS, which is > > from 0 and up. > > What do I need to change? > > You have said cpu id is 0x400? Is this what `Cpu::current_core_id()` > has returned? I'm wondering because the implementation should always > return values below 256. Or do you mean the raw hardware value from > register MPIDR? Could you please provide that register's value by > printing Cpu::Mpidr::read()`? 0x81000400 This was printed with error(). Genode::raw gives me an assert in lock. > > Actually, this function is meant to map the CPU topology to a > continuous range of natural numbers beginning from zero. The thing is. U-boot starts at core 0x0. So in order to get to the big cpu I need to do psci to power it up. The big cpu starts at 0x400 ( from a psci point of view). So I started the big cpu at the beginning. Every comparing is done with NR_OF_CPUS. which obvisually is starting from 0 and up. Correct me if I am wrong. I actually didn't try the zeroing the regs when doing this. It could actually be the problem, since after starting a new core, that core needs some initial setup. In riscos we have a function "init_arm" which does this. On rk3399 we switch to the big cpu right at the start. The cpu init in riscos is designed to work without uboot. riscos has been around for quite some time :) Originally it was a physical rom and definitely not with uboot. > > > > > This is what we try to do actually, but of course the environment > bootstrap starts in depends on the state the bootloader has left us. > The claim that for instance Linux kernel resets every possible system > register isn't true either. Sorry for being uneducated, in regards to the linux kernel. I like to be corrected :-) > We cannot forsee every potential hardware > configuration, but of course things are getting more easy the more > different SoC and boards are getting ported. Ofcourse. Just thought that zeroing regs wouldn't hurt. Is it possible to override the start file in a soc tree? Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: video and usb driver (rk3588)
On Thu, 19 Jan 2023 at 11:31, Stefan Kalkowski wrote: > I'm pretty sure that Norman did not want you to set the DMA buffer to > WRITE_COMBINED. Actually, this pseudo cache setting only exists for > historical reasons, and will get removed as soon as possible from the > public API. It is not really a 'cache feature'. It is not available on > ARM, but is simply mapped to UNCACHED. > > That means you have set your DMA buffers to UNCACHED, which obviously > solves cache maintainance problems to the price of performance. OK. Norman suggested the functions in chaćhe.h (invalidate). However no matter how I tried I got artifacts on screen. The best I could get was a mouse pointer that leaves traces on the screen. I also notice that moving pointer x-wise worked .. only y-wise didn't. Here is a bit of the code: Genode::addr_t invalid = (rect.x1()+(rect.y1()*(size.w(*sizeof(Pixel); Genode::addr_t invalidz =(((rect.h()-1)*(size.w()))+(rect.w()-1))*sizeof(Pixel)) Genode::addr_t xxx = (Genode::addr_t)surface.addr(); cache_clean_invalidate_data(xxx+invalid,(invalidz)); I guess the calculations are wrong.., if so please suggest what I should change. I noticed that rect.w() and hight added 1 to them. I have tried with -1 as above and without modification. Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: video and usb driver (rk3588)
> I have a display now and it is really fast! However clipping doesn't > work as it should. It doesn't crash but it makes graphics a bit blurry > if active, and so is mouse pointer. There is no speed gain with > clipping. Solved! I had "CACHE" as attribute for the dma buffer. I changed to WRITE_COMBINED now, and it all works! Thanks to Norman who suggested cache problems. ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
4K display
Hi! I am using u-boot to init graphics. U-boot uses edid, so I am reading the graphic chip to find out the screen mode. This works just fine in 1080p. But if I use my 4k monitor I get an unhandled exception. Is 4K a general problem? Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: cpu id for big cpu 0x400
On Tue, 17 Jan 2023 at 11:14, Michael Grunditz wrote: > > Hi > > I am testing starting from the big cpu on rk3588. The cpu id is 0x400. > Starting is fine up to core entry. But there it stops. > EL switching works. > > The question is , every other core is compared to NR_OF_CPUS, which is > from 0 and up. > What do I need to change? > > Michael > > ( will try now with core 1 , since obvisually core 0 isn't set up so > that el switching works. I still thinks we should do core init so that > we get a common state , regardless how u-boot leaves us. ) I am happy to say that el switching from e2 to el1 now works for core 0! I am clearing all standard regs (including fp regs) and hcr_el2,cptr_el2 in crt0.S Very happy!! ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
cpu id for big cpu 0x400
Hi I am testing starting from the big cpu on rk3588. The cpu id is 0x400. Starting is fine up to core entry. But there it stops. EL switching works. The question is , every other core is compared to NR_OF_CPUS, which is from 0 and up. What do I need to change? Michael ( will try now with core 1 , since obvisually core 0 isn't set up so that el switching works. I still thinks we should do core init so that we get a common state , regardless how u-boot leaves us. ) ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: ARM32 emulation rants
> I can run a program! I need to see if terminal can be configured to > echo , typing blindly as you can see. > I patched Terminal to echo input. Works like a charm. Perhaps should be a option? ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: ARM32 emulation rants
On Mon, 16 Jan 2023 at 12:53, Michael Grunditz wrote: > > Hello, > > Perhaps someone can tell me if it is possible to set a flush setting > on the log device. Right now it doesn't print everything ( and I > remember that from before) . Before I removed some extra printouts , > basic also displayed the available ram. I can do fflush in my SWI > catcher , but that isn't optimal. > > Michael I can run a program! I need to see if terminal can be configured to echo , typing blindly as you can see. http://micken.se/pix/genode_bbc_basic.jpg ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: ARM32 emulation rants
Hello, Perhaps someone can tell me if it is possible to set a flush setting on the log device. Right now it doesn't print everything ( and I remember that from before) . Before I removed some extra printouts , basic also displayed the available ram. I can do fflush in my SWI catcher , but that isn't optimal. Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: ARM32 emulation rants
On Mon, 16 Jan 2023 at 03:05, Michael Grunditz wrote: > > On Mon, 16 Jan 2023 at 02:42, Michael Grunditz > wrote: > > > > Hello > > > > I have managed to build unicorn and to some extent it works.. > > > > http://micken.se/pix/genode_unicorn.jpg > > > > The little piece of arm code has been emulated , put 0x1234 into R0. > > > > But as you can see there are a whole lot of issues. > > > > Is it possible to use Genode api inside a libc app? I hope so. > > > > > > Michael > > Much better , but the thumb tests fails big: > > http://micken.se/pix/genode_betteruni.jpg And behold , there is BASIC: http://micken.se/pix/genode_bbc.jpg ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: ARM32 emulation rants
On Mon, 16 Jan 2023 at 02:42, Michael Grunditz wrote: > > Hello > > I have managed to build unicorn and to some extent it works.. > > http://micken.se/pix/genode_unicorn.jpg > > The little piece of arm code has been emulated , put 0x1234 into R0. > > But as you can see there are a whole lot of issues. > > Is it possible to use Genode api inside a libc app? I hope so. > > > Michael Much better , but the thumb tests fails big: http://micken.se/pix/genode_betteruni.jpg ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
ARM32 emulation rants
Hello I have managed to build unicorn and to some extent it works.. http://micken.se/pix/genode_unicorn.jpg The little piece of arm code has been emulated , put 0x1234 into R0. But as you can see there are a whole lot of issues. Is it possible to use Genode api inside a libc app? I hope so. Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: static libm
On Mon, 16 Jan 2023 at 00:03, Pirmin Duss wrote: > > Hello Michael > > On 1/15/23 21:46, Michael Grunditz wrote: > > > > Turns out share build was user error .. somehow the link.txt gets > > multiple copies of .a files. However the link of libunciorn.so fails > > with undefined symbol main (from libposix.lib.so) > > > > Is it possible to build libraries at all? > > Building libraries isn't supported in the upstream Goa tool from Norman. > > I'm currently working on this and a draft that can build libraries when > the build system is `cmake` can be found at [1]. Other build systems > aren't tested, as I did not have any libraries to test with. > > This is still work in progress, as Norman did not review my changes yet. > There is a mailing list thread about this in [2]. > > > [1] https://github.com/trimpim/goa/tree/library_support > [2] https://lists.genode.org/pipermail/users/2022-November/008094.html Thanks will have a look! ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: static libm
On Sun, 15 Jan 2023 at 21:46, Michael Grunditz wrote: > > On Sun, 15 Jan 2023 at 21:15, Michael Grunditz > wrote: > > > > Hello! > > > > I am trying to build the unicorn cpu emulator with "goa"... Shared > > build bails out completely. Static seems to work , but I need a static > > libm. > > > > I tried to build one , setting SHARED_LIB=no, but it didn't work. > > > > Is it possible to get a static libm? > > > Turns out share build was user error .. somehow the link.txt gets > multiple copies of .a files. However the link of libunciorn.so fails > with undefined symbol main (from libposix.lib.so) > > Is it possible to build libraries at all? It would be a lot easier if > I could build everything static. I built it with the program , and I got the binary that can start. But it starts with following error (on screen) Error: no plugin found for fstat(1) ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: static libm
On Sun, 15 Jan 2023 at 21:15, Michael Grunditz wrote: > > Hello! > > I am trying to build the unicorn cpu emulator with "goa"... Shared > build bails out completely. Static seems to work , but I need a static > libm. > > I tried to build one , setting SHARED_LIB=no, but it didn't work. > > Is it possible to get a static libm? Turns out share build was user error .. somehow the link.txt gets multiple copies of .a files. However the link of libunciorn.so fails with undefined symbol main (from libposix.lib.so) Is it possible to build libraries at all? It would be a lot easier if I could build everything static. Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
static libm
Hello! I am trying to build the unicorn cpu emulator with "goa"... Shared build bails out completely. Static seems to work , but I need a static libm. I tried to build one , setting SHARED_LIB=no, but it didn't work. Is it possible to get a static libm? Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: video and usb driver (rk3588)
On Fri, 13 Jan 2023 at 16:51, Michael Grunditz wrote: > > On Fri, 13 Jan 2023 at 15:33, Michael Grunditz > wrote: > > > > OK .. so for framebuffer I took the imx53 driver and modified it to > > rockchip. > > From my understanding it does what I want. However, nothing happens. No > > error or anything. > After some tinkering I get it to start .. now I just need to fix the > actual write to video chip. I have a display now and it is really fast! However clipping doesn't work as it should. It doesn't crash but it makes graphics a bit blurry if active, and so is mouse pointer. There is no speed gain with clipping. With clipping: http://micken.se/pix/blurry_genode.jpg I really appreciate how the io mem is handled. At first I did it the hacky c way .. but then I looked into ipu.h from mx53 driver. It basically does everything automatically . ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: video and usb driver (rk3588)
On Fri, 13 Jan 2023 at 15:33, Michael Grunditz wrote: > > OK .. so for framebuffer I took the imx53 driver and modified it to rockchip. > From my understanding it does what I want. However, nothing happens. No > error or anything. After some tinkering I get it to start .. now I just need to fix the actual write to video chip. ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: video and usb driver (rk3588)
OK .. so for framebuffer I took the imx53 driver and modified it to rockchip. >From my understanding it does what I want. However, nothing happens. No error or anything. This is from my driver.config ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: video and usb driver (rk3588)
On Fri, 13 Jan 2023 at 09:51, wrote: > > > > > >> Kernel: MMU-fault not handled ESR=0x9261 > > > >> Kernel: init -> drivers -> gui_fb -> ep raised unhandled MMU fault > > > >> ip=0x1009bb4 fault-addr=0x113d76ac type=unknown > > > > Maybe the fault IP refers to some special (neon?) instruction with > > > tighter constraints? Have you had a look at the faulting instruction? > > > > > Sorry , for being uneducated, but is "ip" an instruction (doesn't make > > sense , isn't an opcode) > > or is it an address? If address, where can I look it up? > > I see you've already found/fixed the issue (congrats on your RiscOS > endeavour, always had a sweet spot for sixteen/thirty-two bits OS'es since > the 1990s), Thanks , it is a giant project.. and there are a lot of things that I haven't a clue how I should do -:) > but in case you still want the info: > I asked the same a few years back and was told about the > "(arch-name-here)-addr2line" gcc Genode toolchain utility. > So when a crash occurs, I substract the driver's base address, e.g. > > $ pc > > 0x1009bb4 - 0x1001000 > ... /bin/pc outputs the delta here ... I don't know how I get the base address. I have tried the addresses from bootlog and subtracted image base. > > And then I feed it to addr2line, with the path to the driver's "debug" > (not-stripped-of-symbols) binary, and get the function name and file and line > number. > Very convenient once you get the hang of it: > I only get ?0 from above About the alignment fault: I wonder if the clip function could be modified to round up. I am going to try that. It is very slow without some clipping. But if someone has a better idea , please tell me. Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: video and usb driver (rk3588)
On Thu, 12 Jan 2023 at 21:32, Michael Grunditz wrote: > > Update! > > It is the surface clipping that generates the fault (as expected) > commenting that out makes things work. > I guess it is slower without clipping. The movie: https://twitter.com/QtARM/status/1613638001573396480 ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: video and usb driver (rk3588)
Update! It is the surface clipping that generates the fault (as expected) commenting that out makes things work. I guess it is slower without clipping. ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: video and usb driver (rk3588)
On Thu, 12 Jan 2023 at 18:08, Norman Feske wrote: > > Hi Michael, > Hi , and thanks a lot for answer. > >> Kernel: MMU-fault not handled ESR=0x9261 > >> Kernel: init -> drivers -> gui_fb -> ep raised unhandled MMU fault > >> ip=0x1009bb4 fault-addr=0x113d76ac type=unknown > >> > >> But as you can see , if I move the mouse pointer I get that ESR after > >> the pointer moves a small amount of pixels. and graphics stops. > > I am bit confused by the role of the gui_fb component in your scenario. > Since we introduced the 'Capture' session in 20.08 [1], this component > (and more generally the 'Framebuffer' session interface) should no > longer be needed for most GUI scenarios. Only in scenarios where > nitpicker is used in a nested way (Sculpt's Leitzentrale, demo.run), the > gui_fb component serves a purpose nowadays. > Sorry it is just a name that managed to creep into my drivers.config. Could be any name. The component gui_fb is not part of the build. > A modern framebuffer driver should be a mere client of the 'Capture' > service provided by the nitpicker GUI server. > I am using the "boot" driver. > BTW, the official way to obtain a contiguous RAM buffer (for the use as > framebuffer) is platform driver. For a 'Dma_buffer' object, you can > request the 'dma_addr' [2] to be poked into the graphics device register > for the framebuffer base address. > > [1] > https://genode.org/documentation/release-notes/20.08#The_GUI_stack__restacked > [2] > https://github.com/genodelabs/genode/blob/master/repos/os/include/platform_session/dma_buffer.h > Will try this after every other option :-) I doubt it will solve alignment fault. > > Some more info. The crash is in the copy to fb ... > > _captured_screen.apply_to_surface(surface); > > It fails right away when moving the mouse. I have checked the size and > > it is always the same and the fault address is half way in (~ about > > where the mouse pointer is). I don't understand. The driver samples > > from screen and writes to fb. It is done with a timer , so I can't see > > how it can be affected by changes in screen. > > Another thing is that it might get interrupted by the usb interrupt, > > but it seems quite unlikely. ESR is still unaligned write. I can > > provoke it directly with a odd size. > > Generally speaking, while blitting 32-bit pixels, pixels may be > read/written at 32-bit boundaries. When moving the mouse cursor to an > uneven position, the 16x16 pixels of the mouse cursor are copied from/to > a 32-bit aligned (not 64-bit aligned) position. > Well ,shouldn't be a problem. > The symptom reminds me of [3] (allowing unaligned memory accesses in > user space), but why would that configuration be ineffective in your > case? I doubt that it is related. The "A" bit is set to '0'. > Maybe the fault IP refers to some special (neon?) instruction with > tighter constraints? Have you had a look at the faulting instruction? > Sorry , for being uneducated, but is "ip" an instruction (doesn't make sense , isn't an opcode) or is it an address? If address, where can I look it up? Thanks , again. USB is currently a mess. I started from older imx8 driver which depends on u-boot to start. I use u-boot "usb start" before boot. But it works :-) Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: video and usb driver (rk3588)
On Thu, 12 Jan 2023 at 03:19, Michael Grunditz wrote: > > Hello! > > I have USB working: > [init -> drivers -> usb_hid_drv] dev_info: input: USB HID v1.00 Mouse > [HID 04b4:0060] on usb-usbbus-/input0 > [init -> drivers -> usb_hid_drv] dev_info: input: USB HID v1.00 Device > [HID 04b4:0060] on usb-usbbus-/input1 > Kernel: MMU-fault not handled ESR=0x9261 > Kernel: init -> drivers -> gui_fb -> ep raised unhandled MMU fault > ip=0x1009bb4 fault-addr=0x113d76ac type=unknown > > But as you can see , if I move the mouse pointer I get that ESR after > the pointer moves a small amount of pixels. and graphics stops. > > I have no idea why. The framebuffer, which is defined by u-boot, is > above the specified RAM. I get the expected graphics , so it works > that far. Two things can crash it. > 1) The Mouse > 2) Scout. > > I really want to add my own framebuffer using genode allocated ram.. > it might help. But I don't know how. > Some more info. The crash is in the copy to fb ... _captured_screen.apply_to_surface(surface); It fails right away when moving the mouse. I have checked the size and it is always the same and the fault address is half way in (~ about where the mouse pointer is). I don't understand. The driver samples from screen and writes to fb. It is done with a timer , so I can't see how it can be affected by changes in screen. Another thing is that it might get interrupted by the usb interrupt, but it seems quite unlikely. ESR is still unaligned write. I can provoke it directly with a odd size. Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
video and usb driver (rk3588)
Hello! I have USB working: [init -> drivers -> usb_hid_drv] dev_info: input: USB HID v1.00 Mouse [HID 04b4:0060] on usb-usbbus-/input0 [init -> drivers -> usb_hid_drv] dev_info: input: USB HID v1.00 Device [HID 04b4:0060] on usb-usbbus-/input1 Kernel: MMU-fault not handled ESR=0x9261 Kernel: init -> drivers -> gui_fb -> ep raised unhandled MMU fault ip=0x1009bb4 fault-addr=0x113d76ac type=unknown But as you can see , if I move the mouse pointer I get that ESR after the pointer moves a small amount of pixels. and graphics stops. I have no idea why. The framebuffer, which is defined by u-boot, is above the specified RAM. I get the expected graphics , so it works that far. Two things can crash it. 1) The Mouse 2) Scout. I really want to add my own framebuffer using genode allocated ram.. it might help. But I don't know how. Please advise, Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Drivers and such things (the rk3588 port)
On Tue, 10 Jan 2023 at 08:57, Michael Grunditz wrote: > > On Mon, 9 Jan 2023 at 22:31, Michael Grunditz > wrote: > > > > On Mon, 9 Jan 2023 at 16:45, Michael Grunditz > > wrote: > > > > > > Runing run/wm > > > No USB so no interaction,, but happy that it works at all. > > > https://twitter.com/QtARM/status/1612474867282247682 > > > > With run/demo > > http://micken.se/pix/genode_quartzpro64.jpg > > > > But.. I get mmu fault from framebuffer ... not good at all. > > MMU fault seems to happen if I start scout. Launcher works. I don't > understand how a task can provoke mmu error in framebuffer. > > Kernel: init -> drivers -> gui_fb -> ep raised unhandled MMU fault > ip=0x1009bd4 fault-addr=0x1117f3b4 type=unk > nown https://esr.arm64.dev/#0x9261 Alignment fault. ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Drivers and such things (the rk3588 port)
On Mon, 9 Jan 2023 at 22:31, Michael Grunditz wrote: > > On Mon, 9 Jan 2023 at 16:45, Michael Grunditz > wrote: > > > > Runing run/wm > > No USB so no interaction,, but happy that it works at all. > > https://twitter.com/QtARM/status/1612474867282247682 > > With run/demo > http://micken.se/pix/genode_quartzpro64.jpg > > But.. I get mmu fault from framebuffer ... not good at all. MMU fault seems to happen if I start scout. Launcher works. I don't understand how a task can provoke mmu error in framebuffer. Kernel: init -> drivers -> gui_fb -> ep raised unhandled MMU fault ip=0x1009bd4 fault-addr=0x1117f3b4 type=unk nown ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Drivers and such things (the rk3588 port)
On Mon, 9 Jan 2023 at 16:45, Michael Grunditz wrote: > > Runing run/wm > No USB so no interaction,, but happy that it works at all. > https://twitter.com/QtARM/status/1612474867282247682 With run/demo http://micken.se/pix/genode_quartzpro64.jpg But.. I get mmu fault from framebuffer ... not good at all. ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Drivers and such things (the rk3588 port)
Runing run/wm No USB so no interaction,, but happy that it works at all. https://twitter.com/QtARM/status/1612474867282247682 ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Drivers and such things (the rk3588 port)
On Mon, 9 Jan 2023 at 15:49, Michael Grunditz wrote: > > Yes I was ... the problem in not knowing exactly whats where and why :) > > I get the "blue" background now. test-fb_bench can't create framebuffer-session. Bootlog Genode 22.11 8189 MiB RAM and 64533 caps assigned to init [init -> drivers] parent provides [init -> drivers] service "IRQ" [init -> drivers] service "IO_MEM" [init -> drivers] service "ROM" [init -> drivers] service "PD" [init -> drivers] service "RM" [init -> drivers] service "CPU" [init -> drivers] service "LOG" [init -> drivers] service "Timer" [init -> drivers] service "Capture" [init -> drivers] service "Event" [init -> test-fb_bench] --- Framebuffer benchmark --- [init -> drivers] child "gui_fb" [init -> drivers] RAM quota: 40712K [init -> drivers] cap quota: 216 [init -> drivers] ELF binary: boot_fb_drv [init -> drivers] priority: 0 [init -> drivers] provides service Framebuffer [init -> drivers] provides service Input [init -> test-fb_bench] Error: Framebuffer-session creation failed (ram_quota=8192, cap_quota=3) [init -> test-fb_bench] Error: Uncaught exception of type 'Genode::Service_denied' [init -> test-fb_bench] Warning: abort called - thread: ep [init -> drivers -> gui_fb] using boot framebuffer: 1920x1080x32 @ 0xed80 type=1 pitch=7680 I have tried to add the service in routing for test-fb_bench like this: Also to recap the first mail in thread. The best for the graphicdriver would be if I allocate the framebuffer in genode and put that into chip. So the question is relevant. Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Drivers and such things (the rk3588 port)
Yes I was ... the problem in not knowing exactly whats where and why :) I get the "blue" background now. ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Drivers and such things (the rk3588 port)
> Thanks .. it did help for the driver ,but I am still facing memory errors: > > Genode 22.11 > 8189 MiB RAM and 64533 caps assigned to init > [init -> test-fb_bench] --- Framebuffer benchmark --- > [init] Warning: gui_fb: RAM upgrade of Capture failed > [init] child "gui_fb" requests resources: ram_quota=8100K > [init -> drivers] Warning: drivers: configured RAM exceeds available > RAM, proceed with 123264244 > [init -> drivers] Warning: drivers: configured caps exceed available > caps, proceed with 1279 > [init -> drivers] Warning: nitpicker: configured RAM exceeds available > RAM, proceed with 0 > [init -> drivers] Warning: nitpicker: configured caps exceed available > caps, proceed with 0 > [init -> drivers] Error: allocation of read-write segment failed > [init -> drivers] Error: nitpicker: out of RAM during ELF loading > [init -> drivers] Error: Uncaught exception of type > 'Genode::Quota_guard::Limit_exceeded' > [init -> drivers] Warning: abort called - thread: ep I just remembered.. I removed " " If I have that I get: [init -> drivers] Error: ROM-session creation failed (ram_quota=6144, cap_quota=3, label="config") [init -> drivers] Error: Could not open ROM session for "config" [init -> drivers] Error: ROM-session creation failed (ram_quota=6144, cap_quota=3, label="config") [init -> drivers] Error: Could not open ROM session for "config" [init -> drivers] Error: Uncaught exception of type 'Genode::Rom_connection::Rom_connection_failed' [init -> drivers] Warning: abort called - thread: ep So. Maybe I am missing something essential? ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Drivers and such things (the rk3588 port)
On Mon, 9 Jan 2023 at 11:23, Alexander Boettcher wrote: > > there is already a platform_info ROM generated by core (roottask), which > would collide with this one (so only one of both would be accessible). > The one option is to add this information directly to the generated > platform_info in core, e.g. > look for Platform::_init_additional_platform_info() in repos/base-hw. > The other option is to name your platform_info differently and use the > re-labeling feature of Genode's init to refer to your version of the > platform_info, e.g something alike: > > --- a/repos/os/run/fb_bench.run > +++ b/repos/os/run/fb_bench.run > @@ -20,7 +20,7 @@ import_from_depot [depot_user]/src/[base_src] \ > [depot_user]/src/nitpicker \ > [depot_user]/src/gui_fb \ > [depot_user]/src/init > -build { test/fb_bench } > +build { test/fb_bench drivers/framebuffer/boot } > > install_config { > > @@ -70,10 +70,12 @@ install_config { > > > > + > >name="Input"/> > > > + label="platform_info_my"/> > > > > > @@ -94,7 +96,16 @@ set fd [open [run_dir]/genode/focus w] > puts $fd " \" domain=\"default\"/>" > close $fd > > -build_boot_image { test-fb_bench } > +set fd [open [run_dir]/genode/platform_info_my w] > +puts $fd { > + > + > +bpp="32" type="1"/> > + > +} > +close $fd > + > +build_boot_image { test-fb_bench boot_fb_drv } > > Hope it helps, Thanks .. it did help for the driver ,but I am still facing memory errors: Genode 22.11 8189 MiB RAM and 64533 caps assigned to init [init -> test-fb_bench] --- Framebuffer benchmark --- [init] Warning: gui_fb: RAM upgrade of Capture failed [init] child "gui_fb" requests resources: ram_quota=8100K [init -> drivers] Warning: drivers: configured RAM exceeds available RAM, proceed with 123264244 [init -> drivers] Warning: drivers: configured caps exceed available caps, proceed with 1279 [init -> drivers] Warning: nitpicker: configured RAM exceeds available RAM, proceed with 0 [init -> drivers] Warning: nitpicker: configured caps exceed available caps, proceed with 0 [init -> drivers] Error: allocation of read-write segment failed [init -> drivers] Error: nitpicker: out of RAM during ELF loading [init -> drivers] Error: Uncaught exception of type 'Genode::Quota_guard::Limit_exceeded' [init -> drivers] Warning: abort called - thread: ep ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Drivers and such things (the rk3588 port)
On Mon, 9 Jan 2023 at 01:01, Michael Grunditz wrote: > > Hello, > > 1, Is there a generic ehci and xhci driver that I can pass my > initialised controller address and irq number to? > 2, I need to map a physical address and the other way , I need the > physical address of a buffer. > > I don't have my older projects online (we have moved and my networking > infrastructure is very limited), and I don't remember how I did it for > starting riscos on the second core. That mapped a buffer to physical > address, > > If question 1 is a positive answer , I have usb working ( I hope) > If question 2 "can be done" I have graphics, although not in a driver yet. > > /Michael A quick follow up : I have tried the "boot" framebuffer driver. But I cant get the ram config in the run file to work. I am testing with fb_bench. In theory video output should work , I have initialised the hardware in uboot and can fill the screen with the "mw.l" command. However I am a bit unsure how to write the platform_info tag. I added this to the runfile et fd [open [run_dir]/genode/platform_info w] puts $fd { } close $fd apart from this run file is unchanged. ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Drivers and such things (the rk3588 port)
Hello, 1, Is there a generic ehci and xhci driver that I can pass my initialised controller address and irq number to? 2, I need to map a physical address and the other way , I need the physical address of a buffer. I don't have my older projects online (we have moved and my networking infrastructure is very limited), and I don't remember how I did it for starting riscos on the second core. That mapped a buffer to physical address, If question 1 is a positive answer , I have usb working ( I hope) If question 2 "can be done" I have graphics, although not in a driver yet. /Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
A confession for 2023
Hello Genodians! I have something to confess, I am still in love with the traditional desktop. Especially the one that can be found in RISC OS. RISC OS is a *very* different system compared with Genode. It (RISC OS) is insecure by design and the kernel is written in ARM assembly. It is a single tasking os , but the WiMP system adds cooperative multitasking. The system is driven around with SWI's (software interrupts). This might sound archaic and to some extent it is. But it is probably the fastest desktop system around. Most programs have the minimal RAM requirement set to 4M, so a very low footprint. It is also tied to ARM32 cpus. Acorn in England, which invented RISC OS also invented the ARM cpu. In my opinion RISC OS is good as it is. When I say insecure, I mean that there is no isolation between the components. I actually like that because it gives me freedom as a coder to do whatever I like. So.. Genode.. RISC OS will not work on future ARM cores because of end of line for aarch32 compatible cores. It can't easily be ported because of its design. My vision is to make a hybrid system with Genode and RISC OS. In my opinion both systems can gain from it. RISC OS gets modernised ways of security and other things that probably never will work in a traditional setup. Genode would gain a desktop as an alternative to Sculpt. This is a giant project that involves just about all aspects of an operating system. A little list of where I intend to begin: * Make Genode running on a 64bit only core, Ihave chosen the Rockchip RK3588 SoC because I have a board and that it features a lot of nice things. * Find a good way to run 32bit arm code. I am looking at the Unicorn cpu emulator. I have done some tests with it and it seems to be ok. The only drawback is the lack of *none* 1:1 mmu mappings. RISC OS relies on mmu fully functional. I have no way of solving that at the moment except to redevice it, a very difficult task. * Establish ways of protocols for communication with the RISC OS layer and core Genode. I will start alone , but if the project takes off I will invite others. I have no other coding projects planned for 2023, so this will be the one! Happy Hacking! Michael (I am micken on irc , say hello if you want! ) ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: RK3588 part X small success.
On Thu, 5 Jan 2023 at 09:29, Stefan Kalkowski wrote: > > Hello Michael, > > I try to summarize what I understood from your previous e-mails: > Thanks for reading! :-) > * u-boot normally starts on the RK3588 SoC in EL2 with MMU enabled, > and enabled caches True > * when using the unchanged Genode base-hw bootstrap code, you then > stuck when issuing a Genode::raw (how do you know, it is exactly > that point? does it provoke an exception shown by u-boot? and if yes > what kind of exception?) I get a dump (Exception from an unknown reason). I can write characters to uart, phys address. (*ser='m') So I know it crashes on genode api . I have a couple of raw printouts and I get crash if mmu is disabled and no crash if I comment them out. > * when removing the MMU disabling within the bootstrap assembler code, > you can proceed, and you see Genode::raw messages > Yes. But no luck with EL switching. > Is this correct? > > If the MMU disabling is the important point with regard to the UART > usage (if this is 100% the issue), either u-boot doesn't setup 1:1 > physical to virtual mappings, which is less probable, or the > page-table attributes for the I/O memory mapping of the UART is > essential for the way it is used. > The last option. I need to dig a bit more into this. If starting in EL1, which makes Genode to boot up, I get crash from mmu disabling. Uboot sets sctlr_el1to disabled. https://github.com/u-boot/u-boot/blob/master/arch/arm/include/asm/macro.h#L273. It doesn't make sense. Thanks Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: Roadmap 2023
The year 2023 will probably be the most Genode intensive year for me since forever. I have already shared my plans for doing 32bit emulation. Apart from this I would like to bring in a lot of features for my ,yet humble, RK3588 port. I have no other coding projects going on. I will probably start with graphics and usb. The vendor uboot pokes both , so it should be quite easy to get something up based on what is setup in uboot. Another thing that I mentioned . is to add a cpu reinitialisation for aarch64 targets. I am very impressed by everything related to PinePhone so that is what I will remember most from 2022. So 2023, the year of happy Genode hacking! Cheers Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: RK3588 part X small success.
On Wed, 4 Jan 2023 at 21:54, Michael Grunditz wrote: > > When started in EL1. I assume I need to copy the settings from the > setup of EL1 to EL2 or something.. I still would like a proper cpu > init ( really bad so I might go ahead with it). > > kernel initialized > ROM modules: > ROM: [0558,05580156) config > ROM: [0048a000,0048b000) core_log > ROM: [05634000,0567b5f8) init > ROM: [05588000,056335f8) ld.lib.so > ROM: [00488000,00489000) platform_info > ROM: [05581000,05587260) test-log > > Genode 22.11 > 125 MiB RAM and 64533 caps assigned to init > [init -> test-log] hex range: [0e00,1680) > [init -> test-log] empty hex range:[0abc,0abc) (empty!) > [init -> test-log] hex range to limit: [f8,ff] > [init -> test-log] invalid hex range: [f8,08) (overflow!) > [init -> test-log] negative hex char: 0xfe > [init -> test-log] positive hex char: 0x02 > [init -> test-log] floating point: 1.70 > [init -> test-log] multiarg string:"parent -> child.7" > [init -> test-log] String(Hex(3)): 0x3 > [init -> test-log] Very long messages: > [init -> test-log -> log] > 1..2 > [init -> test-log] > 3.4 > [init -> test-log] > 5.6 > [init -> test-log] > [init -> test-log] Test done. More fun with screenshot : https://twitter.com/QtARM/status/161074657336836 ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
RK3588 part X small success.
When started in EL1. I assume I need to copy the settings from the setup of EL1 to EL2 or something.. I still would like a proper cpu init ( really bad so I might go ahead with it). kernel initialized ROM modules: ROM: [0558,05580156) config ROM: [0048a000,0048b000) core_log ROM: [05634000,0567b5f8) init ROM: [05588000,056335f8) ld.lib.so ROM: [00488000,00489000) platform_info ROM: [05581000,05587260) test-log Genode 22.11 125 MiB RAM and 64533 caps assigned to init [init -> test-log] hex range: [0e00,1680) [init -> test-log] empty hex range:[0abc,0abc) (empty!) [init -> test-log] hex range to limit: [f8,ff] [init -> test-log] invalid hex range: [f8,08) (overflow!) [init -> test-log] negative hex char: 0xfe [init -> test-log] positive hex char: 0x02 [init -> test-log] floating point: 1.70 [init -> test-log] multiarg string:"parent -> child.7" [init -> test-log] String(Hex(3)): 0x3 [init -> test-log] Very long messages: [init -> test-log -> log] 1..2 [init -> test-log] 3.4 [init -> test-log] 5.6 [init -> test-log] [init -> test-log] Test done. ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: arm_64 exception vector and el2 stack
> Running out of ideas. I see now , after upgrading sourcetree to the latest release, that MMU is disabled in ctr0.s. Doing that made Genode::raw stop working and no difference in EL switching. I am thinking.. I tried to disable dcache in uboot before.. which should turn mmu off. But since it now is disabled in genode startup I can't see that necessary. I would like to see a bit more ARM init in Genode /base-hw . Would be nice to turn everything off and then bring in the wanted functionality. That would make a common ground. In my case there are a bunch of blobs running before uboot. I don't have control over them at all. It can boot linux, but linux does a complete setup of cpu last time I looked. u-boot runs in el2, caches and mmu is on. The blobs are the only difference from what I did on rk3399, besides different ARM core. .. Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: arm_64 exception vector and el2 stack
On Tue, 3 Jan 2023 at 17:20, Michael Grunditz wrote: > > > I figured that. It is just that I was unsure about el2_stack because > > of , set before mmu. > and apparently I ignored the sctlr settings :-) OK so here is what I have now.. The code for EL switch with comments: asm volatile("mov x0, sp \n" ** current phys sp "msr sp_el1, x0 \n" ** set el1 sp "adr x0, 1f \n" *point out return point "msr elr_el2, x0 \n" * set it "mov sp, %0 \n" *** set virtual sp el2 "eret\n" *** exception return "1: \n" ** return point "ldr x0,=0xfeb5\n" ** uart address "mov x1,#'m' \n"** write to it "str x1,[x0] ": : "r"(stack_el2): "x0","x1"); Before this I added: Genode::addr_t const oldvbar = Cpu::Vbar_el2::read(); Cpu::Vbar_el1::write(oldvbar); ... and it is from uboot. I hope el1 will get it with that last statement. I get nothing on uart.. and no exception catched. The whole point of writing to uart with asm is to test if it is the exit to c++ that fails. Running out of ideas. /Michael ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Re: u-boot requirements for genode
On Tue, 3 Jan 2023 at 15:59, Stefan Kalkowski wrote: > > Hello Michael, > > > On Fri, Dec 30, 2022 at 02:49:25AM +0100, Michael Grunditz wrote: > > Hello > > > > I would like to know the requirements from u-boot in order to properly > > start genode. > > in general Genode's base-hw kernel can boot from different > environments that u-boot might provide. This depends on the platform resp. > board. The generic Cortex-A53 bootstrap code used by rpi3, i.MX8, and > allwinner64 assumes that u-boot started the kernel (or better: > bootstrap code) in the EL3, EL2, or EL1 mode, although the latter one > is not used as start mode by any of these boards if I remember > correctly. > The only requirement is that the ELF binary was setup correctly, that > all peripherals used (e.g. the UART) are accessible in this mode (e.g. > when switching from secure to normal world before). > OK. Good to know. > Have you tried the following after loading the Genode system's uImage > to "load_addr": > > bootm start ${load_addr}; bootm loados; bootm go; > I think(!) I tried that. Gives me a crashdump from uboot. > I don't think this is a good idea, because probably u-boot does not > setup the EL2 mode properly here then. Although I'm not sure. To stay > safe, I would not try to eagerly degrade the privilege level. > Moreover, you won't be able to use the hypervisor functionality. > True. > > Do I understand you correctly that the UART in principle works in the > Genode bootstrap code, but not if you enforce u-boot to switch to EL1 > before? If this is the case, you probably have no baud-rate issue > here?! > Yea. I must have dreamt :-) ___ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users