Go to advanced search

by zhak
Tue Oct 08, 2019 9:34 pm
Forum: Bare metal, Assembly language
Topic: Application freezes on atomic write to memory
Replies: 1
Views: 1090

Application freezes on atomic write to memory

AArch64 code runs on RPi4. My binary disassembles to // halt cores 1..3, setup stack and go to main 0: d53800a9 mrs x9, mpidr_el1 4: 92400529 and x9, x9, #0x3 8: b4000069 cbz x9, 0x14 c: d503205f wfe 10: 17ffffff b 0xc 14: 10ffff69 adr x9, 0x0 18: 9100013f mov sp, x9 // atomic write 1c: 90000008 adr...
by zhak
Mon Oct 07, 2019 11:10 am
Forum: Bare metal, Assembly language
Topic: Setting the output register for a GPIO on Pi 4
Replies: 21
Views: 2452

Re: Setting the output register for a GPIO on Pi 4

I'm dumb. I spent all day yesterday trying to figure out what's wrong... the problem was storing 64 bits to 32-bit register. should have used W registers instead of X
by zhak
Mon Oct 07, 2019 9:14 am
Forum: Bare metal, Assembly language
Topic: Setting the output register for a GPIO on Pi 4
Replies: 21
Views: 2452

Re: Setting the output register for a GPIO on Pi 4

Hmm, I used Arm Architecture Reference Manual Armv8, for Armv8-A architecture profile as a reference. Section D13.2.88 states Bits[0..7] in MPIDR_EL1 register are Affinity level 0. And Section D7.4: - In an implementation containing multiple PEs, each PE is identified by a unique affinity value repo...
by zhak
Sun Oct 06, 2019 9:21 pm
Forum: Bare metal, Assembly language
Topic: Setting the output register for a GPIO on Pi 4
Replies: 21
Views: 2452

Re: Setting the output register for a GPIO on Pi 4

Unfortunately I'm unable to turn on the LED connected to any 40-pin output :( processor cpu64_v8 code64 _start: mrs x10, mpidr_el1 and x10, x10, 0xff cbnz x10, halt adr x11, _start adr x12, kernel mov sp, x11 blr x12 halt: wfe b halt kernel: mov x4, 0xfe200000 ; turn on ACT LED (GPIO 42) ldr x0, [x4...
by zhak
Mon Aug 26, 2019 10:07 pm
Forum: Bare metal, Assembly language
Topic: About device trees, MMIO addr and not-DT capable kernels
Replies: 0
Views: 523

About device trees, MMIO addr and not-DT capable kernels

I'm doing my first steps with RPi4 in general and AArch64 bare metal in particular. It seems like I finally figured out how to boot - my infinite-loop kernel doesn't make ACT LED flash patterns. The LED is silent. The next step is to setup mini UART so that my RPi4 could say me hello. I've read in t...
by zhak
Sun Aug 25, 2019 5:22 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: GPIO UART voltages
Replies: 9
Views: 890

Re: GPIO UART voltages

Thanks for your replies. I checked documentation for my adapter -- it uses 3.3V signal level. I also disconnected +5V red wire (hopefully, looks like nothing bad has happened while it was running on both power sources - from the red wire and standard USB power adapter)
by zhak
Sun Aug 25, 2019 12:37 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: GPIO UART voltages
Replies: 9
Views: 890

Re: GPIO UART voltages

I bought this kind of adapter https://easycraft.by/image/FZ0432/Konverter_USB_-_RS232_(UART).jpg It includes PL-2303HX USB-to-Serial bridge controller. I connect it to GPIO Pins as follows: Board Cable Pin 4 (+5V) <--- +5V (red) Pin 6 (GND) <--- GND (black) Pin 8 (TXD0) <--- Rx (white) Pin 10 (RXD0)...
by zhak
Sun Aug 25, 2019 11:48 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: GPIO UART voltages
Replies: 9
Views: 890

GPIO UART voltages

Hi guys, I'm not quite familiar with electronics, so I'd be happy if you could explain me something. Documentation says: The SoCs used on the Raspberry Pis have two built-in UARTs, a PL011 and a mini UART. They are implemented using different hardware blocks, so they have slightly different characte...
by zhak
Sun Aug 25, 2019 11:04 am
Forum: Off topic discussion
Topic: What are fixup files and how does it work?
Replies: 3
Views: 1501

What are fixup files and how does it work?

Documentation says start_file specifies the Videocore (VC4) firmware file to use. fixup_file specifies the file used to fix up memory locations used in the start_file to match the GPU memory split. Note that the start_file and the fixup_file are a matched pair - using unmatched files will stop the b...
by zhak
Thu Aug 08, 2019 8:29 pm
Forum: General discussion
Topic: Why are all CPU cores running by default on RPi3 (4) cold reset?
Replies: 1
Views: 213

Why are all CPU cores running by default on RPi3 (4) cold reset?

From rust-embedded tutorials I understand, that upon boot all cores of the CPU are running and execute the same boot code. I tried to search for details about this, but found not much. From the ARM Cortex-A72 MPCore Processor Technical Reference Manual I understand, that different types of reset can...
by zhak
Thu Jul 25, 2019 8:25 pm
Forum: Other programming languages
Topic: Baremetal + Rust - choosing the correct AArch64 build target
Replies: 3
Views: 1405

Baremetal + Rust - choosing the correct AArch64 build target

I decided to start learning Rust for embedded systems development (Aarch64) with the help of RPi 3/4. So I'm following The Embedded Rust Book (https://docs.rust-embedded.org/book/intro/install.html). Installation chapter tells about adding compilation targets for cross-compiling and I don't quiet un...
by zhak
Fri Jul 12, 2019 5:50 pm
Forum: Bare metal, Assembly language
Topic: Spider-OS a new operating system
Replies: 113
Views: 19630

Re: Spider-OS a new operating system

Oh, man, this is really fascinating! I'm waiting for my RPi4 to arrive to start osdev in asm as well. I did some osdev for x86 in the past, now I wanna dive in to AArach64. Your demos are pretty cool. Will be waiting for updates! ;)
by zhak
Fri Jul 05, 2019 10:47 am
Forum: General discussion
Topic: STICKY: Introduce yourself!
Replies: 3581
Views: 138949

Re: STICKY: Introduce yourself!

Hi guys. I'm Alex. I do software QA for a living and code in x86 asm for my soul. Finally I thought I'm ready to learn ARM architecture and RPi4 looks promising. Waiting for it to be delivered in a couple of weeks, studying arch docs and writing simple test apps meanwhile.

Go to advanced search