diff options
-rw-r--r-- | sys/amd64/amd64/cpu_switch.S | 14 | ||||
-rw-r--r-- | sys/amd64/amd64/machdep.c | 6 | ||||
-rw-r--r-- | sys/amd64/amd64/swtch.s | 14 | ||||
-rw-r--r-- | sys/i386/i386/machdep.c | 6 | ||||
-rw-r--r-- | sys/i386/i386/swtch.s | 14 |
5 files changed, 31 insertions, 23 deletions
diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S index 7a66fba..4f2bdcb 100644 --- a/sys/amd64/amd64/cpu_switch.S +++ b/sys/amd64/amd64/cpu_switch.S @@ -194,14 +194,18 @@ sw1b: movl PCB_EXT(%edx), %edi /* new tss descriptor */ jmp 2f /* Load it up */ -1: /* Use the common default TSS instead of our own */ - /* Set our stack pointer into the TSS, it's set to just */ - /* below the PCB. In C, common_tss.tss_esp0 = &pcb - 16; */ +1: /* + * Use the common default TSS instead of our own. + * Set our stack pointer into the TSS, it's set to just + * below the PCB. In C, common_tss.tss_esp0 = &pcb - 16; + */ leal -16(%edx), %ebx /* leave space for vm86 */ movl %ebx, PCPU(COMMON_TSS) + TSS_ESP0 - /* Test this CPU's bit in the bitmap to see if this */ - /* CPU was using a private TSS. */ + /* + * Test this CPU's bit in the bitmap to see if this + * CPU was using a private TSS. + */ btrl %esi, private_tss /* Already using the common? */ jae 3f /* if so, skip reloading */ PCPU_ADDR(COMMON_TSSD, %edi) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index a61ccdd..acb555c 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -1658,7 +1658,6 @@ init386(first) #endif struct pcpu *pc; - proc0.p_uarea = proc0uarea; thread0.td_kstack = proc0kstack; thread0.td_pcb = (struct pcb *) @@ -1666,9 +1665,8 @@ init386(first) atdevbase = ISA_HOLE_START + KERNBASE; /* - * This may be done better later if it gets more - * high level components in it. If so just link td->td_proc - * here. + * This may be done better later if it gets more high level + * components in it. If so just link td->td_proc here. */ proc_linkup(&proc0, &proc0.p_ksegrp, &proc0.p_kse, &thread0); diff --git a/sys/amd64/amd64/swtch.s b/sys/amd64/amd64/swtch.s index 7a66fba..4f2bdcb 100644 --- a/sys/amd64/amd64/swtch.s +++ b/sys/amd64/amd64/swtch.s @@ -194,14 +194,18 @@ sw1b: movl PCB_EXT(%edx), %edi /* new tss descriptor */ jmp 2f /* Load it up */ -1: /* Use the common default TSS instead of our own */ - /* Set our stack pointer into the TSS, it's set to just */ - /* below the PCB. In C, common_tss.tss_esp0 = &pcb - 16; */ +1: /* + * Use the common default TSS instead of our own. + * Set our stack pointer into the TSS, it's set to just + * below the PCB. In C, common_tss.tss_esp0 = &pcb - 16; + */ leal -16(%edx), %ebx /* leave space for vm86 */ movl %ebx, PCPU(COMMON_TSS) + TSS_ESP0 - /* Test this CPU's bit in the bitmap to see if this */ - /* CPU was using a private TSS. */ + /* + * Test this CPU's bit in the bitmap to see if this + * CPU was using a private TSS. + */ btrl %esi, private_tss /* Already using the common? */ jae 3f /* if so, skip reloading */ PCPU_ADDR(COMMON_TSSD, %edi) diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index a61ccdd..acb555c 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -1658,7 +1658,6 @@ init386(first) #endif struct pcpu *pc; - proc0.p_uarea = proc0uarea; thread0.td_kstack = proc0kstack; thread0.td_pcb = (struct pcb *) @@ -1666,9 +1665,8 @@ init386(first) atdevbase = ISA_HOLE_START + KERNBASE; /* - * This may be done better later if it gets more - * high level components in it. If so just link td->td_proc - * here. + * This may be done better later if it gets more high level + * components in it. If so just link td->td_proc here. */ proc_linkup(&proc0, &proc0.p_ksegrp, &proc0.p_kse, &thread0); diff --git a/sys/i386/i386/swtch.s b/sys/i386/i386/swtch.s index 7a66fba..4f2bdcb 100644 --- a/sys/i386/i386/swtch.s +++ b/sys/i386/i386/swtch.s @@ -194,14 +194,18 @@ sw1b: movl PCB_EXT(%edx), %edi /* new tss descriptor */ jmp 2f /* Load it up */ -1: /* Use the common default TSS instead of our own */ - /* Set our stack pointer into the TSS, it's set to just */ - /* below the PCB. In C, common_tss.tss_esp0 = &pcb - 16; */ +1: /* + * Use the common default TSS instead of our own. + * Set our stack pointer into the TSS, it's set to just + * below the PCB. In C, common_tss.tss_esp0 = &pcb - 16; + */ leal -16(%edx), %ebx /* leave space for vm86 */ movl %ebx, PCPU(COMMON_TSS) + TSS_ESP0 - /* Test this CPU's bit in the bitmap to see if this */ - /* CPU was using a private TSS. */ + /* + * Test this CPU's bit in the bitmap to see if this + * CPU was using a private TSS. + */ btrl %esi, private_tss /* Already using the common? */ jae 3f /* if so, skip reloading */ PCPU_ADDR(COMMON_TSSD, %edi) |