Skip to content

Conversation

@Inquisitor-201
Copy link
Contributor

No description provided.

liulog and others added 30 commits June 20, 2025 17:32

pub fn cpuid_to_mpidr_affinity(cpuid: u64) -> (u64, u64, u64, u64) {
let mpidr = BOARD_MPIDR_MAPPINGS[cpuid as usize];
let aff3 = (mpidr >> 32) & 0xff;
Copy link
Contributor

Choose a reason for hiding this comment

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

This may be aff3 = (mpidr >> 24) ?

Copy link
Contributor Author

@Inquisitor-201 Inquisitor-201 Sep 7, 2025

Choose a reason for hiding this comment

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

image According to https://developer.arm.com/documentation/ddi0601/2025-06/AArch64-Registers/MPIDR-EL1--Multiprocessor-Affinity-Register, aff3 should be mpidr >> 32

Copy link
Contributor

Choose a reason for hiding this comment

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

It is reasonable. All right.

.position(|&x| x == mpidr)
.expect("MPIDR from BOARD_MPIDR_MAPPINGS must be present in sorted list");

GIC.get().unwrap().gicr_base + order * PER_GICR_SIZE
Copy link
Contributor

Choose a reason for hiding this comment

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

I have a question here. The correct way to find the gicr base of one cpu is to check if GICR_TYPER.Affinity_value is equal to the mpidr of this cpu. I searched in the internet and found that the order of the cpu's mpidr may not be the order of the cpu's gicr_base.

use crate::hypercall::HyperCallResult;
impl<'a> HyperCall<'a> {
pub fn hv_ivc_info(&mut self, ivc_info_ipa: u64) -> HyperCallResult {
warn!("hv_ivc_info is not implemented for Risc-V");
Copy link
Member

Choose a reason for hiding this comment

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

Risc-V should be LoongArch64 ?

Copy link

@caodg caodg left a comment

Choose a reason for hiding this comment

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

we should indicate the current status, the main and new features, in README, and list major changes in CHANGELOG.md

@Inquisitor-201 Inquisitor-201 merged commit 06a79e5 into main Sep 11, 2025
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants