unsigned int name_len;
EFI_PHYSICAL_ADDRESS addr;
UINTN size;
-} module_name;
+} module_info;
/*
* Binaries will be translated into bootmodules, the maximum number for them is
*/
#define MAX_UEFI_MODULES (MAX_MODULES - 2)
static struct file __initdata module_binary;
-static module_name __initdata modules[MAX_UEFI_MODULES];
+static module_info __initdata modules[MAX_UEFI_MODULES];
static unsigned int __initdata modules_available = MAX_UEFI_MODULES;
static unsigned int __initdata modules_idx;
for ( i = 0; i < modules_idx; i++ )
{
- module_name *mod = &modules[i];
+ module_info *mod = &modules[i];
if ( (mod->name_len == name_len) &&
(strncmp(mod->name, name, name_len) == 0) )
{
const char *name,
unsigned int name_len)
{
- module_name *file_name;
+ module_info *file_info;
CHAR16 *fname;
union string module_name;
int ret;
ret = modules_idx;
/* Save at this index the name of this binary */
- file_name = &modules[ret];
+ file_info = &modules[ret];
if ( efi_bs->AllocatePool(EfiLoaderData, (name_len + 1) * sizeof(char),
- (void**)&file_name->name) != EFI_SUCCESS )
+ (void**)&file_info->name) != EFI_SUCCESS )
{
PrintMessage(L"Error allocating memory for module binary name");
return ERROR_ALLOC_MODULE_NAME;
}
/* Save name and length of the binary in the data structure */
- strlcpy(file_name->name, name, name_len + 1);
- file_name->name_len = name_len;
+ strlcpy(file_info->name, name, name_len + 1);
+ file_info->name_len = name_len;
/* Get the file system interface. */
if ( !*dir_handle )
read_file(*dir_handle, s2w(&module_name), &module_binary, NULL);
/* Save address and size */
- file_name->addr = module_binary.addr;
- file_name->size = module_binary.size;
+ file_info->addr = module_binary.addr;
+ file_info->size = module_binary.size;
/* s2w(...) allocates some memory, free it */
efi_bs->FreePool(module_name.w);
const void *uefi_name_prop;
char mod_string[24]; /* Placeholder for module@ + a 64-bit number + \0 */
int uefi_name_len, file_idx, module_compat;
- module_name *file;
+ module_info *file;
/* Check if the node is a multiboot,module otherwise return */
module_compat = fdt_node_check_compatible(fdt, module_node_offset,
static void show_registers_32(const struct cpu_user_regs *regs,
const struct reg_ctxt *ctxt,
- bool guest_mode,
+ bool guest_mode_on,
const struct vcpu *v)
{
printk("PC: %08"PRIx32"\n", regs->pc32);
#else
printk("PC: %08"PRIx32, regs->pc);
- if ( !guest_mode )
+ if ( !guest_mode_on )
printk(" %pS", _p(regs->pc));
printk("\n");
#endif
#endif
regs->r12);
- if ( guest_mode )
+ if ( guest_mode_on )
{
printk("USR: SP: %08"PRIx32" LR: %"PRIregister"\n",
regs->sp_usr, regs->lr);
#endif
printk("\n");
- if ( guest_mode )
+ if ( guest_mode_on )
{
printk(" SCTLR: %"PRIregister"\n", ctxt->sctlr_el1);
printk(" TCR: %"PRIregister"\n", ctxt->tcr_el1);
#ifdef CONFIG_ARM_64
static void show_registers_64(const struct cpu_user_regs *regs,
const struct reg_ctxt *ctxt,
- bool guest_mode,
+ bool guest_mode_on,
const struct vcpu *v)
{
BUG_ON( (regs->cpsr & PSR_MODE_BIT) );
printk("PC: %016"PRIx64, regs->pc);
- if ( !guest_mode )
+ if ( !guest_mode_on )
printk(" %pS", _p(regs->pc));
printk("\n");
printk("LR: %016"PRIx64"\n", regs->lr);
- if ( guest_mode )
+ if ( guest_mode_on )
{
printk("SP_EL0: %016"PRIx64"\n", regs->sp_el0);
printk("SP_EL1: %016"PRIx64"\n", regs->sp_el1);
regs->x27, regs->x28, regs->fp);
printk("\n");
- if ( guest_mode )
+ if ( guest_mode_on )
{
printk(" ELR_EL1: %016"PRIx64"\n", regs->elr_el1);
printk(" ESR_EL1: %08"PRIx32"\n", ctxt->esr_el1);
static void _show_registers(const struct cpu_user_regs *regs,
const struct reg_ctxt *ctxt,
- bool guest_mode,
+ bool guest_mode_on,
const struct vcpu *v)
{
print_xen_info();
printk("CPU: %d\n", smp_processor_id());
- if ( guest_mode )
+ if ( guest_mode_on )
{
if ( regs_mode_is_32bit(regs) )
- show_registers_32(regs, ctxt, guest_mode, v);
+ show_registers_32(regs, ctxt, guest_mode_on, v);
#ifdef CONFIG_ARM_64
else
- show_registers_64(regs, ctxt, guest_mode, v);
+ show_registers_64(regs, ctxt, guest_mode_on, v);
#endif
}
else
{
#ifdef CONFIG_ARM_64
- show_registers_64(regs, ctxt, guest_mode, v);
+ show_registers_64(regs, ctxt, guest_mode_on, v);
#else
- show_registers_32(regs, ctxt, guest_mode, v);
+ show_registers_32(regs, ctxt, guest_mode_on, v);
#endif
}
printk(" VTCR_EL2: %"PRIregister"\n", READ_SYSREG(VTCR_EL2));