Go to advanced search

by Schnoogle
Wed Nov 24, 2021 3:52 pm
Forum: Bare metal, Assembly language
Topic: Raspberry Zero 2 - Multicore contention?
Replies: 21
Views: 1188

Re: Raspberry Zero 2 - Multicore contention?

Hi there,

my first question would be how you implemented the semaphore/mutex to ensure exclusive access to your pipeline?
As one of the cores might end up in a spinlock to wait for access to the pipeline could be one source of your jitter.

BR
Schnoogle
by Schnoogle
Mon Nov 15, 2021 9:51 am
Forum: Bare metal, Assembly language
Topic: Mailbox Interface Difficulties
Replies: 3
Views: 295

Re: Mailbox Interface Difficulties

Hi, I've cross-checked on my Pi3 Model B+. It seems, your response is just fine. [28, 0x80000000, 0x10001, 4, 0x80000004, 0] The 0x80000000 indicates a successful response. The 0x80000004 indicates it's a response with the response size of 4 bytes And the value of 0x0 seems just fine.... When I run ...
by Schnoogle
Sat Nov 13, 2021 10:36 am
Forum: Bare metal, Assembly language
Topic: RPi 4B - MMU config with "high-peri" profile
Replies: 8
Views: 479

Re: RPi 4B - MMU config with "high-peri" profile

Hi, sure - it's quite a bit, but here we go. Let's start with the config.txt arm_64bit=1 # define peripheral address start at 0xFE00_0000 arm_peri_high=1 # fix the core frequency driving the miniUART to get a stable BAUD core_freq=500 core_freq_min=500 # custom boot stub to do the EL3 preparation st...
by Schnoogle
Fri Nov 12, 2021 10:21 pm
Forum: Bare metal, Assembly language
Topic: RPi 4B - MMU config with "high-peri" profile
Replies: 8
Views: 479

Re: RPi 4B - MMU config with "high-peri" profile

Hey to both of you, actually I‘m running without any device-tree set and I‘m aware that I need to provide my own arm-stub in this setup. This is all done and the high-peri profile works just fine and I can access GPIO, miniUART and the like. BUT only with the MMU disabled . As soon as I enable the M...
by Schnoogle
Fri Nov 05, 2021 9:32 pm
Forum: Bare metal, Assembly language
Topic: Bare metal access to camera in Pi3 or Pi4 ?
Replies: 8
Views: 517

Re: Bare metal access to camera in Pi3 or Pi4 ?

Hi, as far as I remember Ultibo and Circle+ beeing both RPi bare-metal OS frameworks does have some support of the VCHIQ and MMAL interfaces that are used to access the RPi Camera module. You might want to check them out. So in principle it is possible on bare metal to access the camera module, even...
by Schnoogle
Fri Nov 05, 2021 9:27 pm
Forum: Bare metal, Assembly language
Topic: Mailbox Interface Difficulties
Replies: 3
Views: 295

Re: Mailbox Interface Difficulties

Hi there, whether the device tree is in place or not does not/should not have any impact on how the mailbox property tag interface works. The buffer you prepare for the single message is filled incorrectly as far as I can tell. I assume that your buffer is an array of u32 values. check the details h...
by Schnoogle
Sun Oct 31, 2021 3:51 pm
Forum: Bare metal, Assembly language
Topic: RPi 4B - MMU config with "high-peri" profile
Replies: 8
Views: 479

Re: RPi 4B - MMU config with "high-peri" profile

Hi there, pushing this up :oops: Is there no one who has tried high-peri mode? I did not find any references in either Ultibo or Circle++ so I assume they both run in low-peri mode in the Pi4... Is there someone from RPi "engineering" who might be allowed to shed some light what might make...
by Schnoogle
Sun Oct 31, 2021 3:36 pm
Forum: Bare metal, Assembly language
Topic: Bare metal study kernel, can't run on upper space TTBR1.
Replies: 14
Views: 641

Re: Bare metal study kernel, can't run on upper space TTBR1.

Now, could you please elaborate a bit more when you say that adding 0xfffffff000000000 to the linker script messes things up? I am not used to this script, so there is definitely something I am missing. What I can tell you is that __image_end is at 0x96000, I am not sure that is unnecessary large. ...
by Schnoogle
Sat Oct 30, 2021 3:55 pm
Forum: Bare metal, Assembly language
Topic: Bare metal study kernel, can't run on upper space TTBR1.
Replies: 14
Views: 641

