Lines 38-49
Link Here
|
38 |
* The mapping of lower virtual memory has been created in prelog and |
38 |
* The mapping of lower virtual memory has been created in prelog and |
39 |
* epilog. |
39 |
* epilog. |
40 |
*/ |
40 |
*/ |
|
|
41 |
#ifdef CONFIG_PAX_KERNEXEC |
41 |
movl $(__KERNEXEC_EFI_DS), %edx |
42 |
movl $(__KERNEXEC_EFI_DS), %edx |
42 |
mov %edx, %ds |
43 |
mov %edx, %ds |
43 |
mov %edx, %es |
44 |
mov %edx, %es |
44 |
mov %edx, %ss |
45 |
mov %edx, %ss |
45 |
ljmp $(__KERNEXEC_EFI_CS),$1f-__PAGE_OFFSET |
46 |
addl $2f,(1f) |
|
|
47 |
ljmp *(1f) |
48 |
|
49 |
__INITDATA |
50 |
1: .long __LOAD_PHYSICAL_ADDR, __KERNEXEC_EFI_CS |
51 |
.previous |
52 |
|
53 |
2: |
54 |
subl $2b,(1b) |
55 |
#else |
56 |
jmp 1f-__PAGE_OFFSET |
46 |
1: |
57 |
1: |
|
|
58 |
#endif |
47 |
|
59 |
|
48 |
/* |
60 |
/* |
49 |
* 2. Now on the top of stack is the return |
61 |
* 2. Now on the top of stack is the return |
Lines 90-101
Link Here
|
90 |
* 8. Now restore the virtual mode from flat mode by |
102 |
* 8. Now restore the virtual mode from flat mode by |
91 |
* adding EIP with PAGE_OFFSET. |
103 |
* adding EIP with PAGE_OFFSET. |
92 |
*/ |
104 |
*/ |
93 |
ljmp $(__KERNEL_CS),$1f+__PAGE_OFFSET |
105 |
#ifdef CONFIG_PAX_KERNEXEC |
94 |
1: |
|
|
95 |
movl $(__KERNEL_DS), %edx |
106 |
movl $(__KERNEL_DS), %edx |
96 |
mov %edx, %ds |
107 |
mov %edx, %ds |
97 |
mov %edx, %es |
108 |
mov %edx, %es |
98 |
mov %edx, %ss |
109 |
mov %edx, %ss |
|
|
110 |
ljmp $(__KERNEL_CS),$1f |
111 |
#else |
112 |
jmp 1f+__PAGE_OFFSET |
113 |
#endif |
114 |
1: |
99 |
|
115 |
|
100 |
/* |
116 |
/* |
101 |
* 9. Balance the stack. And because EAX contain the return value, |
117 |
* 9. Balance the stack. And because EAX contain the return value, |