/* loadbios.c - command to load a bios dump */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2009 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/>.
*/
GRUB_MOD_LICENSE ("GPLv3+");
static int
enable_rom_area (void)
{
{
return 0;
}
/* FIXME: should be macroified. */
grub_pci_write_byte (addr, 0);
*rom_ptr = 0;
if (*rom_ptr != 0)
{
return 0;
}
return 1;
}
static void
lock_rom_area (void)
{
/* FIXME: should be macroified. */
}
static void
{
unsigned i;
if ((*ebda_seg_ptr) || (*low_mem_ptr))
return;
acpi = 0;
smbios = 0;
for (i = 0; i < grub_efi_system_table->num_table_entries; i++)
{
{
}
{
void *t;
if (! acpi)
acpi = t;
}
{
}
}
if (acpi)
}
static grub_err_t
{
if (enable_rom_area ())
{
fake_bios_data (1);
lock_rom_area ();
}
else
fake_bios_data (0);
return 0;
}
static grub_err_t
{
int size;
if (argc == 0)
if (argc > 1)
{
if (! file)
return grub_errno;
else
if (grub_errno)
return grub_errno;
}
if (! file)
return grub_errno;
else if (enable_rom_area ())
{
lock_rom_area ();
}
return grub_errno;
}
{
0, N_("Fake BIOS."));
N_("BIOS_DUMP [INT10_DUMP]"),
N_("Load BIOS dump."));
}
{
}