NOVA User-Level Environment  Version testbox/changed-memory-timing-317-g320d8b5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DiskProtocol Struct Reference

Client part of the disk protocol. More...

#include <service_disk.h>

Inheritance diagram for DiskProtocol:
GenericNoXlateProtocol GenericProtocol ParentProtocol

Classes

struct  Segment
struct  Stats

Public Types

enum  { MAXDISKREQUESTS = 32 }
enum  {
  TYPE_GET_PARAMS = ParentProtocol::TYPE_GENERIC_END, TYPE_GET_DISK_COUNT, TYPE_READ, TYPE_WRITE,
  TYPE_FLUSH_CACHE, TYPE_GET_COMPLETION, TYPE_GET_MEM_PORTAL, TYPE_DMA_BUFFER,
  TYPE_ADD_LOGICAL_DISK, TYPE_CHECK_NAME, TYPE_GET_STATS
}
typedef Consumer
< MessageDiskCommit,
DiskProtocol::MAXDISKREQUESTS
DiskConsumer
typedef Producer
< MessageDiskCommit,
DiskProtocol::MAXDISKREQUESTS
DiskProducer

Public Member Functions

unsigned get_params (Utcb &utcb, unsigned disk, DiskParameter *params)
unsigned get_disk_count (Utcb &utcb, unsigned &count)
unsigned attach (Utcb &utcb, void *dma_buffer, size_t dma_size, cap_sel tmp_cap, DiskConsumer *consumer, KernelSemaphore *notify_sem)
unsigned read_write (Utcb &utcb, bool read, unsigned disk, unsigned long usertag, unsigned long long sector, unsigned dmacount, DmaDescriptor *dma)
unsigned read (Utcb &utcb, unsigned disk, unsigned long usertag, unsigned long long sector, unsigned dmacount, DmaDescriptor *dma)
unsigned write (Utcb &utcb, unsigned disk, unsigned long usertag, unsigned long long sector, unsigned dmacount, DmaDescriptor *dma)
unsigned flush_cache (Utcb &utcb, unsigned disk)
unsigned get_completion (Utcb &utcb, unsigned &tag, unsigned &status)
unsigned add_logical_disk (Utcb &utcb, const char *name, unsigned num_segments, Segment *segments)
unsigned add_logical_disk (Utcb &utcb, const char *names[], unsigned num_segments, Segment *segments)
unsigned check_name (Utcb &utcb, unsigned disk, const char *name, bool &match)
 Check whether a disk is known under a specific name.
unsigned get_stats (Utcb &utcb, unsigned disk, Stats &stats)
 DiskProtocol (CapAllocator *a, unsigned instance)
void destroy (Utcb &utcb, CapAllocator *a)
- Public Member Functions inherited from GenericNoXlateProtocol
 GenericNoXlateProtocol (const char *service, unsigned instance, unsigned cap_base, bool blocking, unsigned session_base=~0u)
Utcbinit_frame (Utcb &utcb, unsigned op)
- Public Member Functions inherited from GenericProtocol
unsigned call_server (Utcb &utcb, bool drop_frame)
 Call the server in a loop to resolve all faults.
unsigned call_server_drop (Utcb &utcb)
unsigned call_server_keep (Utcb &utcb)
template<class T >
void destroy (Utcb &utcb, unsigned portal_num, T *obj)
 Destroy the object.
void close (Utcb &utcb, unsigned portal_num, bool revoke_lock=true, bool _release_pseudonym=true)
 Close the session to the parent.
unsigned get_notify_sm ()
 GenericProtocol (const char *service, unsigned instance, unsigned cap_base, bool blocking, unsigned session_base=~0u)
- Public Member Functions inherited from ParentProtocol
 static_assert ((CAP_PT_PERCPU+Config::MAX_CPUS)< (1U<< Config::CAP_RESERVED_ORDER),"Capability Space misconfiguration.")

Public Attributes

DiskConsumerconsumer
KernelSemaphoresem
char * dma_buffer
size_t dma_size

Additional Inherited Members

- Static Public Member Functions inherited from GenericProtocol
static Utcbinit_frame_noid (Utcb &utcb, unsigned op)
- Protected Attributes inherited from GenericProtocol
const char * _service
unsigned _instance
unsigned _cap_base
 Base of the capability range. This cap refers to CAP_PSEUDONYM.
unsigned _session_base
 Base of the session portals.
Semaphore _lock
bool _blocking
bool _disabled

Detailed Description

Client part of the disk protocol.

Missing: register shared memory producer/consumer.

Member Typedef Documentation

Member Enumeration Documentation

anonymous enum
Enumerator:
MAXDISKREQUESTS 
anonymous enum
Enumerator:
TYPE_GET_PARAMS 
TYPE_GET_DISK_COUNT 
TYPE_READ 
TYPE_WRITE 
TYPE_FLUSH_CACHE 
TYPE_GET_COMPLETION 
TYPE_GET_MEM_PORTAL 
TYPE_DMA_BUFFER 
TYPE_ADD_LOGICAL_DISK 
TYPE_CHECK_NAME 
TYPE_GET_STATS 

Constructor & Destructor Documentation

DiskProtocol::DiskProtocol ( CapAllocator a,
unsigned  instance 
)
inline

Member Function Documentation

unsigned DiskProtocol::add_logical_disk ( Utcb utcb,
const char *  name,
unsigned  num_segments,
Segment segments 
)
inline
unsigned DiskProtocol::add_logical_disk ( Utcb utcb,
const char *  names[],
unsigned  num_segments,
Segment segments 
)
inline
unsigned DiskProtocol::attach ( Utcb utcb,
void *  dma_buffer,
size_t  dma_size,
cap_sel  tmp_cap,
DiskConsumer consumer,
KernelSemaphore notify_sem 
)
inline
unsigned DiskProtocol::check_name ( Utcb utcb,
unsigned  disk,
const char *  name,
bool &  match 
)
inline

Check whether a disk is known under a specific name.

If it is, match is set to true, otherwise it is set to false.

void DiskProtocol::destroy ( Utcb utcb,
CapAllocator a 
)
inline
unsigned DiskProtocol::flush_cache ( Utcb utcb,
unsigned  disk 
)
inline
unsigned DiskProtocol::get_completion ( Utcb utcb,
unsigned &  tag,
unsigned &  status 
)
inline
unsigned DiskProtocol::get_disk_count ( Utcb utcb,
unsigned &  count 
)
inline
unsigned DiskProtocol::get_params ( Utcb utcb,
unsigned  disk,
DiskParameter params 
)
inline
unsigned DiskProtocol::get_stats ( Utcb utcb,
unsigned  disk,
Stats stats 
)
inline
unsigned DiskProtocol::read ( Utcb utcb,
unsigned  disk,
unsigned long  usertag,
unsigned long long  sector,
unsigned  dmacount,
DmaDescriptor dma 
)
inline
unsigned DiskProtocol::read_write ( Utcb utcb,
bool  read,
unsigned  disk,
unsigned long  usertag,
unsigned long long  sector,
unsigned  dmacount,
DmaDescriptor dma 
)
inline
unsigned DiskProtocol::write ( Utcb utcb,
unsigned  disk,
unsigned long  usertag,
unsigned long long  sector,
unsigned  dmacount,
DmaDescriptor dma 
)
inline

Member Data Documentation

DiskConsumer* DiskProtocol::consumer
char* DiskProtocol::dma_buffer
size_t DiskProtocol::dma_size
KernelSemaphore* DiskProtocol::sem

The documentation for this struct was generated from the following file: