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
On Mon, 9 Jan 2023 at 01:01, Michael Grunditz michael.grunditz@gmail.com 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 { <platform_info> <boot> <framebuffer phys="0xed800000" width="1920" height="1080" bpp="32"/> </boot> </platform_info> } close $fd
apart from this run file is unchanged.
Hello,
On 09.01.23 05:24, Michael Grunditz wrote:
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 { <platform_info> <boot> <framebuffer phys="0xed800000" width="1920" height="1080" bpp="32"/> </boot>
</platform_info> } close $fd
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 { <config> @@ -70,10 +70,12 @@ install_config { </start>
<start name="gui_fb"> + <binary name="boot_fb_drv"/> <resource name="RAM" quantum="4M"/> <provides> <service name="Framebuffer"/> <service name="Input"/> </provides> <config/> <route> + <service name="ROM" label="platform_info"> <parent label="platform_info_my"/> </service> <service name="Gui"> <child name="nitpicker"/> </service> <any-service> <parent/> <any-child/> </any-service> </route> @@ -94,7 +96,16 @@ set fd [open [run_dir]/genode/focus w] puts $fd "<focus label="gui_fb -> " domain="default"/>" close $fd
-build_boot_image { test-fb_bench } +set fd [open [run_dir]/genode/platform_info_my w] +puts $fd { +<platform_info> + <boot> + <framebuffer phys="0xed800000" width="1920" height="1080" bpp="32" type="1"/> + </boot> +</platform_info>} +close $fd + +build_boot_image { test-fb_bench boot_fb_drv }
Hope it helps,
Alex.
On Mon, 9 Jan 2023 at 11:23, Alexander Boettcher alexander.boettcher@genode-labs.com 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 {
<config> @@ -70,10 +70,12 @@ install_config { </start>
<start name="gui_fb">
<binary name="boot_fb_drv"/> <resource name="RAM" quantum="4M"/> <provides> <service name="Framebuffer"/> <service name="Input"/> </provides> <config/> <route>
<service name="ROM" label="platform_info"> <parent label="platform_info_my"/> </service> <service name="Gui"> <child name="nitpicker"/> </service> <any-service> <parent/> <any-child/> </any-service> </route>
@@ -94,7 +96,16 @@ set fd [open [run_dir]/genode/focus w] puts $fd "<focus label="gui_fb -> " domain="default"/>" close $fd
-build_boot_image { test-fb_bench } +set fd [open [run_dir]/genode/platform_info_my w] +puts $fd { +<platform_info>
<boot>
<framebuffer phys="0xed800000" width="1920" height="1080" bpp="32" type="1"/>
</boot>
+</platform_info>} +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_guardGenode::Cap_quota::Limit_exceeded' [init -> drivers] Warning: abort called - thread: ep
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_guardGenode::Cap_quota::Limit_exceeded' [init -> drivers] Warning: abort called - thread: ep
I just remembered.. I removed " <service name="ROM" label="config"> <parent label="drivers.config"/> </service>" 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?
Yes I was ... the problem in not knowing exactly whats where and why :)
I get the "blue" background now.
On Mon, 9 Jan 2023 at 15:49, Michael Grunditz michael.grunditz@gmail.com 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 @ 0xed800000 type=1 pitch=7680
I have tried to add the service in routing for test-fb_bench like this: <service name="Framebuffer"> <child name="gui_fb"/></service>
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
Runing run/wm No USB so no interaction,, but happy that it works at all. https://twitter.com/QtARM/status/1612474867282247682
On Mon, 9 Jan 2023 at 16:45, Michael Grunditz michael.grunditz@gmail.com 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.
On Mon, 9 Jan 2023 at 22:31, Michael Grunditz michael.grunditz@gmail.com wrote:
On Mon, 9 Jan 2023 at 16:45, Michael Grunditz michael.grunditz@gmail.com 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
On Tue, 10 Jan 2023 at 08:57, Michael Grunditz michael.grunditz@gmail.com wrote:
On Mon, 9 Jan 2023 at 22:31, Michael Grunditz michael.grunditz@gmail.com wrote:
On Mon, 9 Jan 2023 at 16:45, Michael Grunditz michael.grunditz@gmail.com 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/#0x92000061
Alignment fault.