Commit ed0be658 authored by Yi Lin's avatar Yi Lin

fix a problem with global yp. All experiments related with global yp should...

fix a problem with global yp. All experiments related with global yp should run with revisions after this one
parent 96ad9fd5
......@@ -670,20 +670,23 @@ hardwareTrapHandler(int signo, siginfo_t *si, void *context)
if (YIELDPOINT_IMPL == 11 || YIELDPOINT_IMPL == 12) {
unsigned int faultAddress = (unsigned int ) si->si_addr;
Address* sp = (Address*) (IA32_ESP(context) - 4);
IA32_ESP(context) = IA32_ESP(context) - 4;
instructionFollowing = getInstructionFollowing(localInstructionAddress);
*sp = instructionFollowing;
unsigned int yieldpointHandlerAddress;
if (faultAddress == PROTECT_GLOBAL_PAGE_BL) {
yieldpointHandlerAddress = *(unsigned int*) (localJTOC + bootRecord->yieldpointFromPrologueOffset);
} else {
yieldpointHandlerAddress = *(unsigned int*) (localJTOC + bootRecord->yieldpointFromPrologueOptOffset);
// check if it is our duty
if (faultAddress >= PROTECT_GLOBAL_PAGE_BL && faultAddress < PROTECT_GLOBAL_PAGE_BL + PROTECT_PAGE_SIZE) {
Address* sp = (Address*) (IA32_ESP(context) - 4);
IA32_ESP(context) = IA32_ESP(context) - 4;
instructionFollowing = getInstructionFollowing(localInstructionAddress);
*sp = instructionFollowing;
unsigned int yieldpointHandlerAddress;
if (faultAddress == PROTECT_GLOBAL_PAGE_BL) {
yieldpointHandlerAddress = *(unsigned int*) (localJTOC + bootRecord->yieldpointFromPrologueOffset);
} else {
yieldpointHandlerAddress = *(unsigned int*) (localJTOC + bootRecord->yieldpointFromPrologueOptOffset);
}
IA32_EIP(context) = yieldpointHandlerAddress;
return;
}
IA32_EIP(context) = yieldpointHandlerAddress;
return;
}
/* page protection local yieldpoint */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment