struct grub_efi_guid acpi = GRUB_EFI_ACPI_TABLE_GUID;
struct grub_efi_guid acpi20 = GRUB_EFI_ACPI_20_TABLE_GUID;
- efi_call_2 (grub_efi_system_table->boot_services->install_configuration_table,
- &acpi20, grub_acpi_get_rsdpv2 ());
- efi_call_2 (grub_efi_system_table->boot_services->install_configuration_table,
- &acpi, grub_acpi_get_rsdpv1 ());
+ grub_efi_system_table->boot_services->install_configuration_table (&acpi20,
+ grub_acpi_get_rsdpv2 ());
+ grub_efi_system_table->boot_services->install_configuration_table (&acpi,
+ grub_acpi_get_rsdpv1 ());
}
#endif
if (mode != o->mode->mode)
{
- status = efi_call_2 (o->set_mode, o, mode);
+ status = o->set_mode (o, mode);
if (status == GRUB_EFI_SUCCESS)
;
else if (status == GRUB_EFI_DEVICE_ERROR)
grub_printf_ (N_("Available modes for console output device.\n"));
for (i = 0; i < o->mode->max_mode; i++)
- if (GRUB_EFI_SUCCESS == efi_call_4 (o->query_mode, o, i,
- &columns, &rows))
+ if (GRUB_EFI_SUCCESS == o->query_mode (o, i, &columns, &rows))
grub_printf_ (N_(" [%" PRIuGRUB_EFI_UINT32_T "] Col %5"
PRIuGRUB_EFI_UINTN_T " Row %5" PRIuGRUB_EFI_UINTN_T
" %c\n"),
N_("non-numeric or invalid rows number `%s'"), args[1]);
for (i = 0; i < o->mode->max_mode; i++)
- if (GRUB_EFI_SUCCESS == efi_call_4 (o->query_mode, o, i,
- &columns, &rows))
+ if (GRUB_EFI_SUCCESS == o->query_mode (o, i, &columns, &rows))
if (u_columns == columns && u_rows == rows)
return grub_efi_set_mode (o, (grub_efi_int32_t) i);
grub_efi_print_device_path (dp);
}
- status = efi_call_3 (grub_efi_system_table->boot_services->protocols_per_handle,
- handle, &protocols, &num_protocols);
+ status = grub_efi_system_table->boot_services->protocols_per_handle (handle,
+ &protocols,
+ &num_protocols);
if (status != GRUB_EFI_SUCCESS) {
grub_printf ("Unable to retrieve protocols\n");
continue;
caps.Size = (grub_uint8_t) sizeof (caps);
- status = efi_call_5 (tpm->status_check, tpm, &caps, &flags, &eventlog,
- &lastevent);
+ status = tpm->status_check (tpm, &caps, &flags, &eventlog, &lastevent);
if (status != GRUB_EFI_SUCCESS || caps.TPMDeactivatedFlag
|| !caps.TPMPresentFlag)
if (tpm2_present != -1)
return (grub_efi_boolean_t) tpm2_present;
- status = efi_call_2 (tpm->get_capability, tpm, &caps);
+ status = tpm->get_capability (tpm, &caps);
if (status != GRUB_EFI_SUCCESS || !caps.TPMPresentFlag)
tpm2_present = 0;
grub_strcpy ((char *) event->Event, description);
algorithm = TCG_ALG_SHA;
- status = efi_call_7 (tpm->log_extend_event, tpm, (grub_addr_t) buf, (grub_uint64_t) size,
- algorithm, event, &eventnum, &lastevent);
+ status = tpm->log_extend_event (tpm, (grub_addr_t) buf, (grub_uint64_t) size,
+ algorithm, event, &eventnum, &lastevent);
grub_free (event);
return grub_efi_log_event_status (status);
sizeof (*event) - sizeof (event->Event) + grub_strlen (description) + 1;
grub_strcpy ((char *) event->Event, description);
- status = efi_call_5 (tpm->hash_log_extend_event, tpm, 0, (grub_addr_t) buf,
- (grub_uint64_t) size, event);
+ status = tpm->hash_log_extend_event (tpm, 0, (grub_addr_t) buf,
+ (grub_uint64_t) size, event);
grub_free (event);
return grub_efi_log_event_status (status);
if (cc == NULL)
return;
- status = efi_call_3 (cc->map_pcr_to_mr_index, cc, pcr, &mr);
+ status = cc->map_pcr_to_mr_index (cc, pcr, &mr);
if (status != GRUB_EFI_SUCCESS)
{
grub_efi_log_event_status (status);
event->Size = sizeof (*event) + grub_strlen (description) + 1;
grub_strcpy ((char *) event->Event, description);
- status = efi_call_5 (cc->hash_log_extend_event, cc, 0,
- (grub_efi_physical_address_t)(grub_addr_t) buf,
- (grub_efi_uint64_t) size, event);
+ status = cc->hash_log_extend_event (cc, 0,
+ (grub_efi_physical_address_t)(grub_addr_t) buf,
+ (grub_efi_uint64_t) size, event);
grub_free (event);
if (status != GRUB_EFI_SUCCESS)
aligned_buf = buf;
}
- status = efi_call_5 ((wr ? bio->write_blocks : bio->read_blocks), bio,
- bio->media->media_id, (grub_efi_uint64_t) sector,
- (grub_efi_uintn_t) num_bytes, aligned_buf);
+ status = (wr ? bio->write_blocks : bio->read_blocks) (bio, bio->media->media_id,
+ (grub_efi_uint64_t) sector,
+ (grub_efi_uintn_t) num_bytes,
+ aligned_buf);
if ((grub_addr_t) buf & (io_align - 1))
{
b = grub_efi_system_table->boot_services;
- efi_call_5 (b->create_event, GRUB_EFI_EVT_TIMER | GRUB_EFI_EVT_NOTIFY_SIGNAL,
- GRUB_EFI_TPL_CALLBACK, increment_timer, NULL, &tmr_evt);
- efi_call_3 (b->set_timer, tmr_evt, GRUB_EFI_TIMER_PERIODIC, 100000);
+ b->create_event (GRUB_EFI_EVT_TIMER | GRUB_EFI_EVT_NOTIFY_SIGNAL,
+ GRUB_EFI_TPL_CALLBACK, increment_timer, NULL, &tmr_evt);
+ b->set_timer (tmr_evt, GRUB_EFI_TIMER_PERIODIC, 100000);
grub_install_get_time_ms (grub_efi_get_time_ms);
}
b = grub_efi_system_table->boot_services;
- efi_call_3 (b->set_timer, tmr_evt, GRUB_EFI_TIMER_CANCEL, 0);
- efi_call_1 (b->close_event, tmr_evt);
+ b->set_timer (tmr_evt, GRUB_EFI_TIMER_CANCEL, 0);
+ b->close_event (tmr_evt);
grub_efi_fini ();
void *interface;
grub_efi_status_t status;
- status = efi_call_3 (grub_efi_system_table->boot_services->locate_protocol,
- protocol, registration, &interface);
+ status = grub_efi_system_table->boot_services->locate_protocol (protocol,
+ registration,
+ &interface);
if (status != GRUB_EFI_SUCCESS)
return 0;
return 0;
b = grub_efi_system_table->boot_services;
- status = efi_call_5 (b->locate_handle, search_type, protocol, search_key,
+ status = b->locate_handle (search_type, protocol, search_key,
&buffer_size, buffer);
if (status == GRUB_EFI_BUFFER_TOO_SMALL)
{
if (! buffer)
return 0;
- status = efi_call_5 (b->locate_handle, search_type, protocol, search_key,
+ status = b->locate_handle (search_type, protocol, search_key,
&buffer_size, buffer);
}
void *interface;
b = grub_efi_system_table->boot_services;
- status = efi_call_6 (b->open_protocol, handle,
- protocol,
- &interface,
- grub_efi_image_handle,
- 0,
- attributes);
+ status = b->open_protocol (handle,
+ protocol,
+ &interface,
+ grub_efi_image_handle,
+ 0,
+ attributes);
if (status != GRUB_EFI_SUCCESS)
return 0;
{
grub_efi_boot_services_t *b = grub_efi_system_table->boot_services;
- return efi_call_4 (b->close_protocol, handle, protocol, grub_efi_image_handle, NULL);
+ return b->close_protocol (handle, protocol, grub_efi_image_handle, NULL);
}
int
already in text mode. */
return 1;
- if (efi_call_4 (c->get_mode, c, &mode, 0, 0) != GRUB_EFI_SUCCESS)
+ if (c->get_mode (c, &mode, 0, 0) != GRUB_EFI_SUCCESS)
return 0;
new_mode = on ? GRUB_EFI_SCREEN_TEXT : GRUB_EFI_SCREEN_GRAPHICS;
if (mode != new_mode)
- if (efi_call_2 (c->set_mode, c, new_mode) != GRUB_EFI_SUCCESS)
+ if (c->set_mode (c, new_mode) != GRUB_EFI_SUCCESS)
return 0;
return 1;
void
grub_efi_stall (grub_efi_uintn_t microseconds)
{
- efi_call_1 (grub_efi_system_table->boot_services->stall, microseconds);
+ grub_efi_system_table->boot_services->stall (microseconds);
}
grub_efi_loaded_image_t *
{
grub_machine_fini (GRUB_LOADER_FLAG_NORETURN |
GRUB_LOADER_FLAG_EFI_KEEP_ALLOCATED_MEMORY);
- efi_call_4 (grub_efi_system_table->runtime_services->reset_system,
- GRUB_EFI_RESET_COLD, GRUB_EFI_SUCCESS, 0, NULL);
+ grub_efi_system_table->runtime_services->reset_system (GRUB_EFI_RESET_COLD,
+ GRUB_EFI_SUCCESS, 0,
+ NULL);
for (;;) ;
}
grub_exit (void)
{
grub_machine_fini (GRUB_LOADER_FLAG_NORETURN);
- efi_call_4 (grub_efi_system_table->boot_services->exit,
- grub_efi_image_handle, GRUB_EFI_SUCCESS, 0, 0);
+ grub_efi_system_table->boot_services->exit (grub_efi_image_handle,
+ GRUB_EFI_SUCCESS, 0, 0);
for (;;) ;
}
grub_efi_status_t status;
r = grub_efi_system_table->runtime_services;
- status = efi_call_4 (r->set_virtual_address_map, memory_map_size,
- descriptor_size, descriptor_version, virtual_map);
+ status = r->set_virtual_address_map (memory_map_size, descriptor_size,
+ descriptor_version, virtual_map);
if (status == GRUB_EFI_SUCCESS)
return GRUB_ERR_NONE;
r = grub_efi_system_table->runtime_services;
- status = efi_call_5 (r->set_variable, var16, guid,
- (GRUB_EFI_VARIABLE_NON_VOLATILE
- | GRUB_EFI_VARIABLE_BOOTSERVICE_ACCESS
- | GRUB_EFI_VARIABLE_RUNTIME_ACCESS),
- datasize, data);
+ status = r->set_variable (var16, guid,
+ (GRUB_EFI_VARIABLE_NON_VOLATILE
+ | GRUB_EFI_VARIABLE_BOOTSERVICE_ACCESS
+ | GRUB_EFI_VARIABLE_RUNTIME_ACCESS),
+ datasize, data);
grub_free (var16);
if (status == GRUB_EFI_SUCCESS)
return GRUB_ERR_NONE;
r = grub_efi_system_table->runtime_services;
- status = efi_call_5 (r->get_variable, var16, guid, NULL, &datasize, NULL);
+ status = r->get_variable (var16, guid, NULL, &datasize, NULL);
if (status != GRUB_EFI_BUFFER_TOO_SMALL || !datasize)
{
return GRUB_EFI_OUT_OF_RESOURCES;
}
- status = efi_call_5 (r->get_variable, var16, guid, attributes, &datasize, data);
+ status = r->get_variable (var16, guid, attributes, &datasize, data);
grub_free (var16);
if (status == GRUB_EFI_SUCCESS)
* the serial console, at least on EDK2.
*/
o = grub_efi_system_table->con_out;
- efi_call_2 (o->output_string, o, stack_chk_fail_msg);
+ o->output_string (o, stack_chk_fail_msg);
- efi_call_1 (grub_efi_system_table->boot_services->stall, 5000000);
- efi_call_4 (grub_efi_system_table->runtime_services->reset_system,
- GRUB_EFI_RESET_SHUTDOWN, GRUB_EFI_ABORTED, 0, NULL);
+ grub_efi_system_table->boot_services->stall (5000000);
+ grub_efi_system_table->runtime_services->reset_system (GRUB_EFI_RESET_SHUTDOWN,
+ GRUB_EFI_ABORTED, 0, NULL);
/*
* We shouldn't get here. It's unsafe to return because the stack
{
grub_efi_status_t status;
- status = efi_call_4 (rng->get_rng, rng, NULL, sizeof (stack_chk_guard_buf),
- stack_chk_guard_buf);
+ status = rng->get_rng (rng, NULL, sizeof (stack_chk_guard_buf),
+ stack_chk_guard_buf);
if (status == GRUB_EFI_SUCCESS)
grub_memcpy (&__stack_chk_guard, stack_chk_guard_buf, sizeof (__stack_chk_guard));
}
grub_shim_lock_verifier_setup ();
}
- efi_call_4 (grub_efi_system_table->boot_services->set_watchdog_timer,
- 0, 0, 0, NULL);
+ grub_efi_system_table->boot_services->set_watchdog_timer (0, 0, 0, NULL);
grub_efidisk_init ();
}
grub_efi_status_t status;
b = grub_efi_system_table->boot_services;
- status = efi_call_3 (b->allocate_pool, GRUB_EFI_LOADER_DATA,
- sizeof(*alloc), (void**)&alloc);
+ status = b->allocate_pool (GRUB_EFI_LOADER_DATA,
+ sizeof(*alloc), (void**)&alloc);
if (status == GRUB_EFI_SUCCESS)
{
efi_allocated_memory = ea->next;
/* Then free the memory backing it. */
- efi_call_1 (b->free_pool, ea);
+ b->free_pool (ea);
/* And leave, we're done. */
break;
}
b = grub_efi_system_table->boot_services;
- status = efi_call_4 (b->allocate_pages, alloctype, memtype, pages, &address);
+ status = b->allocate_pages (alloctype, memtype, pages, &address);
if (status != GRUB_EFI_SUCCESS)
{
grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory"));
/* Uggh, the address 0 was allocated... This is too annoying,
so reallocate another one. */
address = GRUB_EFI_MAX_USABLE_ADDRESS;
- status = efi_call_4 (b->allocate_pages, alloctype, memtype, pages, &address);
+ status = b->allocate_pages (alloctype, memtype, pages, &address);
grub_efi_free_pages (0, pages);
if (status != GRUB_EFI_SUCCESS)
{
grub_efi_boot_services_t *b;
b = grub_efi_system_table->boot_services;
- efi_call_2 (b->free_pages, address, pages);
+ b->free_pages (address, pages);
grub_efi_drop_alloc (address, pages);
}
}
b = grub_efi_system_table->boot_services;
- status = efi_call_2 (b->exit_boot_services, grub_efi_image_handle,
- finish_key);
+ status = b->exit_boot_services (grub_efi_image_handle, finish_key);
if (status == GRUB_EFI_SUCCESS)
break;
descriptor_size = &size;
b = grub_efi_system_table->boot_services;
- status = efi_call_5 (b->get_memory_map, memory_map_size, memory_map, map_key,
+ status = b->get_memory_map (memory_map_size, memory_map, map_key,
descriptor_size, descriptor_version);
if (*descriptor_size == 0)
*descriptor_size = sizeof (grub_efi_memory_descriptor_t);
grub_uint64_t start_tsc, end_tsc;
/* Use EFI Time Service to calibrate TSC */
start_tsc = grub_get_tsc ();
- efi_call_1 (grub_efi_system_table->boot_services->stall, 1000);
+ grub_efi_system_table->boot_services->stall (1000);
end_tsc = grub_get_tsc ();
grub_tsc_rate = grub_divmod64 ((1ULL << 32), end_tsc - start_tsc, 0);
return 1;
grub_efi_uintn_t idx;
grub_efi_init ();
- efi_call_5 (grub_efi_system_table->boot_services->create_event,
- GRUB_EFI_EVT_TIMER, GRUB_EFI_TPL_CALLBACK, 0, 0, &event);
+ grub_efi_system_table->boot_services->create_event (GRUB_EFI_EVT_TIMER,
+ GRUB_EFI_TPL_CALLBACK,
+ 0, 0, &event);
before = get_itc ();
- efi_call_3 (grub_efi_system_table->boot_services->set_timer, event,
- GRUB_EFI_TIMER_RELATIVE, 200000);
- efi_call_3 (grub_efi_system_table->boot_services->wait_for_event, 1,
- &event, &idx);
+ grub_efi_system_table->boot_services->set_timer (event, GRUB_EFI_TIMER_RELATIVE,
+ 200000);
+ grub_efi_system_table->boot_services->wait_for_event (1, &event, &idx);
after = get_itc ();
- efi_call_1 (grub_efi_system_table->boot_services->close_event, event);
+ grub_efi_system_table->boot_services->close_event (event);
divisor = (after - before + 5) / 20;
if (divisor == 0)
divisor = 800000;
grub_efi_init ();
b = grub_efi_system_table->boot_services;
- efi_call_5 (b->create_event, GRUB_EFI_EVT_TIMER | GRUB_EFI_EVT_NOTIFY_SIGNAL,
- GRUB_EFI_TPL_CALLBACK, grub_loongson_increment_timer, NULL, &tmr_evt);
- efi_call_3 (b->set_timer, tmr_evt, GRUB_EFI_TIMER_PERIODIC, EFI_TIMER_PERIOD_MILLISECONDS(10));
+ b->create_event (GRUB_EFI_EVT_TIMER | GRUB_EFI_EVT_NOTIFY_SIGNAL,
+ GRUB_EFI_TPL_CALLBACK, grub_loongson_increment_timer, NULL, &tmr_evt);
+ b->set_timer (tmr_evt, GRUB_EFI_TIMER_PERIODIC, EFI_TIMER_PERIOD_MILLISECONDS(10));
grub_install_get_time_ms (grub_efi_get_time_ms);
}
b = grub_efi_system_table->boot_services;
- efi_call_3 (b->set_timer, tmr_evt, GRUB_EFI_TIMER_CANCEL, 0);
- efi_call_1 (b->close_event, tmr_evt);
+ b->set_timer (tmr_evt, GRUB_EFI_TIMER_CANCEL, 0);
+ b->close_event (tmr_evt);
grub_efi_fini ();
grub_efi_status_t status;
struct grub_efi_time efi_time;
- status = efi_call_2 (grub_efi_system_table->runtime_services->get_time,
- &efi_time, 0);
+ status = grub_efi_system_table->runtime_services->get_time (&efi_time, 0);
if (status)
return grub_error (GRUB_ERR_INVALID_COMMAND,
grub_efi_status_t status;
struct grub_efi_time efi_time;
- status = efi_call_2 (grub_efi_system_table->runtime_services->get_time,
- &efi_time, 0);
+ status = grub_efi_system_table->runtime_services->get_time (&efi_time, 0);
if (status)
return grub_error (GRUB_ERR_INVALID_COMMAND,
efi_time.minute = datetime->minute;
efi_time.second = datetime->second;
- status = efi_call_1 (grub_efi_system_table->runtime_services->set_time,
- &efi_time);
+ status = grub_efi_system_table->runtime_services->set_time (&efi_time);
if (status)
return grub_error (GRUB_ERR_INVALID_COMMAND,
!defined(__loongarch__) && !defined(__riscv)
grub_acpi_halt ();
#endif
- efi_call_4 (grub_efi_system_table->runtime_services->reset_system,
- GRUB_EFI_RESET_SHUTDOWN, GRUB_EFI_SUCCESS, 0, NULL);
+ grub_efi_system_table->runtime_services->reset_system (GRUB_EFI_RESET_SHUTDOWN,
+ GRUB_EFI_SUCCESS, 0, NULL);
while (1);
}
(unsigned long long) start, (unsigned long long) size);
#endif
b = grub_efi_system_table->boot_services;
- status = efi_call_4 (b->allocate_pages, GRUB_EFI_ALLOCATE_ADDRESS,
- GRUB_EFI_LOADER_DATA, size >> 12, &address);
+ status = b->allocate_pages (GRUB_EFI_ALLOCATE_ADDRESS,
+ GRUB_EFI_LOADER_DATA, size >> 12, &address);
return (status == GRUB_EFI_SUCCESS);
}
return;
b = grub_efi_system_table->boot_services;
- efi_call_2 (b->free_pages, start, size >> 12);
+ b->free_pages (start, size >> 12);
}
grub_efi_boot_services_t *b;
b = grub_efi_system_table->boot_services;
- efi_call_1 (b->unload_image, image_handle);
+ b->unload_image (image_handle);
grub_free (cmdline);
cmdline = 0;
grub_efi_boot_services_t *b;
b = grub_efi_system_table->boot_services;
- efi_call_3 (b->start_image, image_handle, 0, 0);
+ b->start_image (image_handle, 0, 0);
grub_appleloader_unload ();
b = grub_efi_system_table->boot_services;
for (pdev = devs ; pdev->devpath ; pdev++)
- if (efi_call_6 (b->load_image, 0, grub_efi_image_handle, pdev->devpath,
- NULL, 0, &image_handle) == GRUB_EFI_SUCCESS)
+ if (b->load_image (0, grub_efi_image_handle, pdev->devpath,
+ NULL, 0, &image_handle) == GRUB_EFI_SUCCESS)
break;
if (! pdev->devpath)
grub_free (loaded_image->load_options);
b = grub_efi_system_table->boot_services;
- efi_call_1 (b->unload_image, image_handle);
+ b->unload_image (image_handle);
grub_dl_unref (my_mod);
return GRUB_ERR_NONE;
grub_efi_char16_t *exit_data = NULL;
b = grub_efi_system_table->boot_services;
- status = efi_call_3 (b->start_image, image_handle, &exit_data_size, &exit_data);
+ status = b->start_image (image_handle, &exit_data_size, &exit_data);
if (status != GRUB_EFI_SUCCESS)
{
if (exit_data)
}
if (exit_data)
- efi_call_1 (b->free_pool, exit_data);
+ b->free_pool (exit_data);
grub_loader_unset ();
}
pages = (((grub_efi_uintn_t) size + ((1 << 12) - 1)) >> 12);
- status = efi_call_4 (b->allocate_pages, GRUB_EFI_ALLOCATE_ANY_PAGES,
+ status = b->allocate_pages (GRUB_EFI_ALLOCATE_ANY_PAGES,
GRUB_EFI_LOADER_CODE,
pages, &address);
if (status != GRUB_EFI_SUCCESS)
}
#endif
- status = efi_call_6 (b->load_image, 0, grub_efi_image_handle, file_path,
- boot_image, size,
- &image_handle);
+ status = b->load_image (0, grub_efi_image_handle, file_path,
+ boot_image, size,
+ &image_handle);
if (status != GRUB_EFI_SUCCESS)
{
if (status == GRUB_EFI_OUT_OF_RESOURCES)
grub_device_close (dev);
/* We're finished with the source image buffer and file path now. */
- efi_call_2 (b->free_pages, address, pages);
+ b->free_pages (address, pages);
grub_free (file_path);
grub_loader_set_ex (grub_chainloader_boot, grub_chainloader_unload, image_handle, 0);
grub_free (file_path);
if (address)
- efi_call_2 (b->free_pages, address, pages);
+ b->free_pages (address, pages);
if (image_handle != NULL)
- efi_call_1 (b->unload_image, image_handle);
+ b->unload_image (image_handle);
grub_dl_unref (my_mod);
b = grub_efi_system_table->boot_services;
address = start & (~0xfffULL);
pages = (end - address + 0xfff) >> 12;
- status = efi_call_2 (b->free_pages, address, pages);
+ status = b->free_pages (address, pages);
if (status != GRUB_EFI_SUCCESS && status != GRUB_EFI_NOT_FOUND)
{
grub_free (curover);
return 0;
}
- status = efi_call_4 (b->allocate_pages, GRUB_EFI_ALLOCATE_ADDRESS,
- make_efi_memtype (type), pages, &address);
+ status = b->allocate_pages (GRUB_EFI_ALLOCATE_ADDRESS,
+ make_efi_memtype (type), pages, &address);
if (status != GRUB_EFI_SUCCESS)
{
grub_free (curover);
{
if (curover->handle == handle)
{
- efi_call_2 (b->free_pages, curover->address, curover->pages);
+ b->free_pages (curover->address, curover->pages);
if (prevover != 0)
prevover->next = curover->next;
else
#endif
pages = (size + 0xfff) >> 12;
- status = efi_call_4 (b->allocate_pages, atype,
- make_efi_memtype (type), pages, &address);
+ status = b->allocate_pages (atype,
+ make_efi_memtype (type), pages, &address);
if (status != GRUB_EFI_SUCCESS)
{
grub_free (curover);
/* Uggh, the address 0 was allocated... This is too annoying,
so reallocate another one. */
address = 0xffffffff;
- status = efi_call_4 (b->allocate_pages, atype,
- make_efi_memtype (type), pages, &address);
+ status = b->allocate_pages (atype,
+ make_efi_memtype (type), pages, &address);
grub_efi_free_pages (0, pages);
if (status != GRUB_EFI_SUCCESS)
return 0;
while (1)
{
txbuf = NULL;
- st = efi_call_3 (net->get_status, net, 0, &txbuf);
+ st = net->get_status (net, 0, &txbuf);
if (st != GRUB_EFI_SUCCESS)
return grub_error (GRUB_ERR_IO,
N_("couldn't send network packet"));
grub_memcpy (dev->txbuf, pack->data, dev->last_pkt_size);
- st = efi_call_7 (net->transmit, net, 0, dev->last_pkt_size,
- dev->txbuf, NULL, NULL, NULL);
+ st = net->transmit (net, 0, dev->last_pkt_size,
+ dev->txbuf, NULL, NULL, NULL);
if (st != GRUB_EFI_SUCCESS)
return grub_error (GRUB_ERR_IO, N_("couldn't send network packet"));
Perhaps a timeout in the FW has discarded the recycle buffer.
*/
txbuf = NULL;
- st = efi_call_3 (net->get_status, net, 0, &txbuf);
+ st = net->get_status (net, 0, &txbuf);
dev->txbusy = !(st == GRUB_EFI_SUCCESS && txbuf);
return GRUB_ERR_NONE;
if (!dev->rcvbuf)
return NULL;
- st = efi_call_7 (net->receive, net, NULL, &bufsize,
- dev->rcvbuf, NULL, NULL, NULL);
+ st = net->receive (net, NULL, &bufsize,
+ dev->rcvbuf, NULL, NULL, NULL);
if (st != GRUB_EFI_BUFFER_TOO_SMALL)
break;
dev->rcvbufsize = 2 * ALIGN_UP (dev->rcvbufsize > bufsize
if (net != NULL)
{
if (net->mode->state == GRUB_EFI_NETWORK_STOPPED
- && efi_call_1 (net->start, net) != GRUB_EFI_SUCCESS)
+ && net->start (net) != GRUB_EFI_SUCCESS)
return grub_error (GRUB_ERR_NET_NO_CARD, "%s: net start failed",
dev->name);
dev->name);
if (net->mode->state == GRUB_EFI_NETWORK_STARTED
- && efi_call_3 (net->initialize, net, 0, 0) != GRUB_EFI_SUCCESS)
+ && net->initialize (net, 0, 0) != GRUB_EFI_SUCCESS)
return grub_error (GRUB_ERR_NET_NO_CARD, "%s: net initialize failed",
dev->name);
filters |= (net->mode->receive_filter_mask &
GRUB_EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS);
- efi_call_6 (net->receive_filters, net, filters, 0, 0, 0, NULL);
+ net->receive_filters (net, filters, 0, 0, 0, NULL);
}
dev->efi_net = net;
static void
close_card (struct grub_net_card *dev)
{
- efi_call_1 (dev->efi_net->shutdown, dev->efi_net);
- efi_call_1 (dev->efi_net->stop, dev->efi_net);
+ dev->efi_net->shutdown (dev->efi_net);
+ dev->efi_net->stop (dev->efi_net);
grub_efi_close_protocol (dev->efi_handle, &net_io_guid);
}
continue;
if (net->mode->state == GRUB_EFI_NETWORK_STOPPED
- && efi_call_1 (net->start, net) != GRUB_EFI_SUCCESS)
+ && net->start (net) != GRUB_EFI_SUCCESS)
continue;
if (net->mode->state == GRUB_EFI_NETWORK_STOPPED)
continue;
if (net->mode->state == GRUB_EFI_NETWORK_STARTED
- && efi_call_3 (net->initialize, net, 0, 0) != GRUB_EFI_SUCCESS)
+ && net->initialize (net, 0, 0) != GRUB_EFI_SUCCESS)
continue;
card = grub_zalloc (sizeof (struct grub_net_card));
switch (state) {
case GRUB_TERM_COLOR_STANDARD:
- efi_call_2 (o->set_attributes, o, GRUB_TERM_DEFAULT_STANDARD_COLOR
- & 0x7f);
+ o->set_attributes (o, GRUB_TERM_DEFAULT_STANDARD_COLOR & 0x7f);
break;
case GRUB_TERM_COLOR_NORMAL:
- efi_call_2 (o->set_attributes, o, grub_term_normal_color & 0x7f);
+ o->set_attributes (o, grub_term_normal_color & 0x7f);
break;
case GRUB_TERM_COLOR_HIGHLIGHT:
- efi_call_2 (o->set_attributes, o, grub_term_highlight_color & 0x7f);
+ o->set_attributes (o, grub_term_highlight_color & 0x7f);
break;
default:
break;
}
o = grub_efi_system_table->con_out;
- efi_call_2 (o->enable_cursor, o, on);
+ o->enable_cursor (o, on);
}
static grub_err_t
/* Should this test be cached? */
if ((c->base > 0x7f || c->ncomb)
- && efi_call_2 (o->test_string, o, str) != GRUB_EFI_SUCCESS)
+ && o->test_string (o, str) != GRUB_EFI_SUCCESS)
return;
- efi_call_2 (o->output_string, o, str);
+ o->output_string (o, str);
}
const unsigned efi_codes[] =
grub_efi_status_t status;
i = grub_efi_system_table->con_in;
- status = efi_call_2 (i->read_key_stroke, i, &key);
+ status = i->read_key_stroke (i, &key);
if (status != GRUB_EFI_SUCCESS)
return GRUB_TERM_NO_KEY;
key = grub_efi_translate_key (key_data.key);
if (key == GRUB_TERM_NO_KEY) {
- status = efi_call_2 (text_input->read_key_stroke, text_input, &key_data);
+ status = text_input->read_key_stroke (text_input, &key_data);
if (status != GRUB_EFI_SUCCESS)
return GRUB_ERR_EOF;
o = grub_efi_system_table->con_out;
if (grub_prepare_for_text_output (term) != GRUB_ERR_NONE ||
- efi_call_4 (o->query_mode, o, o->mode->mode,
- &columns, &rows) != GRUB_EFI_SUCCESS)
+ o->query_mode (o, o->mode->mode,
+ &columns, &rows) != GRUB_EFI_SUCCESS)
{
/* Why does this fail? */
columns = 80;
return;
o = grub_efi_system_table->con_out;
- efi_call_3 (o->set_cursor_position, o, pos.x, pos.y);
+ o->set_cursor_position (o, pos.x, pos.y);
}
static void
o = grub_efi_system_table->con_out;
orig_attr = o->mode->attribute;
- efi_call_2 (o->set_attributes, o, GRUB_EFI_BACKGROUND_BLACK);
- efi_call_1 (o->clear_screen, o);
- efi_call_2 (o->set_attributes, o, orig_attr);
+ o->set_attributes (o, GRUB_EFI_BACKGROUND_BLACK);
+ o->clear_screen (o);
+ o->set_attributes (o, orig_attr);
}
static grub_err_t
if (port->configured)
return;
- status = efi_call_7 (port->interface->set_attributes, port->interface,
- port->config.speed,
- 0, 0, parities[port->config.parity],
- port->config.word_len,
- stop_bits[port->config.stop_bits]);
+ status = port->interface->set_attributes (port->interface,
+ port->config.speed,
+ 0, 0, parities[port->config.parity],
+ port->config.word_len,
+ stop_bits[port->config.stop_bits]);
if (status != GRUB_EFI_SUCCESS)
port->broken = 1;
- status = efi_call_2 (port->interface->set_control_bits, port->interface,
- port->config.rtscts ? 0x4002 : 0x2);
+ status = port->interface->set_control_bits (port->interface,
+ port->config.rtscts ? 0x4002 : 0x2);
port->configured = 1;
}
if (port->broken)
return -1;
- status = efi_call_3 (port->interface->read, port->interface, &bufsize, &c);
+ status = port->interface->read (port->interface, &bufsize, &c);
if (status != GRUB_EFI_SUCCESS || bufsize == 0)
return -1;
if (port->broken)
return;
- efi_call_3 (port->interface->write, port->interface, &bufsize, &c0);
+ port->interface->write (port->interface, &bufsize, &c0);
}
/* Initialize a serial device. PORT is the port number for a serial device.
{
if (restore_needed)
{
- efi_call_2 (gop->set_mode, gop, old_mode);
+ gop->set_mode (gop, old_mode);
restore_needed = 0;
}
grub_free (framebuffer.offscreen);
struct grub_efi_gop_mode_info *info = NULL;
struct grub_video_mode_info mode_info;
- status = efi_call_4 (gop->query_mode, gop, mode, &size, &info);
+ status = gop->query_mode (gop, mode, &size, &info);
if (status)
{
grub_efi_uintn_t size;
grub_efi_status_t status;
- status = efi_call_4 (gop->query_mode, gop, mode, &size, &info);
+ status = gop->query_mode (gop, mode, &size, &info);
if (status)
{
info = 0;
old_mode = gop->mode->mode;
restore_needed = 1;
}
- efi_call_2 (gop->set_mode, gop, best_mode);
+ gop->set_mode (gop, best_mode);
}
info = gop->mode->info;
{
if (framebuffer.offscreen)
{
- efi_call_10 (gop->blt, gop, framebuffer.offscreen,
- GRUB_EFI_BLT_BUFFER_TO_VIDEO, 0, 0, 0, 0,
- framebuffer.mode_info.width, framebuffer.mode_info.height,
- framebuffer.mode_info.width * 4);
+ gop->blt (gop, framebuffer.offscreen,
+ GRUB_EFI_BLT_BUFFER_TO_VIDEO, 0, 0, 0, 0,
+ framebuffer.mode_info.width, framebuffer.mode_info.height,
+ framebuffer.mode_info.width * 4);
}
return GRUB_ERR_NONE;
}
{
if (restore_needed)
{
- efi_call_2 (gop->set_mode, gop, old_mode);
+ gop->set_mode (gop, old_mode);
restore_needed = 0;
}
if (gop)
grub_uint32_t width, height, depth, rate, pixel;
int ret;
- if (efi_call_5 (c->get_mode, c, &width, &height, &depth, &rate))
+ if (c->get_mode (c, &width, &height, &depth, &rate))
return 0;
grub_efi_set_text_mode (0);
pixel = RGB_MAGIC;
- efi_call_10 (c->blt, c, (struct grub_efi_uga_pixel *) &pixel,
- GRUB_EFI_UGA_VIDEO_FILL, 0, 0, 0, 0, 1, height, 0);
+ c->blt (c, (struct grub_efi_uga_pixel *) &pixel,
+ GRUB_EFI_UGA_VIDEO_FILL, 0, 0, 0, 0, 1, height, 0);
ret = find_framebuf (&uga_fb, &uga_pitch);
grub_efi_set_text_mode (1);
grub_uint32_t d;
grub_uint32_t r;
- if ((! efi_call_5 (uga->get_mode, uga, &w, &h, &d, &r)) &&
+ if ((! uga->get_mode (uga, &w, &h, &d, &r)) &&
((! width) || (width == w)) &&
((! height) || (height == h)) &&
((! depth) || (depth == d)))