Go to advanced search

by dpotop
Thu Apr 18, 2019 8:58 am
Forum: Bare metal, Assembly language
Topic: Best way to synchronize timers?
Replies: 1
Views: 321

Best way to synchronize timers?

Hello, I'd like to execute code periodically on all cores. For instance, I'd like to launch every 10ms computations on all cores. These computations must start at the same time (as synchronized as possible). I look for the best way to do it. What I currently have is one timer (the "local timer") dri...
by dpotop
Tue Mar 12, 2019 9:07 am
Forum: Bare metal, Assembly language
Topic: Coherency when starting in EL3
Replies: 3
Views: 535

Re: Coherency when starting in EL3

Thanks LdB,

I had completely overlooked the Cortex-A53-specifics.

Is register CPUECTLR_EL1 the only one I should be concerned
with? Are there other registers of interest?
In the manual I see there are lots of "implementation-defined"
registers besides this one.

Regards,
Dumitru
by dpotop
Mon Mar 11, 2019 10:09 pm
Forum: Bare metal, Assembly language
Topic: Coherency when starting in EL3
Replies: 3
Views: 535

Coherency when starting in EL3

Hello, I have a weird problem - when booting in EL3 I can't seem to be able to enable coherency between cores. I have two boot settings: - in the first I boot in EL2 (classical) - in the second I boot in EL3 In both cases, the configuration for EL2 and EL1 is exactly the same, both for MMU and for p...
by dpotop
Wed Feb 27, 2019 8:04 pm
Forum: Bare metal, Assembly language
Topic: MMU config of RPi3 - problem with ARMv8 ARM
Replies: 10
Views: 821

Re: MMU config of RPi3 - problem with ARMv8 ARM

Ok, so with your help (thank you again) I start to understand more of the ARM documents, and contribute productively to this discussion. I'm now looking into the "Programmer’s Guide for ARMv8-A", which can be found here: http://infocenter.arm.com/help/topic/com.arm.doc.den0024a/DEN0024A_v8_architect...
by dpotop
Wed Feb 27, 2019 4:49 pm
Forum: Bare metal, Assembly language
Topic: MMU config of RPi3 - problem with ARMv8 ARM
Replies: 10
Views: 821

Re: MMU config of RPi3 - problem with ARMv8 ARM

No, with 64k granularity pages are on a 64k boundary (by definition). VA[47:29] is used as an index in the level 2 lookup (if used) to give the address of the level 3 table, VA[28:16] is used as an index in the level 3 lookup to give you PA[47:16], VA[15:0] gives you PA[15:0] directly. I guess the ...
by dpotop
Wed Feb 27, 2019 1:15 pm
Forum: Bare metal, Assembly language
Topic: MMU config of RPi3 - problem with ARMv8 ARM
Replies: 10
Views: 821

Re: MMU config of RPi3 - problem with ARMv8 ARM

2. If T0SZ=39, I am again at L3, VAs have 25 bits. Then, bits [11:0] are always taken unchanged from the VA, and bits [24:12] are taken from the page descriptor. Right ? With 64K granularity then PA[15:0] = VA[15:0] Ok, but then, in the case mentioned above, the pages pointed to by two successive d...
by dpotop
Wed Feb 27, 2019 11:58 am
Forum: Bare metal, Assembly language
Topic: MMU config of RPi3 - problem with ARMv8 ARM
Replies: 10
Views: 821

Re: MMU config of RPi3 - problem with ARMv8 ARM

The DDI0487 document on page D5-2419 has a nice comparision table D5-13, called "TnSZ values for and input address rangesa for starting at this level" which compares possible values, and tells you the initial lookup level. In short, with 16k pages if you want to start at translation level 2, then y...
by dpotop
Wed Feb 27, 2019 7:28 am
Forum: Bare metal, Assembly language
Topic: MMU config of RPi3 - problem with ARMv8 ARM
Replies: 10
Views: 821

Re: MMU config of RPi3 - problem with ARMv8 ARM

Diagram D5-15 is for level 0, 1 & 2 descriptor formats, the level 3 page descriptor format is diagram D5-17 on page 2448. Excellent, thanks a lot! Can you also point me to the place where they explain how the initial translation level is chosen for Stage 1 translation? I only found a way to set it ...
by dpotop
Tue Feb 26, 2019 4:56 pm
Forum: Bare metal, Assembly language
Topic: MMU config of RPi3 - problem with ARMv8 ARM
Replies: 10
Views: 821

MMU config of RPi3 - problem with ARMv8 ARM

Hello, I try to reconfigure the MMU beyond what is done in the examples of LdB. I try to do this by building upon an example of ARMv8 ARM, which can be found here: https://static.docs.arm.com/ddi0487/da/DDI0487D_a_armv8_arm.pdf The example is the one in section K7.1.2, fig. K7-11, page 7293. I find ...
by dpotop
Thu Feb 21, 2019 7:02 am
Forum: Bare metal, Assembly language
Topic: Taking an exception disables interrupts?
Replies: 2
Views: 897

Re: Taking an exception disables interrupts?

Thanks a lot LdB - the first paragraphs in your link contained exactly the information I looked for.

Dpotop
by dpotop
Wed Feb 20, 2019 11:15 pm
Forum: Bare metal, Assembly language
Topic: Taking an exception disables interrupts?
Replies: 2
Views: 897

Taking an exception disables interrupts?

Hello,

There's a point I can't find the reference in the ARMv8 ARM - it's probably
there, but I just can't find it:

When an exception is taken (any type) are interrupts (IRQs and
FIQs) disabled?

Best regards,
Dpotop
by dpotop
Mon Feb 18, 2019 8:18 pm
Forum: Bare metal, Assembly language
Topic: EL switching
Replies: 7
Views: 1404

