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
parent 9c3f6e3660
commit e0a7471cf8

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;
}