Go to advanced search

by rgbstar
Tue Jul 23, 2019 1:15 am
Forum: Bare metal, Assembly language
Topic: swp or ldrex/strex issue on RPI2
Replies: 8
Views: 2653

Re: swp or ldrex/strex issue on RPI2

thanks, I used Raspian (2018 Nov) to create the booting SD card, the rest is bare metal (I was following the OS exercise: https://jsandler18.github.io/tutorial/locks.html). I may have found the issue, I edited my previous post, please see "EDIT 2" in my previous post, it may be related to that witho...
by rgbstar
Tue Jul 23, 2019 12:15 am
Forum: Bare metal, Assembly language
Topic: swp or ldrex/strex issue on RPI2
Replies: 8
Views: 2653

Re: swp or ldrex/strex issue on RPI2

Thanks, i got strange results, once TryLock(&lock) got called, it never returns anything. Then I remove the "BNE TrySwap", it still never return anything, then I replace the "MOV R15,R14" to "blx lr", it also never returns. Then I tried to put a small blink helper function to blink LED at pin 6. The...
by rgbstar
Mon Jul 22, 2019 10:01 pm
Forum: Bare metal, Assembly language
Topic: swp or ldrex/strex issue on RPI2
Replies: 8
Views: 2653

swp or ldrex/strex issue on RPI2

It is about a spin lock code for RPI2 (only one core is enabled), the lock pointer is passed in and swap with 0 and return the pointed value. but the code using "swp" doesn't work on RPI2 (not supported?, compiler warning, etc), so I am trying to use LDREX/STREX as replacement, it also doesn't work,...
by rgbstar
Fri Jul 19, 2019 6:41 pm
Forum: Bare metal, Assembly language
Topic: RPI2 ATAGS returns strange value
Replies: 2
Views: 960

Re: RPI2 ATAGS returns strange value

brilliant! it worked! Strangely, I can't disable the device tree from config.txt.
you saved my day, thanks very very much!
by rgbstar
Fri Jul 19, 2019 3:40 pm
Forum: Bare metal, Assembly language
Topic: RPI2 ATAGS returns strange value
Replies: 2
Views: 960

RPI2 ATAGS returns strange value

The boot SD card is created by installing raspbian 2018-11-13 on raspberry pi 2 (v1.1), then I replaced kernel7.img with my own simple os from (https://github.com/jsandler18/raspi-kernel). The modify the simple OS a little bit, the OS can blink LED, UART, and request frame buffer and print strings o...

Go to advanced search