block: support for block number >32 bit (Fix #968)

This commit is contained in:
Stefan Kalkowski
2013-12-04 14:34:53 +01:00
committed by Norman Feske
parent 1bc16f3a23
commit b10b9e20a2
28 changed files with 117 additions and 132 deletions

View File

@@ -51,7 +51,7 @@ namespace Block {
private:
Opcode _op; /* requested operation */
Genode::size_t _block_number; /* requested block number */
sector_t _block_number; /* requested block number */
Genode::size_t _block_count; /* number of blocks to transfer */
unsigned _success :1; /* indicates success of operation */
@@ -68,13 +68,13 @@ namespace Block {
* Constructor
*/
Packet_descriptor(Packet_descriptor p, Opcode op,
Genode::size_t blk_nr, Genode::size_t blk_count = 1)
sector_t blk_nr, Genode::size_t blk_count = 1)
: ::Packet_descriptor(p.offset(), p.size()),
_op(op), _block_number(blk_nr),
_block_count(blk_count), _success(false) { }
Opcode operation() const { return _op; }
Genode::size_t block_number() const { return _block_number; }
sector_t block_number() const { return _block_number; }
Genode::size_t block_count() const { return _block_count; }
bool succeeded() const { return _success; }
@@ -125,7 +125,7 @@ namespace Block {
* \param blk_size will contain total size in bytes
* \param ops supported operations
*/
virtual void info(Genode::size_t *blk_count,
virtual void info(sector_t *blk_count,
Genode::size_t *blk_size,
Operations *ops) = 0;
@@ -149,7 +149,8 @@ namespace Block {
** RPC interface **
*******************/
GENODE_RPC(Rpc_info, void, info, Genode::size_t *, Genode::size_t *, Operations *);
GENODE_RPC(Rpc_info, void, info, Block::sector_t *,
Genode::size_t *, Operations *);
GENODE_RPC(Rpc_tx_cap, Genode::Capability<Tx>, _tx_cap);
GENODE_RPC(Rpc_sync, void, sync);
GENODE_RPC_INTERFACE(Rpc_info, Rpc_tx_cap, Rpc_sync);

View File

@@ -47,7 +47,7 @@ namespace Block {
** Block session interface **
*****************************/
void info(Genode::size_t *blk_count, Genode::size_t *blk_size,
void info(sector_t *blk_count, Genode::size_t *blk_size,
Operations *ops)
{
call<Rpc_info>(blk_count, blk_size, ops);