Re: Bare metal study kernel, can't run on upper space TTBR1.

Hi there, I'm still trying to understand what you are trying to finally achieve with your MMU setup. So I'm guessing you want your kernel part to be accessible from the "upper" memory locations from 0xFFFF_F800_0000_0000 up to 0xFFFF_FFFF_FFFF_FFFF. I'm anything but an expert in the whole ...
by Schnoogle
Sat Oct 23, 2021 6:15 pm
Forum: Bare metal, Assembly language
Topic: RPi 4B - MMU config with "high-peri" profile
Replies: 8
Views: 479

RPi 4B - MMU config with "high-peri" profile

Hi there, I'm running my RPi 4B preferable in "high-peri" mode which means the peripheral base address becomes 0x4_7E00_0000. With this in mind I'm trying to setup my MMU 1:1 mapping as usual, but without any success. While the MMU setup for the low-peri mode works just fine I can't figure...
by Schnoogle
Mon Oct 18, 2021 6:33 pm
Forum: Bare metal, Assembly language
Topic: RPi 4B - miniUART w/o device tree prints only garbage
Replies: 6
Views: 451

Re: RPi 4B - miniUART w/o device tree prints only garbage

Hi,

thx again for your hints. It turned out, that setting the core_freq=500 AND core_freq_min=500 in config.txt ensured a stable core frequency and thus got the miniUART output working as expected. :mrgreen:
by Schnoogle
Mon Oct 18, 2021 11:29 am
Forum: Bare metal, Assembly language
Topic: RPi 4B - miniUART w/o device tree prints only garbage
Replies: 6
Views: 451

Re: RPi 4B - miniUART w/o device tree prints only garbage

Hi, the divisor put to the register AUX_MU_BAUD_REG is calculated based on this formula: clock_rate / (8 * baud_rate) - 1 . Based on the formula given in the peripheral data sheet page 11: baud_rate = system_clock_freq / (8 * (baudrate_reg + 1)) Where clock_rate = 500_000_000 and baud_rate = 115200....
by Schnoogle
Sun Oct 17, 2021 4:56 pm
Forum: Bare metal, Assembly language
Topic: RPi 4B - miniUART w/o device tree prints only garbage
Replies: 6
Views: 451

Re: RPi 4B - miniUART w/o device tree prints only garbage

Hi,

thanks for this quick response. This line actually exists already in the config.txt …
Any further hints?
by Schnoogle
Sun Oct 17, 2021 3:04 pm
Forum: Bare metal, Assembly language
Topic: RPi 4B - miniUART w/o device tree prints only garbage
Replies: 6
Views: 451

RPi 4B - miniUART w/o device tree prints only garbage

Hi there, let me start by mentioning I've got miniUART and many more successfully running on a RPi 3B+ that does not use any device tree ;) But here is my problem; When running my RPI4B with a device tree and using the miniuart.bt overlay the miniUART seem to properly send data as expected. However,...
by Schnoogle
Sun Sep 26, 2021 10:08 am
Forum: Bare metal, Assembly language
Topic: MMU settings for 1:1 mapping
Replies: 2
Views: 562

Re: MMU settings for 1:1 mapping

Hi there, as I'm having only some MMU experience on the Raspberry Pi3 but not 4 I'm not 100% sure whether the config is exactly the same assuming 64Bit mode on both platforms. The MMU levels all cover a specific granularity of memory to be configured. Assuming a granule size configuration of 4KB (ba...
by Schnoogle
Tue Jul 27, 2021 12:30 pm
Forum: Bare metal, Assembly language
Topic: Rust Frame Buffer Implementation
Replies: 2
Views: 1194

Re: Rust Frame Buffer Implementation

Hi there, unfortunately there are several minor things in your actual code that require some adjustments. Lets start without any particular order: 1. When defining a struct in rust the compiler is free to re-order the fields to accomplish the best possible memory layout. As you require the fields to...
by Schnoogle
Tue Jun 08, 2021 12:33 pm
Forum: Bare metal, Assembly language
Topic: RPi3 - VCHIQ help required
Replies: 7
Views: 2861

Re: RPi3 - VCHIQ help required

Well, honestly I did not pursued it any further as some other tasks on my todo list where more pressing for me :)
But I might get back to this somewhen and share if I’m successful.
by Schnoogle
Tue Jun 08, 2021 12:30 pm
Forum: Bare metal, Assembly language
Topic: Toy operating system workflow and OpenGL ES support
Replies: 4
Views: 1814

