Loading...
Searching...
No Matches
mmio_space
Go to the documentation of this file.
// -*- Mode: C++ -*-
// vim:ft=cpp
/*
* Copyright (C) 2017-2018, 2022, 2024 Kernkonzept GmbH.
* Author(s): Sarah Hoffmann <sarah.hoffmann@kernkonzept.com>
*
* License: see LICENSE.spdx (in this directory or the directories above)
*/
#pragma once
#include <l4/re/protocols.h>
#include <l4/sys/capability>
#include <l4/sys/cxx/ipc_types>
#include <l4/sys/cxx/ipc_iface>
namespace L4Re
{
struct L4_EXPORT Mmio_space
: public L4::Kobject_t<Mmio_space, L4::Kobject, L4RE_PROTO_MMIO_SPACE>
{
enum Access_width
{
Wd_8bit = 0,
Wd_16bit = 1,
Wd_32bit = 2,
Wd_64bit = 3
};
typedef l4_uint64_t Addr;
L4_INLINE_RPC(long, mmio_read, (Addr addr, char width, l4_uint64_t *value));
L4_INLINE_RPC(long, mmio_write, (Addr addr, char width, l4_uint64_t value));
typedef L4::Typeid::Rpcs<mmio_read_t, mmio_write_t> Rpcs;
};
}
capability
L4::Cap related definitions.
L4::Kobject_t
Helper class to create an L4Re interface class that is derived from a single base class.
Definition __typeinfo.h:750
l4_uint64_t
unsigned long long l4_uint64_t
Unsigned 64bit value.
Definition l4int.h:31
L4_EXPORT
#define L4_EXPORT
Attribute to mark functions, variables, and data types as being exported from a library.
Definition compiler.h:214
ipc_iface
Interface Definition Language.
L4_INLINE_RPC
#define L4_INLINE_RPC(res, name, args, attr...)
Define an inline RPC call (type and callable).
Definition ipc_iface:482
ipc_types
L4Re
L4Re C++ Interfaces.
Definition cmd_control:14
protocols.h
L4Re Protocol Constants (C version).
L4Re::Mmio_space
Interface for memory-like address space accessible via IPC.
Definition mmio_space:47
L4Re::Mmio_space::Addr
l4_uint64_t Addr
Device address.
Definition mmio_space:58
L4Re::Mmio_space::mmio_write
long mmio_write(Addr addr, char width, l4_uint64_t value)
Write a value to the given address.
L4Re::Mmio_space::Access_width
Access_width
Actual size of the value to read or write.
Definition mmio_space:50
L4Re::Mmio_space::Wd_64bit
@ Wd_64bit
Value is a 8-byte word.
Definition mmio_space:54
L4Re::Mmio_space::Wd_16bit
@ Wd_16bit
Value is a 2-byte word.
Definition mmio_space:52
L4Re::Mmio_space::Wd_32bit
@ Wd_32bit
Value is a 4-byte word.
Definition mmio_space:53
L4Re::Mmio_space::Wd_8bit
@ Wd_8bit
Value is a byte.
Definition mmio_space:51
L4Re::Mmio_space::mmio_read
long mmio_read(Addr addr, char width, l4_uint64_t *value)
Read a value from the given address.
L4::Typeid::Rpcs
Standard list of RPCs of an interface.
Definition __typeinfo.h:428