Go to advanced search

by timanu90
Mon Oct 12, 2020 4:33 pm
Forum: Bare metal, Assembly language
Topic: [SOLVED] Yagarto for Linux?
Replies: 3
Views: 195

Re: [SOLVED] Yagarto for Linux?

You can of course, use the package provided by your distro because it is for sure the simplest way. But some distros have old versions of the tool, you need to be aware of that. The way rst sugested by downloading the latest version and add the path to the bin folder is the way you have to be sure y...
by timanu90
Mon Jun 15, 2020 3:33 pm
Forum: Bare metal, Assembly language
Topic: Raspberry Pi 4B bare metal
Replies: 2
Views: 603

Re: Raspberry Pi 4B bare metal

The very basic, you need a linker script and a makefile to setup the final binary file layout. You can take ideas from mine here: https://github.com/timanu8/SingularityBOOT/blob/master/board_rpi4/linker.ld https://github.com/timanu8/SingularityBOOT/blob/master/Makefile Then on the code itself you ne...
by timanu90
Sat May 09, 2020 2:44 pm
Forum: Bare metal, Assembly language
Topic: [HELP] Test RPI 2 Code
Replies: 0
Views: 240

[HELP] Test RPI 2 Code

Hello guys,

I think my RPI 2 broke, I can't even boot a freshly flashed linux image, so I am turning into the community if someone is whiling to run the attach binary of my bootloader for the RPI2, just to check if it works on the HW.

Thanks in advance.
by timanu90
Fri Apr 10, 2020 9:00 pm
Forum: Bare metal, Assembly language
Topic: [SOLVED] Aarch64 - EL2 switch to EL3 - Exception Handler not called
Replies: 13
Views: 2059

Re: [SOLVED] Aarch64 - EL2 switch to EL3 - Exception Handler not called

Finally made my RPI4 enter in EL3. For that I changed the code in the armstubs/armstub8.S, like mentioned in this thread and removed the code that drops to EL2. Recompiled and created armstub8.bin and armstub8-gic.bin. Then I copied the files to the root of the SDCard boot partition. Edited my confi...
by timanu90
Fri Apr 10, 2020 8:17 pm
Forum: Bare metal, Assembly language
Topic: RPi startup and RPi4 ?
Replies: 10
Views: 1428

Re: RPi startup and RPi4 ?

cleverca22 wrote:
Fri Apr 10, 2020 1:51 pm
are you still using kernel_old=1 ?
On the RPI4 kernel_old=1 doesn't seem to work. I tried like in the RPI3 plcing the code at 0x00, but no luck so far.
by timanu90
Fri Apr 10, 2020 8:14 pm
Forum: Bare metal, Assembly language
Topic: SingularityBOOT Release V1.0
Replies: 3
Views: 674

Re: SingularityBOOT Release V1.0

Thanks for testing bzt. :D
by timanu90
Thu Apr 09, 2020 8:42 pm
Forum: Bare metal, Assembly language
Topic: SingularityBOOT Release V1.0
Replies: 3
Views: 674

Re: SingularityBOOT Release V1.0

Hello everyone

Just released a new version of singularity BOOT to run on the RPI4. For now it delivers the CPU in EL2.

https://github.com/timanu8/SingularityBOOT

Hope it helps someone.

Cheers
Tiago
by timanu90
Thu Apr 09, 2020 3:21 pm
Forum: Bare metal, Assembly language
Topic: RPi startup and RPi4 ?
Replies: 10
Views: 1428

Re: RPi startup and RPi4 ?

I made the code work. It was the peripheral base address, I saw one place that stated to be 0x7E000000, and I used that. Then I saw that it is 0xFE000000. And with this address it worked fine. But still I have to link my code to start at 0x80000 and the processor is handled to me in EL2. the startin...
by timanu90
Wed Apr 08, 2020 8:51 pm
Forum: Bare metal, Assembly language
Topic: RPi startup and RPi4 ?
Replies: 10
Views: 1428

Re: RPi startup and RPi4 ?

`kernel_old=1` causes your binary to get loaded to address 0 instead, which may break everything Yes, but in RPI3 kernel_old also makes the processor to be given to you in EL3, that's the exception level I would like to receive the processor. I tried in the RPI4 and for me is not working. Is there ...
by timanu90
Wed Apr 08, 2020 1:35 pm
Forum: Bare metal, Assembly language
Topic: RPi startup and RPi4 ?
Replies: 10
Views: 1428

Re: RPi startup and RPi4 ?

Hello everyone. I am trying to boot my RPI4. As sugested in this thread I put in the config.txt the line uart_2ndstage=1 And then I created an asm file with the following code ldr x1, =0xFE201000 ldr x2, =0x54 str x2, [x1] I made a linker script to place this code at 0x80000. I expected when I run t...
by timanu90
Sun Mar 08, 2020 4:31 pm
Forum: Bare metal, Assembly language
Topic: SingularityBOOT Release V1.0
Replies: 3
Views: 674

