Skip to content

Commit

Permalink
memdisk/setup: Rename int15maxres to setmaxmem
Browse files Browse the repository at this point in the history
The old name was intended as a test to prevent collision.  New name
seems more logical and appropriate.  By reusing the mem= parameter and
adjusting all of the memory calls that MEMDISK replaces through the use
of insertrange(), there's nothing better that we can do.
  • Loading branch information
geneC committed Feb 9, 2011
1 parent 282527d commit a028af9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions memdisk/setup.c
Expand Up @@ -708,19 +708,19 @@ static int stack_needed(void)
}

/*
* Specify max RAM by reservation
* Adds a reservation to data in INT15h to prevent access to the top of RAM
* Set max memory by reservation
* Adds reservations to data in INT15h to prevent access to the top of RAM
* if there's any above the point specified.
*/
void int15maxres(unsigned long long restop_ull)
void setmaxmem(unsigned long long restop_ull)
{
uint32_t restop;
struct e820range *ep;
const int int15restype = 2;

/* insertrange() works on uint32_t */
restop = min(restop_ull, UINT32_MAX);
/* printf(" int15maxres '%08x%08x' => %08x\n",
/* printf(" setmaxmem '%08x%08x' => %08x\n",
(unsigned int)(restop_ull>>32), (unsigned int)restop_ull, restop); */

for (ep = ranges; ep->type != -1U; ep++) {
Expand Down Expand Up @@ -976,7 +976,7 @@ void setup(const struct real_mode_args *rm_args_ptr)
}

if ((p = getcmditem("mem")) != CMD_NOTFOUND) {
int15maxres(suffix_number(p));
setmaxmem(suffix_number(p));
}

/* The size is given by hptr->total_size plus the size of the E820
Expand Down

0 comments on commit a028af9

Please sign in to comment.