Re: EL switching

Cool !
But is the VideoCore initialized if I boot at address 0?
Will it reply to mailbox requests?

Best,
Dpotop
by dpotop
Sun Feb 17, 2019 8:39 pm
Forum: Bare metal, Assembly language
Topic: EL switching
Replies: 7
Views: 1404

Re: EL switching

RPi3 newbie question: I thought RPi3 is at EL2 when control is given to kernel8.img. So, how come you're at EL3?

Dpotop
by dpotop
Fri Feb 15, 2019 5:06 pm
Forum: Bare metal, Assembly language
Topic: RPi3 - start cores and spinlock sync code needed
Replies: 11
Views: 1336

Re: RPi3 - start cores and spinlock sync code needed

Dear LdB and bzt,

Thanks a lot, your insight into Linux booting is quite useful!

If the de-compressed Linux kernel can go between 0x8000 and 0x80000,
it also means I can load my code there, isn't it? I'll probably give it a try.

Best regards,
Dpotop
by dpotop
Fri Feb 15, 2019 3:16 pm
Forum: Bare metal, Assembly language
Topic: Question on mailboxes on RPI3
Replies: 0
Views: 552

Question on mailboxes on RPI3

Hello, I want to be sure about some details before starting to code some interrupt-related stuff. Can you please tell me if the following assumptions I make are correct? Even partial answers will help me. 1. The RPI3 inherits most of the memory-mapped SoC peripherals of the RPi1, with the difference...
by dpotop
Fri Feb 15, 2019 2:14 pm
Forum: Bare metal, Assembly language
Topic: Mini UART eats some characters
Replies: 9
Views: 1129

Re: Mini UART eats some characters

This week I did (in some spare time) exactly this - writing a loader over UART. I've had some issues with lost characters, too. It seems they were timing-related. After removing all spurious code on the RPi-side receiving code and adding a small consistency test in the writing loop on the PC side (w...
by dpotop
Sat Feb 09, 2019 1:41 pm
Forum: Bare metal, Assembly language
Topic: RPi3 - start cores and spinlock sync code needed
Replies: 11
Views: 1336

Re: RPi3 - start cores and spinlock sync code needed

I have no idea why only the Pi devs could answer that. Be cause the professionals live on it, whereas Pi developers are hobbyists and can afford to be open. :) And the Pi is the only platform where such a community developed. Too bad the information is not even more easily accessible. I wonder how ...
by dpotop
Fri Feb 08, 2019 10:39 pm
Forum: Bare metal, Assembly language
Topic: RPi3 - start cores and spinlock sync code needed
Replies: 11
Views: 1336

Re: RPi3 - start cores and spinlock sync code needed

Hello LdB, Thanks again. Starting from your code I managed to make critical sections work, after starting the caches. Do you have some reference for the synchronization code (the semaphores)? The semantics of the non-blocking "dec" looks a bit weird. I spent some time understanting it before I was a...
by dpotop
Fri Feb 08, 2019 9:04 am
Forum: Bare metal, Assembly language
Topic: RPi3 - start cores and spinlock sync code needed
Replies: 11
Views: 1336

Re: RPi3 - start cores and spinlock sync code needed

Hello LdB, Thanks again for your reply and for the link to your source code. I'm now trying to understand it, and I have a question related to memory mapping and mailboxes, which I don't fully understand. The code that I don't understand is in your file: https://github.com/LdB-ECM/Raspberry-Pi/blob/...
by dpotop
Tue Feb 05, 2019 1:50 pm
Forum: Bare metal, Assembly language
Topic: RPi3 - start cores and spinlock sync code needed
Replies: 11
Views: 1336

Re: RPi3 - start cores and spinlock sync code needed

Thanks a lot to both of you.
Dpotop
by dpotop
Mon Feb 04, 2019 8:10 pm
Forum: Bare metal, Assembly language
Topic: RPi3 - start cores and spinlock sync code needed
Replies: 11
Views: 1336

RPi3 - start cores and spinlock sync code needed

Hello everybody, After writing a small OS on the RPi1 (open-sourced here https://gforge.inria.fr/projects/rpi653), I'm now trying to make it work on the RPi3 multi-core. I start small, to understand the functioning of the multi-core. I am using this tutorial to make things work https://github.com/bz...
by dpotop
Tue Oct 09, 2018 1:33 pm
Forum: Bare metal, Assembly language
Topic: Yet Another Bare Metal Tutorial for the RPi3
Replies: 74
Views: 47548

Need docs!

Hello,

First of all, thanks a lot for these tutorials. They are excellent.

Concerning your "power" tutorial: you mention that most components of the PPi3 card can be shut down individually. But where can I get the doc on that?

Best,
Dpotop
by dpotop
Wed Feb 07, 2018 1:18 pm
Forum: Other programming languages
Topic: Sonic Pi : balance between left and right to create a rotating impression
Replies: 2
Views: 964

Sonic Pi : balance between left and right to create a rotating impression

Hello, I'd like to create the impression of sound source rotating around me. To do this, I need to control how the sound is transmitted to the left and right channels of my amplifier. I do not want to do this globally by controlling the output volume, because I want just one buffer to do this. How c...
by dpotop
Thu Jun 22, 2017 9:24 am
Forum: Beginners
Topic: Modify the binding of one single key under Raspbian
Replies: 0
Views: 218

Modify the binding of one single key under Raspbian

Hello, I'm trying to change the binding of one single key on my Raspberry Pi system. On my QWERTY keyboard I'm using an international mapping to write french. All letters are OK except one "ç" (C with cedilla). Some web pages suggested that it should be possible to write it using ALT-GR c. This did ...

Go to advanced search