mirror of
https://github.com/drasko/codezero.git
synced 2026-01-18 22:03:16 +01:00
Moved capability struct to api/capability.h for userspace coherence
Userspace often breaks as we change the capability structure. Now structure is under api/ so userspace can also update with changes.
This commit is contained in:
@@ -8,33 +8,13 @@
|
||||
|
||||
#include <l4lib/types.h>
|
||||
#include <l4/lib/list.h>
|
||||
#include <l4/api/capability.h>
|
||||
|
||||
struct cap_list {
|
||||
int ncaps;
|
||||
struct link caps;
|
||||
};
|
||||
|
||||
struct capability {
|
||||
struct link list;
|
||||
|
||||
/* Capability identifiers */
|
||||
l4id_t capid; /* Unique capability ID */
|
||||
l4id_t owner; /* Capability owner ID */
|
||||
l4id_t resid; /* Targeted resource ID */
|
||||
unsigned int type; /* Capability and target resource type */
|
||||
|
||||
/* Capability limits/permissions */
|
||||
u32 access; /* Permitted operations */
|
||||
|
||||
/* Limits on the resource */
|
||||
unsigned long start; /* Resource start value */
|
||||
unsigned long end; /* Resource end value */
|
||||
unsigned long size; /* Resource size */
|
||||
|
||||
unsigned long used; /* Resource used size */
|
||||
};
|
||||
|
||||
|
||||
static inline void cap_list_init(struct cap_list *clist)
|
||||
{
|
||||
clist->ncaps = 0;
|
||||
|
||||
@@ -364,9 +364,12 @@ int cap_read_all()
|
||||
BUG();
|
||||
}
|
||||
|
||||
|
||||
/* Copy them to real allocated structures */
|
||||
copy_boot_capabilities(ncaps);
|
||||
|
||||
cap_list_print(&capability_list);
|
||||
|
||||
memset(&cont_mem_regions, 0, sizeof(cont_mem_regions));
|
||||
|
||||
/* Set up pointers to important capabilities */
|
||||
@@ -394,7 +397,7 @@ int cap_read_all()
|
||||
BUG();
|
||||
}
|
||||
|
||||
if (!(cap->access & CAP_MAP_UTCB_BIT)) {
|
||||
if (!(cap->access & CAP_MAP_UTCB)) {
|
||||
printf("FATAL: Region designated "
|
||||
"for UTCB allocation does not "
|
||||
"have UTCB map permissions");
|
||||
|
||||
Reference in New Issue
Block a user