/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
struct mem_region
{
};
static int num_regions;
/*
* return the real time in ticks, of which there are about
* 18-20 per second
*/
grub_get_rtc (void)
{
}
void
{
char *ptr;
/* No hardcoded root partition - make it from the boot drive and the
partition number encoded at the install time. */
if (boot_drive == GRUB_BOOT_MACHINE_PXE_DL)
{
if (grub_pc_net_config)
return;
}
/* XXX: This should be enough. */
boot_drive & 0x7f);
if (dos_part != 0xff)
if (bsd_part != 0xff)
bsd_part + 1);
*ptr = 0;
}
/* Add a memory region. */
static void
{
if (num_regions == MAX_REGIONS)
/* Ignore. */
return;
num_regions++;
}
/* Compact memory regions. */
static void
compact_mem_regions (void)
{
int i, j;
/* Sort them. */
for (i = 0; i < num_regions - 1; i++)
for (j = i + 1; j < num_regions; j++)
{
mem_regions[i] = mem_regions[j];
mem_regions[j] = tmp;
}
/* Merge overlaps. */
for (i = 0; i < num_regions - 1; i++)
{
j = i + 1;
- mem_regions[i].addr);
i--;
num_regions--;
}
}
void
grub_machine_init (void)
{
int i;
#if 0
int grub_lower_mem;
#endif
/* Initialize the console as early as possible. */
/* This sanity check is useless since top of GRUB_MEMORY_MACHINE_RESERVED_END
is used for stack and if it's unavailable we wouldn't have gotten so far.
*/
#if 0
/* Sanity check. */
grub_fatal ("too small memory");
#endif
heap implements support for requesting a chunk in low memory, this should
no longer be a problem. */
#if 0
/* Add the lower memory into free memory. */
#endif
{
/* Avoid the lower memory. */
if (addr < 0x100000)
{
return 0;
addr = 0x100000;
}
/* Ignore >4GB. */
{
? 0xFFFFFFFF - addr
: size);
}
return 0;
}
for (i = 0; i < num_regions; i++)
grub_tsc_init ();
}
void
grub_machine_fini (void)
{
grub_stop_floppy ();
}