Go to advanced search

by timanu90
Mon Jun 24, 2019 9:33 pm
Forum: Bare metal, Assembly language
Topic: Raspberry Pi 4
Replies: 59
Views: 10726

Re: Raspberry Pi 4

My hopes are very high. I didn't had a chance to look into linux code, but I saw a comment from a guy on internet stating that the main interrupt controller is now a standard gic-400 rather than their own thing.

This was my wish :D
by timanu90
Wed Dec 12, 2018 3:11 pm
Forum: Bare metal, Assembly language
Topic: Using ldrex instruction hangs
Replies: 2
Views: 1147

Re: Using ldrex instruction hangs

I think you need to have the MMU on and the address used for the lock needs to be in a section of memory marked as Normal. Without the MMU on all memory is effectively marked as Strongly Ordered. The previous answer plus the caches need to be enabled and the memory marked as normal, shareable and g...
by timanu90
Fri May 04, 2018 12:27 pm
Forum: Bare metal, Assembly language
Topic: RPI3 QEMU
Replies: 52
Views: 44245

Re: RPI3 QEMU

Hello bzt, very good news.

I have been busy, but I will try this soon.

Congratulations and thank you for your work.

Cheers
Tiago
by timanu90
Tue Mar 06, 2018 2:33 pm
Forum: Bare metal, Assembly language
Topic: LRXR & STXR on RPI3 (aarch64)
Replies: 1
Views: 714

LRXR & STXR on RPI3 (aarch64)

Hello guys, I am trying to use the exclusive load store instructions on aarch64. The problem is when the processor reach those instruction it hang and I can't figure out why. I remember on rpi2 I had a similar problem and I solved it enabling the MMU and the caches and configured the table entries s...
by timanu90
Wed Dec 13, 2017 11:03 am
Forum: Bare metal, Assembly language
Topic: RPi3 MMU question
Replies: 17
Views: 5218

Re: RPi3 MMU question

Hi guys, I am trying to use the TTBR1 on el1. I gave the same table address to TTBR0 nad TTBR1 (memory is mapped 1:1). Every address that match on TTBR0 works properly, every address on TTBR1 fail. I have configured the tcr_el1.t0sz and tcr_el1.t1sz with 32 to map 4GB, From the documentation I assum...
by timanu90
Wed Nov 29, 2017 5:12 pm
Forum: Bare metal, Assembly language
Topic: RPI3 QEMU
Replies: 52
Views: 44245

Re: RPI3 QEMU

Hello, I tried de -s -S but seems to not work for me either. About gdb I am using >$ aarch64-linux-gnu-gdb -v NU gdb (GDB) 8.0.1 Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to chan...
by timanu90
Wed Nov 29, 2017 10:17 am
Forum: Bare metal, Assembly language
Topic: RPI3 QEMU
Replies: 52
Views: 44245

Re: RPI3 QEMU

Hi, I am trying qemu again, this time I am trying use GDB but in qemu the option -S seem not to wrok. Do you have any clue what could be?

-S flag should tell qemu to pause emulation right before the execution of the first instruction

cheers
Tiago
by timanu90
Thu Nov 09, 2017 9:47 am
Forum: Bare metal, Assembly language
Topic: Powering CPUs on/off in RPi3
Replies: 11
Views: 3048

Re: Powering CPUs on/off in RPi3

I was checking and it applies to all cores. You can change the frequency but will be the same to all cores, it won't work for you use case.

As seen here https://github.com/raspberrypi/firmware ... -interface, it seems you can turn off some devices, but not cores individually.
by timanu90
Wed Nov 08, 2017 8:01 pm
Forum: Bare metal, Assembly language
Topic: Powering CPUs on/off in RPi3
Replies: 11
Views: 3048

Re: Powering CPUs on/off in RPi3

My guess would be to try set the core clock to 0hz. I am not sure if it is even possible. But you can try :D
by timanu90
Tue Oct 24, 2017 3:32 pm
Forum: Bare metal, Assembly language
Topic: RPI2 - Booting from 0 with kernel_old=1
Replies: 4
Views: 1185

Re: RPI2 - Booting from 0 with kernel_old=1

My guess is your problem is in the linker script not in code itself. Using dwelch example https://github.com/dwelch67/raspberrypi/tree/master/uart05 try in the memmap file change the line ram : ORIGIN = 0x8000, LENGTH = 0x1000 to ram : ORIGIN = 0x0000, LENGTH = 0x1000 Be aware that your prints maybe...
by timanu90
Tue Oct 24, 2017 2:02 pm
Forum: Bare metal, Assembly language
Topic: [SOLVED] MMU invalidation?
Replies: 6
Views: 1606

Re: [SOLVED] MMU invalidation?

Thank for the tips, later today when I get home I will test all of this.
by timanu90
Tue Oct 24, 2017 12:41 pm
Forum: Bare metal, Assembly language
Topic: [SOLVED] MMU invalidation?
Replies: 6
Views: 1606

Re: [SOLVED] MMU invalidation?

Thank you very much for the explanation. Was very clear for me. For now I wanted to map 1:1 using TTBR0 only with 4k granule pages. I intend to map 2gb of Virtual memory, so based on what you said I need to put the value 33 on T0SZ and use 3 levels tables right? And the first table will have only 2 ...
by timanu90
Tue Oct 24, 2017 8:21 am
Forum: Bare metal, Assembly language
Topic: [SOLVED] MMU invalidation?
Replies: 6
Views: 1606

