/* lssal.c - Display EFI SAL systab. */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2008 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 void
{
struct grub_efi_sal_system_table *t = table;
void *desc;
grub_printf ("SAL rev: %02x, signature: %x, len:%x\n",
grub_printf ("nbr entry: %d, chksum: %02x, SAL version A: %02x B: %02x\n",
t->entry_count, t->checksum,
t->sal_a_version, t->sal_b_version);
while (len > 0)
{
switch (*(grub_uint8_t *) desc)
{
{
struct grub_efi_sal_system_table_entrypoint_descriptor *c = desc;
l = sizeof (*c);
PRIxGRUB_UINT64_T "\n",
c->pal_proc_addr, c->sal_proc_addr,
c->global_data_ptr);
}
break;
{
struct grub_efi_sal_system_table_memory_descriptor *c = desc;
l = sizeof (*c);
grub_printf (" sal_used=%d attr=%x AR=%x attr_mask=%x "
"type=%x usage=%x\n",
c->usage);
}
break;
{
struct grub_efi_sal_system_table_platform_features *c = desc;
l = sizeof (*c);
grub_printf (" BusLock");
grub_printf (" IrqRedirect");
grub_printf (" IPIRedirect");
grub_printf (" ITCDrift");
grub_printf ("\n");
}
break;
{
= desc;
l = sizeof (*c);
c->register_type, c->register_number,
}
break;
{
= desc;
l = sizeof (*c);
}
break;
{
struct grub_efi_sal_system_table_ap_wakeup *c = desc;
l = sizeof (*c);
}
break;
default:
return;
}
len -= l;
}
}
static grub_err_t
{
unsigned int i;
for (i = 0; i < st->num_table_entries; i++)
{
sizeof (grub_efi_guid_t)) == 0)
{
disp_sal (t->vendor_table);
return GRUB_ERR_NONE;
}
t++;
}
grub_printf ("SAL not found\n");
return GRUB_ERR_NONE;
}
{
"Display SAL system table.");
}
{
}