Browse Source

Also hide base memory region from E820 map.

tags/v0.9.3
Michael Brown 18 years ago
parent
commit
d82f71efd0
1 changed files with 7 additions and 2 deletions
  1. 7
    2
      src/arch/i386/firmware/pcbios/hidemem.c

+ 7
- 2
src/arch/i386/firmware/pcbios/hidemem.c View File

50
  */
50
  */
51
 enum {
51
 enum {
52
 	TEXT = 0,
52
 	TEXT = 0,
53
+	BASEMEM,
53
 };
54
 };
54
 
55
 
55
 /**
56
 /**
59
  */
60
  */
60
 struct hidden_region __data16_array ( hidden_regions, [] ) = {
61
 struct hidden_region __data16_array ( hidden_regions, [] ) = {
61
 	[TEXT] = { 0, 0 },
62
 	[TEXT] = { 0, 0 },
63
+	[BASEMEM] = { 0, ( 640 * 1024 ) },
62
 	{ 0, 0, } /* Terminator */
64
 	{ 0, 0, } /* Terminator */
63
 };
65
 };
64
 #define hidden_regions __use_data16 ( hidden_regions )
66
 #define hidden_regions __use_data16 ( hidden_regions )
72
 void hide_etherboot ( void ) {
74
 void hide_etherboot ( void ) {
73
 	hidden_regions[TEXT].start = virt_to_phys ( _text );
75
 	hidden_regions[TEXT].start = virt_to_phys ( _text );
74
 	hidden_regions[TEXT].end = virt_to_phys ( _end );
76
 	hidden_regions[TEXT].end = virt_to_phys ( _end );
77
+	hidden_regions[BASEMEM].start = ( rm_cs << 4 );
75
 
78
 
76
-	DBG ( "Hiding [%lx,%lx)\n",
79
+	DBG ( "Hiding [%lx,%lx) and [%lx,%lx)\n",
77
 	      ( unsigned long ) hidden_regions[TEXT].start,
80
 	      ( unsigned long ) hidden_regions[TEXT].start,
78
-	      ( unsigned long ) hidden_regions[TEXT].end );
81
+	      ( unsigned long ) hidden_regions[TEXT].end,
82
+	      ( unsigned long ) hidden_regions[BASEMEM].start,
83
+	      ( unsigned long ) hidden_regions[BASEMEM].end );
79
 
84
 
80
 	hook_bios_interrupt ( 0x15, ( unsigned int ) int15,
85
 	hook_bios_interrupt ( 0x15, ( unsigned int ) int15,
81
 			      &int15_vector );
86
 			      &int15_vector );

Loading…
Cancel
Save