Comments (6)
Hey @artit91, could you please submit this information as a PR where you would have liked to see that? We'd love to add this information to the tutorial!
from rust-raspberrypi-os-tutorials.
Hi Attila, James,
It is indeed planned to have a tutorial on using multiple cores concurrently, but it will take some time until we get there. We need to write a scheduler first, and have yet to cover some tutorials that are dependencies for having a scheduler (interrupts, spinlocks and potentially other synchronization primitives).
Also, the code you posted puzzles me a bit. Can you post a reference?
What we do right now is parking all cores except core0 with the wfe
(wait for event) machine instruction, and only let core0 process further with an initialization routine that is tailored for it.
As a sneak peek: Once we get there with our tutorials, we can wake up the remaining slave cores by sending them an "event" and let them come online with their own init routine once core0 has set up the scheduler and the likes.
You can read more about wfe
and sending events in the ARMv8 architecture reference manual.
BR,
Andre
from rust-raspberrypi-os-tutorials.
Hi,
I don't want to leave you confused, I have tried the code in qemu and it didn't start all the cores.
Then I have found this:
https://github.com/qemu/qemu/blob/595123df1d54ed8fbab9e1a73d5a58c5bb71058f/hw/arm/raspi.c#L67
From the code I have figured out that I have to write to those addresses to able to start the cores.
I haven't tested on a real hardware though but it looks it works the same way from this:
BR,
Attila
from rust-raspberrypi-os-tutorials.
Thank you. With the new context it makes sense. What you see is the same as I laid out earlier.
The secondary cores spin on wfe
until an event occurs, and then they check predefined memory locations (0xe0
, ...) for magic values that tell them to either go back to sleep again or jump to boot code for secondary cores.
What you are pointing at is other firmware, and not some HW functionality, that's why it doesn't work for you now, because we are putting our secondary cores into infinite sleep as of now: https://github.com/rust-embedded/rust-raspi3-OS-tutorials/blob/master/07_abstraction/raspi3_boot/src/lib.rs#L85-L88
When we will have our multi-core tutorial sometime in the future, this scheme will be used as well.
from rust-raspberrypi-os-tutorials.
Hi Attila,
is this enough information for you to close this issue, or do you have any follow up questions?
BR,
Andre
from rust-raspberrypi-os-tutorials.
Hi,
Yes, enough.
Thank you,
Attila
from rust-raspberrypi-os-tutorials.
Related Issues (20)
- invalid file operation error HOT 3
- error[E0463]: can't find crate for `core` HOT 2
- Complete Chinese Translation HOT 3
- I want to know about other microcontrollers, you can refer to this example HOT 3
- Pure rust chainboot HOT 1
- Cannot start to work with this repo
- error: linker `cc` not found [Makefile:123: target/aarch64-unknown-none-softfloat/release/kernel] Error 101 HOT 1
- chapter 6 can not get correct output, stuck at: [ML] Requesting binary HOT 1
- everything seems to work fine but I cant input anything HOT 3
- Miniterminal not working on Raspberry pi 4 HOT 1
- ICR management question
- Error regarding Github CI/CD HOT 3
- Depracated link in The tl;dr Version subsection of README.md file HOT 2
- Invalid links in 11_exceptions_part1_groundwork/README.md HOT 2
- Consider generating these documents into a website
- Plans for even more embedded devices
- Please Change README HOT 2
- Why use Makefile handle build process? HOT 1
- Currently porting to RISC-V
- What determines the value of GPIO_PUP_PDN_CONTR_REG ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust-raspberrypi-os-tutorials.