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:
Bahadir Balban
2009-11-22 15:08:29 +02:00
parent f3f581f2e7
commit 19b4c6c4c1
5 changed files with 778 additions and 81 deletions

View File

@@ -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;

View File

@@ -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");