orl $(CR0_PG|CR0_WP), %eax
movl %eax, %cr0
+ # LAB 1: Set sentinel value of %ebp
+ movl $0xF00, %ebp
+
# Set up the stack pointer.
movl $(stack + KSTACKSIZE), %esp
orl $(CR0_PE|CR0_PG|CR0_WP), %eax
movl %eax, %cr0
+ # LAB 1: Set sentinel value of %ebp
+ movl $0xF00, %ebp
+
# Switch to the stack allocated by startothers()
movl (start-4), %esp
# Call mpenter()
movw %ax, %ds
movw %ax, %es
+ # LAB 1: Set sentinel value of %ebp
+ movl $0xF00, %ebp
+
# Call trap(tf), where tf=%esp
pushl %esp
call trap
p->context = (struct context*)sp;
memset(p->context, 0, sizeof *p->context);
p->context->eip = (uint)forkret;
+ // LAB 1: Set sentinel value of %ebp
+ p->context->ebp = 0xF00;
return p;
}