When returning to real mode, set 4GB segment limits instead of 64kB limits. This change improves our chances of successfully returning to a PMM-capable BIOS aftering entering iPXE during POST; the BIOS will have set up flat real mode before calling our initialisation point, and may be disconcerted if we then return in genuine real mode. This change is unlikely to break anything, since any code that might potentially access beyond 64kB must use addr32 prefixes to do so; if this is the case then it is almost certainly code written to expect flat real mode anyway. Note that it is not possible to restore the real-mode segment limits to their original values, since it is not possible to know which protected-mode segment descriptor was originally used to initialise the limit portion of the segment register. Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
|
||
263 |
|
263 |
|
264 |
|
264 |
|
265 |
|
265 |
|
266 |
|
|
|
|
266 |
|
|
267 |
|
267 |
|
268 |
|
268 |
|
269 |
|
|
|
270 |
|
|
|
|
269 |
|
|
|
270 |
|
|
271 |
|
271 |
|
272 |
|
272 |
|
273 |
|
|
|
|
273 |
|
|
274 |
|
274 |
|
275 |
|
275 |
|
276 |
|
276 |
|
|
|
||
28 |
|
28 |
|
29 |
|
29 |
|
30 |
|
30 |
|
31 |
|
|
|
32 |
|
|
|
33 |
|
|
|
34 |
|
31 |
|
35 |
|
32 |
|
36 |
|
33 |
|
|
|
||
40 |
|
37 |
|
41 |
|
38 |
|
42 |
|
39 |
|
43 |
|
|
|
44 |
|
|
|
45 |
|
|
|
46 |
|
|
|
47 |
|
|
|
48 |
|
|
|
49 |
|
40 |
|
50 |
|
41 |
|
51 |
|
42 |
|
|
|
||
75 |
|
66 |
|
76 |
|
67 |
|
77 |
|
68 |
|
78 |
|
|
|
|
69 |
|
|
79 |
|
70 |
|
80 |
|
|
|
|
71 |
|
|
81 |
|
72 |
|
82 |
|
73 |
|
83 |
|
|
|
|
74 |
|
|
84 |
|
75 |
|
85 |
|
|
|
|
76 |
|
|
86 |
|
77 |
|
87 |
|
78 |
|
88 |
|
79 |
|