SingularityBOOT Release V1.0

Hello everyone https://github.com/timanu8/SingularityBOOT I decided to implement an iHex bootloader from scratch for fun :D . I decided to implement the full iHex specification to allow downloads in any place inside the 4GB (The 4GB is a iHex limitation). Also the UART that power the bootloader is t...
by timanu90
Mon Mar 02, 2020 5:57 pm
Forum: Bare metal, Assembly language
Topic: Multi-core memory access scheduling/arbitration
Replies: 6
Views: 823

Re: Multi-core memory access scheduling/arbitration

The concept you are looking for is the spin lock. Basically before access the portion of code that will have race condition, the core should try to "lock" an object spinlock. when it finishes the critical section it should release so other cores can execute that portion of the code as well. Basicall...
by timanu90
Wed Feb 26, 2020 1:42 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: How to enable the i2c_hid module to interface a touch sensor
Replies: 0
Views: 175

How to enable the i2c_hid module to interface a touch sensor

Hello everyone, I am having trouble to enabling the i2c_hid module to interface with a touch sensor. Until now I added the following overlay: // Definitions for HID over I2C /dts-v1/; /plugin/; /{ compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; fragment@0 { target = <&i2c_arm>; __overla...
by timanu90
Sat Feb 22, 2020 4:28 pm
Forum: Bare metal, Assembly language
Topic: Problem booting PI3 in 64bit mode from 0x00 address
Replies: 4
Views: 641

Re: Problem booting PI3 in 64bit mode from 0x00 address

Hi rst, Thanks for the help. In the meantime I download a old version of the firmware and used it (firmware-1.20170811). It worked straight away, which means is a clock change like you said. I looked for your code, I assume you mean this example? https://github.com/bztsrc/raspi3-tutorial/blob/master...
by timanu90
Sat Feb 22, 2020 12:48 pm
Forum: Bare metal, Assembly language
Topic: Problem booting PI3 in 64bit mode from 0x00 address
Replies: 4
Views: 641

Problem booting PI3 in 64bit mode from 0x00 address

Hello guys, I am trying to run my old code that run from 0x00 in aarch64 mode. I search around and some things changed in the firmware so I updated my config.txt to look like this: arm_64bit=1 kernel_old=1 kernel=bootloader.img disable_commandline_tags=1 But still don't work. My code use the Mini UA...
by timanu90
Mon Dec 09, 2019 9:46 pm
Forum: Bare metal, Assembly language
Topic: RPi4 vs. RPi3
Replies: 2
Views: 745

Re: RPi4 vs. RPi3

I asked that in this post

https://www.raspberrypi.org/forums/view ... 4f2795ec8f

And the answer was that someone is working on that documentation, we need to wait patiently.
by timanu90
Fri Nov 29, 2019 9:06 am
Forum: Bare metal, Assembly language
Topic: RPI4 Datasheet
Replies: 3
Views: 876

RPI4 Datasheet

Hi guys,

I have been away for a while, hoping in the meantime the RPI4 datasheet would be out. There are any news about it state?

I am particulary interested in the GIC controller.

Cheers
by timanu90
Sun Nov 24, 2019 12:04 pm
Forum: Bare metal, Assembly language
Topic: [SOLVED] Aarch64 - EL2 switch to EL3 - Exception Handler not called
Replies: 13
Views: 2059

Re: Aarch64 - EL2 switch to EL3 - Exception Handler not called

No it most definitely enters in EL2 the only way to enter in EL3 is run kernel_old = 1 as a config.txt setting Ok sorry, I used the kernel_old = 1 to put my PI in 64bit mode, I thought it always started in EL3. If the first thing you want to do is to jump to EL3, i believe configuring it to start i...
by timanu90
Sat Nov 23, 2019 10:06 pm
Forum: Bare metal, Assembly language
Topic: [SOLVED] Aarch64 - EL2 switch to EL3 - Exception Handler not called
Replies: 13
Views: 2059

Re: Aarch64 - EL2 switch to EL3 - Exception Handler not called

You can check in which EL you are with the following code just to make sure: /** * @brief - Read the processor current exception level. * */ .globl aarch64_get_exception_level .func aarch64_get_exception_level aarch64_get_exception_level: mrs x0, CurrentEL asr x0, x0, #0x02 ret .endfunc But if you c...
by timanu90
Mon Jun 24, 2019 9:33 pm
Forum: Bare metal, Assembly language
Topic: Raspberry Pi 4
Replies: 59
Views: 16430

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: 1469

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: 53
Views: 53963

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: 4
Views: 1417

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: 6207

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: 53
Views: 53963

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...

Go to advanced search