|
@@ -17,6 +17,26 @@
|
17
|
17
|
*
|
18
|
18
|
*/
|
19
|
19
|
|
|
20
|
+/**
|
|
21
|
+ * High memory temporary load address
|
|
22
|
+ *
|
|
23
|
+ * Temporary buffer into which to copy (or decompress) our runtime
|
|
24
|
+ * image, prior to calling get_memmap() and relocate(). We don't
|
|
25
|
+ * actually leave anything here once install() has returned.
|
|
26
|
+ *
|
|
27
|
+ * We use the start of an even megabyte so that we don't have to worry
|
|
28
|
+ * about the current state of the A20 line.
|
|
29
|
+ *
|
|
30
|
+ * We use 4MB rather than 2MB because there is at least one commercial
|
|
31
|
+ * PXE ROM ("Broadcom UNDI, PXE-2.1 (build 082) v2.0.4") which stores
|
|
32
|
+ * data required by the UNDI ROM loader (yes, the ROM loader; that's
|
|
33
|
+ * the component which should be impossible to damage short of
|
|
34
|
+ * screwing with the MMU) around the 2MB mark. Sadly, this is not a
|
|
35
|
+ * joke.
|
|
36
|
+ *
|
|
37
|
+ */
|
|
38
|
+#define HIGHMEM_LOADPOINT ( 4 << 20 )
|
|
39
|
+
|
20
|
40
|
#define CR0_PE 1
|
21
|
41
|
|
22
|
42
|
.arch i386
|
|
@@ -345,11 +365,12 @@ install_prealloc:
|
345
|
365
|
movw %ax, (init_librm_vector+2)
|
346
|
366
|
movw %ax, (prot_call_vector+2)
|
347
|
367
|
|
348
|
|
- /* Install .text and .data to 2MB mark. Use 2MB to avoid
|
349
|
|
- * problems with A20.
|
|
368
|
+ /* Install .text and .data to temporary area in high memory,
|
|
369
|
+ * prior to reading the E820 memory map and relocating
|
|
370
|
+ * properly.
|
350
|
371
|
*/
|
351
|
372
|
call flatten_real_mode
|
352
|
|
- movl $(2<<20), %edi
|
|
373
|
+ movl $HIGHMEM_LOADPOINT, %edi
|
353
|
374
|
call install_highmem
|
354
|
375
|
|
355
|
376
|
/* Set up initial protected-mode GDT, call relocate().
|