class Ufs
Defined at line 165 of file ../../src/devices/block/drivers/ufs/ufs.h
Base class for UFS drivers.
This class is the parent class for both UfsPci and UfsPdev drivers, which bind the UFS
controller via PCI and PDev respectively.
Protected Members
vmo mmio_buffer_vmo_
uint64_t mmio_buffer_size_
interrupt irq_
bti bti_
mutex commands_lock_
list_node pending_commands_
sync_completion admin_signal_
sync_completion io_signal_
Dispatcher irq_worker_dispatcher_
Dispatcher io_worker_dispatcher_
Dispatcher admin_worker_dispatcher_
Dispatcher exception_event_dispatcher_
Completion irq_worker_shutdown_completion_
Completion io_worker_shutdown_completion_
Completion admin_worker_shutdown_completion_
Completion exception_event_completion_
Completion wait_for_power_resumed_
unique_ptr device_manager_
unique_ptr transfer_request_processor_
unique_ptr task_management_request_processor_
uint32_t logical_unit_count_
unordered_set well_known_lun_set_
function_impl host_controller_callback_
bool driver_shutdown_
uint32_t max_transfer_bytes_
bool qemu_quirk_
bool intel_quirk_
mutex lock_
Config config_
InspectProperties properties_
shared_ptr incoming_
optional component_inspector_
optional node_name_
WireSyncClient parent_node_
WireSyncClient root_node_
WireSyncClient node_controller_
WireSyncClient hardware_power_element_control_client_
event hardware_power_assertive_token_
eventpair hardware_power_lease_control_token_
Public Methods
void Ufs ()
Defined at line 174 of file ../../src/devices/block/drivers/ufs/ufs.h
void ~Ufs ()
Defined at line 175 of file ../../src/devices/block/drivers/ufs/ufs.h
fidl::WireSyncClient<fuchsia_driver_framework::Node> & root_node ()
scsi::Controller
Defined at line 182 of file ../../src/devices/block/drivers/ufs/ufs.h
std::string_view driver_name ()
Defined at line 183 of file ../../src/devices/block/drivers/ufs/ufs.h
const std::shared_ptr<fdf::Namespace> & driver_incoming ()
Defined at line 184 of file ../../src/devices/block/drivers/ufs/ufs.h
std::shared_ptr<fdf::OutgoingDirectory> & driver_outgoing ()
Defined at line 185 of file ../../src/devices/block/drivers/ufs/ufs.h
async_dispatcher_t * driver_async_dispatcher ()
Defined at line 186 of file ../../src/devices/block/drivers/ufs/ufs.h
const std::optional<std::string> & driver_node_name ()
Defined at line 187 of file ../../src/devices/block/drivers/ufs/ufs.h
fdf::Logger & driver_logger ()
Defined at line 188 of file ../../src/devices/block/drivers/ufs/ufs.h
const ufs_config::Config & config ()
Defined at line 189 of file ../../src/devices/block/drivers/ufs/ufs.h
size_t BlockOpSize ()
Defined at line 191 of file ../../src/devices/block/drivers/ufs/ufs.h
const fdf::MmioBuffer & GetMmio ()
Defined at line 198 of file ../../src/devices/block/drivers/ufs/ufs.h
void ProcessIoSubmissions ()
Convert block operations to UPIU commands and submit them asynchronously.
Defined at line 199 of file ../../src/devices/block/drivers/ufs/ufs.cc
zx::result<> NotifyEventCallback (NotifyEvent event, uint64_t data)
Defines a callback function to perform when an |event| occurs.
Defined at line 112 of file ../../src/devices/block/drivers/ufs/ufs.cc
zx::result<> Notify (NotifyEvent event, uint64_t data)
The controller notifies the host controller when it takes the action defined in |event|.
Defined at line 131 of file ../../src/devices/block/drivers/ufs/ufs.cc
zx_status_t WaitWithTimeout (fit::function<bool ()>wait_for,zx::durationtimeout,const fbl::String &timeout_message,zx::durationgranularity)
Defined at line 138 of file ../../src/devices/block/drivers/ufs/ufs.cc
zx::result<uint16_t> TranslateUfsLunToScsiLun (uint8_t ufs_lun)
Defined at line 168 of file ../../src/devices/block/drivers/ufs/ufs.cc
zx::result<uint8_t> TranslateScsiLunToUfsLun (uint16_t scsi_lun)
Defined at line 182 of file ../../src/devices/block/drivers/ufs/ufs.cc
DeviceManager & GetDeviceManager ()
Defined at line 203 of file ../../src/devices/block/drivers/ufs/ufs.h
TransferRequestProcessor & GetTransferRequestProcessor ()
Defined at line 207 of file ../../src/devices/block/drivers/ufs/ufs.h
TaskManagementRequestProcessor & GetTaskManagementRequestProcessor ()
Defined at line 211 of file ../../src/devices/block/drivers/ufs/ufs.h
void SetHostControllerCallback (HostControllerCallback callback)
Used to register a platform-specific NotifyEventCallback, which handles variants and quirks for
each host interface platform.
Defined at line 230 of file ../../src/devices/block/drivers/ufs/ufs.h
fdf::Dispatcher & exception_event_dispatcher ()
Defined at line 246 of file ../../src/devices/block/drivers/ufs/ufs.h
libsync::Completion & exception_event_completion ()
Defined at line 247 of file ../../src/devices/block/drivers/ufs/ufs.h
uint32_t GetLogicalUnitCount ()
for test
Defined at line 250 of file ../../src/devices/block/drivers/ufs/ufs.h
bool HasWellKnownLun (WellKnownLuns lun)
Defined at line 254 of file ../../src/devices/block/drivers/ufs/ufs.h
bool intel_quirk ()
Defined at line 258 of file ../../src/devices/block/drivers/ufs/ufs.h
bool IsResumed ()
Defined at line 260 of file ../../src/devices/block/drivers/ufs/ufs.h
const inspect::Inspector & inspect ()
Defined at line 262 of file ../../src/devices/block/drivers/ufs/ufs.h
zx::result<> Start (fdf::DriverContext context)
Defined at line 1267 of file ../../src/devices/block/drivers/ufs/ufs.cc
void Stop (fdf::StopCompleter completer)
Defined at line 1333 of file ../../src/devices/block/drivers/ufs/ufs.cc
zx_status_t ExecuteCommandSync (uint8_ttarget,uint16_tlun,ioveccdb,boolis_write,iovecdata)
Defined at line 483 of file ../../src/devices/block/drivers/ufs/ufs.cc
void ExecuteCommandAsync (uint8_ttarget,uint16_tlun,ioveccdb,boolis_write,uint32_tblock_size_bytes,scsi::DeviceOp *device_op,iovecdata)
Defined at line 443 of file ../../src/devices/block/drivers/ufs/ufs.cc
void QueueIoCommand (IoCommand * io_cmd)
Queue an IO command to be performed asynchronously.
void ProcessAdminCompletions ()
Find the completed Admin commands in the Request List and handle their completion.
Defined at line 262 of file ../../src/devices/block/drivers/ufs/ufs.cc
void ProcessIoCompletions ()
Find the completed IO commands in the Request List and handle their completion.
Defined at line 266 of file ../../src/devices/block/drivers/ufs/ufs.cc
void ProcessErrors ()
Recover errors in the request list.
Defined at line 268 of file ../../src/devices/block/drivers/ufs/ufs.cc
void DumpRegisters ()
Defined at line 1028 of file ../../src/devices/block/drivers/ufs/ufs.cc
Protected Methods
zx::result<fdf::MmioBuffer> CreateMmioBuffer (zx_off_toffset,size_tsize,zx::vmovmo)
Defined at line 269 of file ../../src/devices/block/drivers/ufs/ufs.h
zx_status_t Init ()
Initialize the UFS controller and bind the logical units.
Declare this as virtual to delay driver initialization in tests.
Defined at line 591 of file ../../src/devices/block/drivers/ufs/ufs.cc
Friends
class UfsTest