class StubRuntimeServices
Defined at line 36 of file ../../zircon/kernel/lib/efi/testing/include/lib/efi/testing/stub_runtime_services.h
Runtime services EFI stubs.
The runtime services EFI table is complicated enough that it would be
difficult to fake out all the APIs properly. Instead, we provide these stubs
to allow tests to easily mock out the functionality they need, either with
gmock or by subclassing and implementing the functions they need.
Some of the more trivial functionality will be implemented, but can still
be overridden by subclasses.
Tests that are willing to use gmock should generally prefer to use
MockRuntimeServices instead, which hooks up the proper mock wrappers and adds
some additional utility functions.
Public Methods
void StubRuntimeServices ()
IMPORTANT: only ONE StubRuntimeServices can exist at a time. Since this is
intended to be a global singleton in EFI this shouldn't be a problem,
but if a test does attempt to create a second it will cause an exit().
Defined at line 43 of file ../../zircon/kernel/lib/efi/testing/stub_runtime_services.cc
efi_runtime_services * services ()
Returns the underlying efi_runtime_services struct.
Defined at line 50 of file ../../zircon/kernel/lib/efi/testing/include/lib/efi/testing/stub_runtime_services.h
efi_status GetTime (efi_time * time, efi_time_capabilities * capabilities)
EFI function implementations.
Defined at line 57 of file ../../zircon/kernel/lib/efi/testing/include/lib/efi/testing/stub_runtime_services.h
efi_status SetTime (efi_time * time)
Defined at line 60 of file ../../zircon/kernel/lib/efi/testing/include/lib/efi/testing/stub_runtime_services.h
efi_status GetWakeupTime (bool *enabled,bool *pending,efi_time *time)
Defined at line 61 of file ../../zircon/kernel/lib/efi/testing/include/lib/efi/testing/stub_runtime_services.h
efi_status SetWakeupTime (bool enable, efi_time * time)
Defined at line 64 of file ../../zircon/kernel/lib/efi/testing/include/lib/efi/testing/stub_runtime_services.h
efi_status SetVirtualAddressMap (size_tmemory_map_size,size_tdesc_size,uint32_tdesc_version,efi_memory_descriptor *virtual_map)
Defined at line 65 of file ../../zircon/kernel/lib/efi/testing/include/lib/efi/testing/stub_runtime_services.h
void ~StubRuntimeServices ()
Defined at line 70 of file ../../zircon/kernel/lib/efi/testing/stub_runtime_services.cc
efi_status ConvertPointer (size_t debug_disposition, void ** addr)
Defined at line 70 of file ../../zircon/kernel/lib/efi/testing/include/lib/efi/testing/stub_runtime_services.h
void SetVariables (const std::list<Variable> & vars)
Defined at line 72 of file ../../zircon/kernel/lib/efi/testing/stub_runtime_services.cc
void UnsetVariables ()
Defined at line 77 of file ../../zircon/kernel/lib/efi/testing/stub_runtime_services.cc
efi_status SetVariable (char16_t *var_name,efi_guid *vendor_guid,uint32_tattributes,size_tdata_size,const void *data)
Defined at line 77 of file ../../zircon/kernel/lib/efi/testing/include/lib/efi/testing/stub_runtime_services.h
efi_status GetNextHighMonotonicCount (uint32_t * high_count)
Defined at line 81 of file ../../zircon/kernel/lib/efi/testing/include/lib/efi/testing/stub_runtime_services.h
efi_status ResetSystem (efi_reset_typereset_type,efi_statusreset_status,size_tdata_size,void *reset_data)
Defined at line 82 of file ../../zircon/kernel/lib/efi/testing/include/lib/efi/testing/stub_runtime_services.h
efi_status GetVariable (char16_t *var_name,efi_guid *vendor_guid,uint32_t *attributes,size_t *data_size,void *data)
Defined at line 85 of file ../../zircon/kernel/lib/efi/testing/stub_runtime_services.cc
efi_status UpdateCapsule (efi_capsule_header **capsule_header_array,size_tcapsule_count,efi_physical_addrscatter_gather_list)
Defined at line 86 of file ../../zircon/kernel/lib/efi/testing/include/lib/efi/testing/stub_runtime_services.h
efi_status QueryCapsuleCapabilities (efi_capsule_header **capsule_header_array,size_tcapsule_count,uint64_t *max_capsule_size,efi_reset_type *reset_type)
Defined at line 90 of file ../../zircon/kernel/lib/efi/testing/include/lib/efi/testing/stub_runtime_services.h
efi_status GetNextVariableName (size_t *var_name_size,char16_t *var_name,efi_guid *vendor_guid)
Defined at line 107 of file ../../zircon/kernel/lib/efi/testing/stub_runtime_services.cc
efi_status QueryVariableInfo (uint32_tattributes,uint64_t *max_var_storage_size,uint64_t *remaining_var_storage_size,uint64_t *max_var_size)
Defined at line 147 of file ../../zircon/kernel/lib/efi/testing/stub_runtime_services.cc