Re: Toy operating system workflow and OpenGL ES support

Hi there, well to share some experiences: I first build or use an existing bootloader to put on the SD card the Rasperry Pi is booting from. This bootloader is waiting for incoming data on the miniUART expecting it to be a new kernel. Once received the bootloader copy’s the binary to the proper memo...
by Schnoogle
Tue Jun 08, 2021 12:24 pm
Forum: Bare metal, Assembly language
Topic: RPI3 B Bare Bones Not Working
Replies: 4
Views: 2060

Re: RPI3 B Bare Bones Not Working

Hi there, it’s hard to tell what the issue might be. Did you check that you have all required files on the SD card you aim to boot your kernel8.img from? It should contain not only the kernel image but also the config.txt file as mentioned in the repo you’ve linked as well as the bootcode.bin and st...
by Schnoogle
Thu Mar 04, 2021 10:49 pm
Forum: Bare metal, Assembly language
Topic: Bare metal register help
Replies: 1
Views: 575

Re: Bare metal register help

You can find all info on the UART registers for the Pi3 here: https://www.raspberrypi.org/documentati ... herals.pdf
by Schnoogle
Thu Mar 04, 2021 10:45 pm
Forum: Bare metal, Assembly language
Topic: mmal: mmal_ril_component_create: could not create RIL component 'camera'
Replies: 5
Views: 796

Re: mmal: mmal_ril_component_create: could not create RIL component 'camera'

Hi, glad that it finally worked out for you. The thing with the *_x files is that they provide an extended version of the VC firmware and thus provide more features / peripherals available and supported by the VC. This: https://www.raspberrypi.org/documentation/configuration/config-txt/boot.md might...
by Schnoogle
Wed Mar 03, 2021 9:42 pm
Forum: Bare metal, Assembly language
Topic: RPi3 - VCHIQ help required
Replies: 7
Views: 2861

Re: RPi3 - VCHIQ help required

Well, I did not managed anything to get working with cache active and flushing, thus I’d recommend to switch of caching for the region (pages) of the shared memory. Cache flushes from ARM side always seem to mess with the memory the VC did see in my attempts, but maybe I did something wrong :oops:
by Schnoogle
Wed Mar 03, 2021 9:38 pm
Forum: Bare metal, Assembly language
Topic: mmal: mmal_ril_component_create: could not create RIL component 'camera'
Replies: 5
Views: 796

Re: mmal: mmal_ril_component_create: could not create RIL component 'camera'

Hi, well without further checking the details one possible reason could be that you are running your Kernel with Start.elf instead of start_x.elf on your raspberry Pi. The camera is only available in the VC Firmware if the extended version *_x - files ore used on the SD card. Once you verified you r...
by Schnoogle
Mon Mar 01, 2021 3:53 pm
Forum: Bare metal, Assembly language
Topic: RPi3 - VCHIQ help required
Replies: 7
Views: 2861

Re: RPi3 - VCHIQ help required

Hi, well finally it turned out that it was a caching issue. Even though I updated the memory position from the ARM side it just hit the cache. The VC assumes/expects the memory region to be used to be uncached. After properly setting up the MMU and configure the memory region to be used for the exch...
by Schnoogle
Mon Feb 08, 2021 5:39 pm
Forum: Bare metal, Assembly language
Topic: Where can I find the format of messages that are transfered between the CPU and GPU in raspbian code?
Replies: 9
Views: 1751

Re: Where can I find the format of messages that are transfered between the CPU and GPU in raspbian code?

Hey, well I kinda understand our frustration. And I was also trying to find a much more lean way of getting the VCHIQ stuff to work and I'm constantly refactoring the code base as I keep learning the details. When it comes to the "well defined message format" my learnings are the following...

Go to advanced search