Fix implementation of clone and exec. Now the init process can load and execute the pci driver

This commit is contained in:
Jeremy Soller 2016-09-15 08:35:07 -06:00
commit 33e098c124

View file

@ -61,8 +61,11 @@ impl<'a> Elf<'a> {
let mut context = context_lock.write();
// Unmap previous image and stack
println!("Clear image");
context.image.clear();
println!("Drop heap");
drop(context.heap.take());
println!("Drop stack");
drop(context.stack.take());
for segment in self.segments() {
@ -112,6 +115,7 @@ impl<'a> Elf<'a> {
}
// Go to usermode
println!("Execute {:X}", self.entry());
unsafe { usermode(self.entry(), arch::USER_STACK_OFFSET + arch::USER_STACK_SIZE - 256); }
}
}