mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
base/cache.h: rename Cache_attribute to Cache
The short name is better because the type will become prominently visible at the API. Issue #2243
This commit is contained in:
@@ -30,13 +30,13 @@ class Genode::Mapping
|
||||
|
||||
private:
|
||||
|
||||
addr_t _from_phys_addr { 0 };
|
||||
addr_t _to_virt_addr { 0 };
|
||||
Cache_attribute _attr { CACHED };
|
||||
size_t _num_pages { 0 };
|
||||
addr_t _fault_type { 0 };
|
||||
bool _writeable { false };
|
||||
bool _executable { false };
|
||||
addr_t _from_phys_addr { 0 };
|
||||
addr_t _to_virt_addr { 0 };
|
||||
Cache _cache { CACHED };
|
||||
size_t _num_pages { 0 };
|
||||
addr_t _fault_type { 0 };
|
||||
bool _writeable { false };
|
||||
bool _executable { false };
|
||||
|
||||
enum { PAGE_SIZE_LOG2 = 12 };
|
||||
|
||||
@@ -45,13 +45,12 @@ class Genode::Mapping
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
Mapping(addr_t dst_addr, addr_t src_addr,
|
||||
Cache_attribute const cacheability, bool,
|
||||
Mapping(addr_t dst_addr, addr_t src_addr, Cache const cache, bool,
|
||||
unsigned l2size, bool rw, bool executable)
|
||||
:
|
||||
_from_phys_addr(src_addr),
|
||||
_to_virt_addr(dst_addr),
|
||||
_attr(cacheability),
|
||||
_cache(cache),
|
||||
_num_pages(1 << (l2size - PAGE_SIZE_LOG2)),
|
||||
_writeable(rw), _executable(executable)
|
||||
{ }
|
||||
@@ -69,13 +68,13 @@ class Genode::Mapping
|
||||
*/
|
||||
void prepare_map_operation() { }
|
||||
|
||||
addr_t from_phys() const { return _from_phys_addr; }
|
||||
addr_t to_virt() const { return _to_virt_addr; }
|
||||
size_t num_pages() const { return _num_pages; }
|
||||
bool writeable() const { return _writeable; }
|
||||
bool executable() const { return _executable; }
|
||||
Cache_attribute cacheability() const { return _attr; }
|
||||
addr_t fault_type() const { return _fault_type; }
|
||||
addr_t from_phys() const { return _from_phys_addr; }
|
||||
addr_t to_virt() const { return _to_virt_addr; }
|
||||
size_t num_pages() const { return _num_pages; }
|
||||
bool writeable() const { return _writeable; }
|
||||
bool executable() const { return _executable; }
|
||||
Cache cacheability() const { return _cache; }
|
||||
addr_t fault_type() const { return _fault_type; }
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Genode {
|
||||
try {
|
||||
platform = platform ? platform : &platform_specific();
|
||||
platform->core_vm_space().map(from_phys, to_virt, num_pages,
|
||||
Cache_attribute::CACHED,
|
||||
Cache::CACHED,
|
||||
WRITEABLE, NON_EXECUTABLE,
|
||||
DONT_FLUSH);
|
||||
} catch (Page_table_registry::Mapping_cache_full) {
|
||||
|
||||
@@ -182,7 +182,7 @@ class Genode::Vm_space
|
||||
|
||||
template <typename FN>
|
||||
bool _map_frame(addr_t const from_phys, addr_t const to_dest,
|
||||
Cache_attribute const cacheability,
|
||||
Cache const cacheability,
|
||||
bool const writable, bool const executable,
|
||||
bool const flush_support, bool guest, FN const &fn)
|
||||
{
|
||||
@@ -242,9 +242,9 @@ class Genode::Vm_space
|
||||
/**
|
||||
* Platform specific map/unmap of a page frame
|
||||
*/
|
||||
long _map_page(Genode::Cap_sel const &idx, Genode::addr_t const virt,
|
||||
Cache_attribute const cacheability, bool const write,
|
||||
bool const writable, bool guest);
|
||||
long _map_page(Genode::Cap_sel const &idx, addr_t virt,
|
||||
Cache cacheability, bool const write,
|
||||
bool writable, bool guest);
|
||||
long _unmap_page(Genode::Cap_sel const &idx);
|
||||
long _invalidate_page(Genode::Cap_sel const &, seL4_Word const,
|
||||
seL4_Word const);
|
||||
@@ -380,7 +380,7 @@ class Genode::Vm_space
|
||||
}
|
||||
|
||||
bool map(addr_t const from_phys, addr_t const to_virt,
|
||||
size_t const num_pages, Cache_attribute const cacheability,
|
||||
size_t const num_pages, Cache const cacheability,
|
||||
bool const writable, bool const executable, bool flush_support)
|
||||
{
|
||||
auto fn_unmap = [&] (Cap_sel const &idx, addr_t const v_addr)
|
||||
@@ -430,7 +430,7 @@ class Genode::Vm_space
|
||||
}
|
||||
|
||||
void map_guest(addr_t const from_phys, addr_t const guest_phys,
|
||||
size_t const num_pages, Cache_attribute const cacheability,
|
||||
size_t const num_pages, Cache const cacheability,
|
||||
bool const writable, bool const executable, bool flush_support)
|
||||
{
|
||||
auto fn_unmap = [&] (Cap_sel const &idx, addr_t const) {
|
||||
|
||||
@@ -101,7 +101,7 @@ bool Platform_pd::bind_thread(Platform_thread &thread)
|
||||
enum { WRITABLE = true, ONE_PAGE = 1, FLUSHABLE = true, NON_EXECUTABLE = false };
|
||||
_vm_space.alloc_page_tables(utcb, get_page_size());
|
||||
_vm_space.map(thread._info.ipc_buffer_phys, utcb, ONE_PAGE,
|
||||
Cache_attribute::CACHED, WRITABLE, NON_EXECUTABLE, FLUSHABLE);
|
||||
Cache::CACHED, WRITABLE, NON_EXECUTABLE, FLUSHABLE);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ static long map_page_table(Genode::Cap_sel const pagetable,
|
||||
|
||||
long Genode::Vm_space::_map_page(Genode::Cap_sel const &idx,
|
||||
Genode::addr_t const virt,
|
||||
Cache_attribute const cacheability,
|
||||
Cache const cacheability,
|
||||
bool const writable,
|
||||
bool const executable,
|
||||
bool)
|
||||
|
||||
@@ -54,7 +54,7 @@ Vm_session_component::Vcpu::Vcpu(Rpc_entrypoint &ep,
|
||||
_ep(ep),
|
||||
_ram_alloc(ram_alloc),
|
||||
_ds_cap (_ram_alloc.alloc(align_addr(sizeof(Genode::Vcpu_state), 12),
|
||||
Cache_attribute::CACHED))
|
||||
Cache::CACHED))
|
||||
{
|
||||
try {
|
||||
/* notification cap */
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
#include <vm_space.h>
|
||||
|
||||
long Genode::Vm_space::_map_page(Genode::Cap_sel const &idx,
|
||||
Genode::addr_t const virt,
|
||||
Cache_attribute const cacheability,
|
||||
Genode::addr_t const virt,
|
||||
Cache const cacheability,
|
||||
bool const writable,
|
||||
bool const, bool ept)
|
||||
{
|
||||
|
||||
@@ -114,7 +114,7 @@ class Stack_area_region_map : public Region_map
|
||||
|
||||
struct Stack_area_ram_allocator : Ram_allocator
|
||||
{
|
||||
Ram_dataspace_capability alloc(size_t, Cache_attribute) override {
|
||||
Ram_dataspace_capability alloc(size_t, Cache) override {
|
||||
return reinterpret_cap_cast<Ram_dataspace>(Native_capability()); }
|
||||
|
||||
void free(Ram_dataspace_capability) override {
|
||||
|
||||
Reference in New Issue
Block a user