aarch64: Add a set_tcb method to setup tpidr_el0
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user