You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.globl _start
_start:
mrs x0, mpidr_el1
and x0, x0,#0xFF // Check processor id
cbz x0, master // Hang for all non-primary CPU
b proc_hang
The first thing this function does is check the processor ID. The Raspberry Pi 3 has four core processors, and after the device is powered on, each core begins to execute the same code. However, we don't want to work with four cores; we want to work only with the first one and put all of the other cores in an endless loop. This is exactly what the _start function is responsible for. **It gets the processor ID** from the [mpidr_el1](http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0500g/BABHBJCI.html) system register. **If the current process ID is 0**, then execution is transferred to the master function:
The correct term should be "processor ID" because mpidr_el1 identifies the processor core (not a software process). At this point in the boot process, there's no OS and hence no concept of process IDs.
I’d be happy to submit a pull request with a fix!
The text was updated successfully, but these errors were encountered:
docs/lesson01/rpi-os.md reads:
The first thing this function does is check the processor ID. The Raspberry Pi 3 has four core processors, and after the device is powered on, each core begins to execute the same code. However, we don't want to work with four cores; we want to work only with the first one and put all of the other cores in an endless loop. This is exactly what the _start function is responsible for. **It gets the processor ID** from the [mpidr_el1](http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0500g/BABHBJCI.html) system register. **If the current process ID is 0**, then execution is transferred to the master function:
The correct term should be "processor ID" because mpidr_el1 identifies the processor core (not a software process). At this point in the boot process, there's no OS and hence no concept of process IDs.
I’d be happy to submit a pull request with a fix!
The text was updated successfully, but these errors were encountered: