Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zynq7000: initialize all CPUs #329

Merged
merged 1 commit into from
Jun 17, 2024
Merged

zynq7000: initialize all CPUs #329

merged 1 commit into from
Jun 17, 2024

Conversation

jmaksymowicz
Copy link
Contributor

This change allows all CPU cores to jump into kernel on zynq7000 (both real hardware and QEMU).

Description

The procedure of starting other CPU cores on zynq7000 is substantially different on QEMU and real hardware. On QEMU both cores jump to start of PLO code. On real hardware boot ROM parks CPU 1 in a small bit of code in high OCRAM that monitors memory address 0xfffffff0 and sleeps using wfe. In order to achieve the same behavior on QEMU code was added into _init.S that parks all other CPU cores in the same fashion.

After change CPU 0 signals other cores that they should jump to kernel before jumping to kernel itself.

Motivation and Context

Required to allow use of SMP kernel on zynq7000.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (refactoring, style fixes, git/CI config, submodule management, no code logic changes)

How Has This Been Tested?

  • Already covered by automatic testing.
  • New test added: (add PR link here).
  • Tested by hand on: armv7a9-zynq7000-zturn, armv7a9-zynq7000-qemu

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing linter checks and tests passed.
  • My changes generate no new compilation warnings for any of the targets.

Special treatment

  • This PR needs additional PRs to work (list the PRs, preferably in merge-order).
  • I will merge this PR by myself when appropriate.

Copy link

github-actions bot commented May 10, 2024

Unit Test Results

7 460 tests  ±0   6 745 ✅ ±0   39m 39s ⏱️ +26s
  420 suites ±0     715 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit ccfb38b. ± Comparison against base commit f923d7c.

♻️ This comment has been updated with latest results.

@jmaksymowicz jmaksymowicz force-pushed the jmaksymowicz/zynq7000-smp branch 2 times, most recently from 197cc21 to 33ecac3 Compare May 10, 2024 14:18
@jmaksymowicz jmaksymowicz force-pushed the jmaksymowicz/zynq7000-smp branch 3 times, most recently from 68c7d58 to 845ea3d Compare May 24, 2024 10:25
Copy link
Member

@agkaminski agkaminski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Darchiv Darchiv merged commit 3dbd1ac into master Jun 17, 2024
30 checks passed
@Darchiv Darchiv deleted the jmaksymowicz/zynq7000-smp branch June 17, 2024 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants