mirror of
https://github.com/xcat2/xNBA.git
synced 2025-01-11 10:17:49 +00:00
Also hide base memory region from E820 map.
This commit is contained in:
parent
89da833c5d
commit
d82f71efd0
@ -50,6 +50,7 @@ extern struct segoff __text16 ( int15_vector );
|
||||
*/
|
||||
enum {
|
||||
TEXT = 0,
|
||||
BASEMEM,
|
||||
};
|
||||
|
||||
/**
|
||||
@ -59,6 +60,7 @@ enum {
|
||||
*/
|
||||
struct hidden_region __data16_array ( hidden_regions, [] ) = {
|
||||
[TEXT] = { 0, 0 },
|
||||
[BASEMEM] = { 0, ( 640 * 1024 ) },
|
||||
{ 0, 0, } /* Terminator */
|
||||
};
|
||||
#define hidden_regions __use_data16 ( hidden_regions )
|
||||
@ -72,10 +74,13 @@ struct hidden_region __data16_array ( hidden_regions, [] ) = {
|
||||
void hide_etherboot ( void ) {
|
||||
hidden_regions[TEXT].start = virt_to_phys ( _text );
|
||||
hidden_regions[TEXT].end = virt_to_phys ( _end );
|
||||
hidden_regions[BASEMEM].start = ( rm_cs << 4 );
|
||||
|
||||
DBG ( "Hiding [%lx,%lx)\n",
|
||||
DBG ( "Hiding [%lx,%lx) and [%lx,%lx)\n",
|
||||
( unsigned long ) hidden_regions[TEXT].start,
|
||||
( unsigned long ) hidden_regions[TEXT].end );
|
||||
( unsigned long ) hidden_regions[TEXT].end,
|
||||
( unsigned long ) hidden_regions[BASEMEM].start,
|
||||
( unsigned long ) hidden_regions[BASEMEM].end );
|
||||
|
||||
hook_bios_interrupt ( 0x15, ( unsigned int ) int15,
|
||||
&int15_vector );
|
||||
|
Loading…
x
Reference in New Issue
Block a user