aarch64: Add a set_tcb method to setup tpidr_el0

This commit is contained in:
Robin Randhawa
2021-01-15 15:50:00 +00:00
committed by Jeremy Soller
parent ae3a55f5d1
commit 14d79927af

View File

@@ -104,6 +104,10 @@ impl Context {
self.lr = address;
}
pub fn set_tcb(&mut self, pid: usize) {
self.tpidr_el0 = (crate::USER_TCB_OFFSET + pid * crate::PAGE_SIZE);
}
pub fn set_fp(&mut self, address: usize) {
self.fp = address;
}