Re: [SOLVED] MMU invalidation?

I am trying to understand the armv8 MMU but without much success. 1 - The relationship between tcr.T0SZ and the number of tables. I followed the documentation and got the number 34 to this field and I assumed I would got 2 levels of tables. Is this correct? 2 - Even if I got 2 levels of tables I wou...
by timanu90
Wed Oct 18, 2017 11:10 am
Forum: Bare metal, Assembly language
Topic: My doubts in understanding baremetal
Replies: 21
Views: 5014

Re: My doubts in understanding baremetal

Hello 1. No, those are not the GPU mailboxes, those mailboxes are used for inter core communication mainly. All your other questions depend on the way you choose to boot your rpi. If you don't use the config.txt "trick", the GPU start the arm at address 0x00 that runs a piece of softare developed by...
by timanu90
Tue Oct 17, 2017 1:24 pm
Forum: Bare metal, Assembly language
Topic: RPI3 QEMU
Replies: 52
Views: 44245

Re: RPI3 QEMU

I managed to put the qemu to work and print the content of the UART (PL011) on the terminal with the command

Code: Select all

qemu-system-aarch64 -M raspi3 -kernel multicos.elf -serial stdio
My question now is, did you managed to attach a gdb session to debug step by step?
by timanu90
Tue Oct 17, 2017 12:28 pm
Forum: Bare metal, Assembly language
Topic: RPI3 QEMU
Replies: 52
Views: 44245

Re: RPI3 QEMU

Hi bzt, thank you for sharing. For me it's perfect because my use case is for configuring the MMU, it's very hard to debug it in the real hardware.

I will give it a try :D .
by timanu90
Tue Oct 17, 2017 11:01 am
Forum: Bare metal, Assembly language
Topic: RPI3 QEMU
Replies: 52
Views: 44245

RPI3 QEMU

Hi guys, seems that some people could run aarch64 rpi3 code in qemu. Anyone can tell me the version of qemu needed and what command you use to launch the session?
by timanu90
Mon Sep 18, 2017 8:29 am
Forum: Bare metal, Assembly language
Topic: HVC instruction on RPI3
Replies: 4
Views: 1596

Re: HVC instruction on RPI3

To enable HVC instruction you need to configure this register http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0500g/CIHBGABF.html . /* Enable Hypercalls */ mrs x0, scr_el3 orr x0, x0, #(1<<8) /* Hyp Call enable. */ msr scr_el3, x0 If you dont enable the HVC instruction, it work as a S...
by timanu90
Thu Sep 14, 2017 1:23 pm
Forum: Bare metal, Assembly language
Topic: aarch64 el1 secure & el1 non-secure
Replies: 2
Views: 1189

Re: aarch64 el1 secure & el1 non-secure

You are right. Bug fixed. Thank you.
by timanu90
Thu Sep 14, 2017 12:49 pm
Forum: Bare metal, Assembly language
Topic: aarch64 el1 secure & el1 non-secure
Replies: 2
Views: 1189

aarch64 el1 secure & el1 non-secure

Hi guys today I am leaving here 2 pieces of code to drop rpi3 in 64 bit mode from el3 to el1 secure and el1 non secure, in the hope that it will be usefull for someone. drop_el1_secure: /* Try drop from el3 to el1 secure */ /*=============================================================*/ /* Enable ...
by timanu90
Tue Aug 29, 2017 1:51 pm
Forum: Bare metal, Assembly language
Topic: ldrex/strex
Replies: 15
Views: 3822

Re: ldrex/strex

Yes you need data cache enabled on the RPI2.
by timanu90
Thu Aug 17, 2017 3:26 pm
Forum: Bare metal, Assembly language
Topic: SD Card controller
Replies: 9
Views: 2661

Re: SD Card controller

Thank you very much. When I have my SDCard driver or wrapper working I will look to this.
by timanu90
Thu Aug 17, 2017 11:28 am
Forum: Bare metal, Assembly language
Topic: SD Card controller
Replies: 9
Views: 2661

Re: SD Card controller

Thank you I will take a look on this driver and try put mine to work. About the FAT32 I have my own code, but I would like to get the generic file name working instead of that strange one. Your code work with any file name with any length?
by timanu90
Thu Aug 17, 2017 7:39 am
Forum: Bare metal, Assembly language
Topic: SD Card controller
Replies: 9
Views: 2661

Re: SD Card controller

Yes I was expecting to find the value 0xaa55 on the last 2 bytes of the read block, but I got full 0s. Thats why I was asking if there are any timings that I must respect, for example between writing commands to the host controller.
by timanu90
Wed Aug 16, 2017 7:30 pm
Forum: Bare metal, Assembly language
Topic: SD Card controller
Replies: 9
Views: 2661

SD Card controller

Hi guys, I want to have SD card access, I am trying to understand the command sequence. I tried to reverse engineer this driver: https://github.com/yrakcaz/RasPiK/blob/master/src/drivers/imports/emmc.c I want to understand the command sequence and timings (seems that timings are important) but I can...

Go to advanced search