unsigned int -> word_t

This commit is contained in:
Adrian Danis 2015-11-10 14:39:20 +11:00 committed by Joel Beeren
parent 2d61910e0f
commit 0ecff9f393
55 changed files with 149 additions and 149 deletions

View file

@ -29,8 +29,8 @@ typedef word_t exception_t;
typedef word_t syscall_error_type_t;
struct syscall_error {
unsigned int invalidArgumentNumber;
unsigned int invalidCapNumber;
word_t invalidArgumentNumber;
word_t invalidCapNumber;
word_t rangeErrorMin;
word_t rangeErrorMax;
word_t memoryLeft;

View file

@ -24,7 +24,7 @@ exception_t handleUserLevelFault(word_t w_a, word_t w_b) VISIBLE;
exception_t handleVMFaultEvent(vm_fault_type_t vm_faultType) VISIBLE;
static inline word_t PURE
getSyscallArg(unsigned int i, word_t* ipc_buffer)
getSyscallArg(word_t i, word_t* ipc_buffer)
{
if (i < n_msgRegisters) {
return getRegister(ksCurThread, msgRegisters[i]);

View file

@ -33,7 +33,7 @@ enum domainConstants {
struct cap_transfer {
cptr_t ctReceiveRoot;
cptr_t ctReceiveIndex;
unsigned int ctReceiveDepth;
word_t ctReceiveDepth;
};
typedef struct cap_transfer cap_transfer_t;
@ -63,7 +63,7 @@ capTransferFromWords(word_t *wptr)
transfer.ctReceiveRoot = (cptr_t)wptr[0];
transfer.ctReceiveIndex = (cptr_t)wptr[1];
transfer.ctReceiveDepth = (unsigned int)wptr[2];
transfer.ctReceiveDepth = wptr[2];
return transfer;
}

View file

@ -90,7 +90,7 @@ fastpath_mi_check(word_t msgInfo)
}
static inline void
fastpath_copy_mrs(unsigned int length, tcb_t *src, tcb_t *dest)
fastpath_copy_mrs(word_t length, tcb_t *src, tcb_t *dest)
{
unsigned int i;
register_t reg;

View file

@ -326,7 +326,7 @@ static inline word_t PURE getFAR(void)
}
/* Cleaning memory before user-level access */
static inline void clearMemory(word_t* ptr, unsigned int bits)
static inline void clearMemory(word_t* ptr, word_t bits)
{
memzero(ptr, BIT(bits));
cleanCacheRange_PoU((word_t)ptr, (word_t)ptr + BIT(bits) - 1,

View file

@ -107,7 +107,7 @@ enum frameSizeConstants {
ARMSuperSectionBits = 24
};
static inline unsigned int CONST
static inline word_t CONST
pageBitsForSize(vm_page_size_t pagesize)
{
switch (pagesize) {

View file

@ -15,7 +15,7 @@
#include <api/failures.h>
#include <object/structures.h>
exception_t Arch_decodeInterruptControl(unsigned int length,
exception_t Arch_decodeInterruptControl(word_t length,
extra_caps_t extraCaps);
#endif

View file

@ -27,7 +27,7 @@ bool_t CONST Arch_hasRecycleRights(cap_t cap);
bool_t CONST Arch_sameRegionAs(cap_t cap_a, cap_t cap_b);
bool_t CONST Arch_sameObjectAs(cap_t cap_a, cap_t cap_b);
cap_t Arch_createObject(object_t t, void *regionBase, word_t userSize);
exception_t Arch_decodeInvocation(word_t label, unsigned int length,
exception_t Arch_decodeInvocation(word_t label, word_t length,
cptr_t cptr, cte_t *slot, cap_t cap,
extra_caps_t extraCaps, word_t *buffer);
void Arch_prepareThreadDelete(tcb_t *thread);

View file

@ -262,7 +262,7 @@ generic_frame_cap_get_capFMappedAddress(cap_t cap)
}
}
static inline unsigned int CONST
static inline word_t CONST
cap_get_archCapSizeBits(cap_t cap)
{
cap_tag_t ctag;

View file

@ -14,9 +14,9 @@
#include <types.h>
#include <object/structures.h>
unsigned int setMRs_fault(tcb_t *sender, tcb_t* receiver,
word_t setMRs_fault(tcb_t *sender, tcb_t* receiver,
word_t *receiveIPCBuffer);
unsigned int setMRs_syscall_error(tcb_t *thread, word_t *receiveIPCBuffer);
word_t setMRs_syscall_error(tcb_t *thread, word_t *receiveIPCBuffer);
word_t CONST Arch_decodeTransfer(word_t flags);
exception_t CONST Arch_performTransfer(word_t arch, tcb_t *tcb_src,
tcb_t *tcb_dest);

View file

@ -75,7 +75,7 @@ isValidVTableRoot_fp(cap_t pd_cap)
}
static inline void
fastpath_copy_mrs(unsigned int length, tcb_t *src, tcb_t *dest)
fastpath_copy_mrs(word_t length, tcb_t *src, tcb_t *dest)
{
if (length == 2) {
setRegister(dest, EBP, getRegister(src, EBP));

View file

@ -73,7 +73,7 @@ bool_t CONST isValidVTableRoot(cap_t cap);
bool_t CONST isValidNativeRoot(cap_t cap);
exception_t checkValidIPCBuffer(vptr_t vptr, cap_t cap);
vm_rights_t CONST maskVMRights(vm_rights_t vm_rights, cap_rights_t cap_rights_mask);
exception_t decodeIA32MMUInvocation(word_t label, unsigned int length, cptr_t cptr, cte_t *cte, cap_t cap, extra_caps_t extraCaps, word_t* buffer);
exception_t decodeIA32PageDirectoryInvocation(word_t label, unsigned int length, cte_t* cte, cap_t cap, extra_caps_t extraCaps, word_t* buffer);
exception_t decodeIA32MMUInvocation(word_t label, word_t length, cptr_t cptr, cte_t *cte, cap_t cap, extra_caps_t extraCaps, word_t* buffer);
exception_t decodeIA32PageDirectoryInvocation(word_t label, word_t length, cte_t* cte, cap_t cap, extra_caps_t extraCaps, word_t* buffer);
#endif

View file

@ -117,7 +117,7 @@ static inline void* get_current_esp(void)
}
/* Cleaning memory before user-level access */
static inline void clearMemory(void* ptr, unsigned int bits)
static inline void clearMemory(void* ptr, word_t bits)
{
memzero(ptr, BIT(bits));
/* no cleaning of caches necessary on IA-32 */

View file

@ -45,7 +45,7 @@ enum frameSizeConstants {
/* Any changes to this function need to be replicated in pageBitsForSize_phys.
*/
static inline unsigned int CONST
static inline word_t CONST
pageBitsForSize(vm_page_size_t pagesize)
{
switch (pagesize) {
@ -65,7 +65,7 @@ pageBitsForSize(vm_page_size_t pagesize)
* be replicated in pageBitsForSize.
*/
PHYS_CODE
static inline unsigned int CONST
static inline word_t CONST
pageBitsForSize_phys(vm_page_size_t pagesize)
{
switch (pagesize) {

View file

@ -15,6 +15,6 @@
#include <api/failures.h>
#include <object/structures.h>
exception_t Arch_decodeInterruptControl(unsigned int length, extra_caps_t extraCaps);
exception_t Arch_decodeInterruptControl(word_t length, extra_caps_t extraCaps);
#endif

View file

@ -17,6 +17,6 @@
#define NUM_IO_PORTS BIT(16)
exception_t decodeIA32PortInvocation(word_t label, unsigned int length, cptr_t cptr, cte_t *slot, cap_t cap, extra_caps_t extraCaps, word_t* buffer);
exception_t decodeIA32PortInvocation(word_t label, word_t length, cptr_t cptr, cte_t *slot, cap_t cap, extra_caps_t extraCaps, word_t* buffer);
#endif

View file

@ -27,7 +27,7 @@ bool_t CONST Arch_hasRecycleRights(cap_t cap);
bool_t CONST Arch_sameRegionAs(cap_t cap_a, cap_t cap_b);
bool_t CONST Arch_sameObjectAs(cap_t cap_a, cap_t cap_b);
cap_t Arch_createObject(object_t t, void *regionBase, word_t userSize);
exception_t Arch_decodeInvocation(word_t label, unsigned int length, cptr_t cptr, cte_t *slot, cap_t cap, extra_caps_t extraCaps, word_t* buffer);
exception_t Arch_decodeInvocation(word_t label, word_t length, cptr_t cptr, cte_t *slot, cap_t cap, extra_caps_t extraCaps, word_t* buffer);
void Arch_prepareThreadDelete(tcb_t *thread);
word_t Arch_getObjectSize(word_t t);

View file

@ -71,26 +71,26 @@ typedef struct arch_tcb {
#define PDPTE_PTR(r) ((pdpte_t *)(r))
#define PDPTE_PTR_PTR(r) ((pdpte_t**)(r))
#define PDPTE_REF(p) ((unsigned int)(p))
#define PDPTE_REF(p) ((word_t)(p))
#define PDPT_SIZE_BITS (PDPT_BITS + PDPTE_SIZE_BITS)
#define PDPT_PTR(r) ((pdpte_t*)(r))
#define PDPT_PREF(p) ((unsigned int)(p))
#define PDPT_PREF(p) ((word_t)(p))
#define PDE_PTR(r) ((pde_t *)(r))
#define PDE_PTR_PTR(r) ((pde_t **)(r))
#define PDE_REF(p) ((unsigned int)(p))
#define PDE_REF(p) ((word_t)(p))
#define PD_SIZE_BITS (PD_BITS + PDE_SIZE_BITS)
#define PD_PTR(r) ((pde_t *)(r))
#define PD_REF(p) ((unsigned int)(p))
#define PD_REF(p) ((word_t)(p))
#define PTE_PTR(r) ((pte_t *)(r))
#define PTE_REF(p) ((unsigned int)(p))
#define PTE_REF(p) ((word_t)(p))
#define PT_SIZE_BITS (PT_BITS + PTE_SIZE_BITS)
#define PT_PTR(r) ((pte_t *)(r))
#define PT_REF(p) ((unsigned int)(p))
#define PT_REF(p) ((word_t)(p))
#ifdef CONFIG_IOMMU
@ -141,7 +141,7 @@ typedef struct asid_pool asid_pool_t;
#define ASID_POOL_BITS asidLowBits
#define ASID_POOL_SIZE_BITS (ASID_POOL_BITS + WORD_SIZE_BITS)
#define ASID_POOL_PTR(r) ((asid_pool_t*)r)
#define ASID_POOL_REF(p) ((unsigned int)p)
#define ASID_POOL_REF(p) ((word_t)p)
#define ASID_BITS (asidHighBits + asidLowBits)
#define nASIDPools BIT(asidHighBits)
#define ASID_LOW(a) (a & MASK(asidLowBits))
@ -193,7 +193,7 @@ cap_get_capMappedASID(cap_t cap)
}
}
static inline unsigned int CONST
static inline word_t CONST
cap_get_archCapSizeBits(cap_t cap)
{
cap_tag_t ctag;

View file

@ -14,8 +14,8 @@
#include <types.h>
#include <object/structures.h>
unsigned int setMRs_fault(tcb_t *sender, tcb_t* receiver, word_t *receiveIPCBuffer);
unsigned int setMRs_syscall_error(tcb_t *thread, word_t *receiveIPCBuffer);
word_t setMRs_fault(tcb_t *sender, tcb_t* receiver, word_t *receiveIPCBuffer);
word_t setMRs_syscall_error(tcb_t *thread, word_t *receiveIPCBuffer);
word_t CONST Arch_decodeTransfer(word_t flags);
exception_t CONST Arch_performTransfer(word_t arch, tcb_t *tcb_src, tcb_t *tcb_dest);

View file

@ -15,7 +15,7 @@
#include <types.h>
#define BI_PTR(r) ((bi_t*)(r))
#define BI_REF(p) ((unsigned int)(p))
#define BI_REF(p) ((word_t)(p))
/* bootinfo data structures (directly corresponding to abstract specification) */

View file

@ -18,13 +18,13 @@
struct pde_range {
pde_t *base;
unsigned int length;
word_t length;
};
typedef struct pde_range pde_range_t;
struct pte_range {
pte_t *base;
unsigned int length;
word_t length;
};
typedef struct pte_range pte_range_t;

View file

@ -44,7 +44,7 @@ typedef struct lookupSlot_ret lookupSlot_ret_t;
struct resolveAddressBits_ret {
exception_t status;
cte_t *slot;
unsigned int bitsRemaining;
word_t bitsRemaining;
};
typedef struct resolveAddressBits_ret resolveAddressBits_ret_t;
@ -53,13 +53,13 @@ lookupCapAndSlot_ret_t lookupCapAndSlot(tcb_t *thread, cptr_t cPtr);
lookupSlot_raw_ret_t lookupSlot(tcb_t *thread, cptr_t capptr);
lookupSlot_ret_t lookupSlotForCNodeOp(bool_t isSource,
cap_t root, cptr_t capptr,
unsigned int depth);
word_t depth);
lookupSlot_ret_t lookupSourceSlot(cap_t root, cptr_t capptr,
unsigned int depth);
word_t depth);
lookupSlot_ret_t lookupTargetSlot(cap_t root, cptr_t capptr,
unsigned int depth);
word_t depth);
lookupSlot_ret_t lookupPivotSlot(cap_t root, cptr_t capptr,
unsigned int depth);
word_t depth);
resolveAddressBits_ret_t resolveAddressBits(cap_t nodeCap,
cptr_t capptr,
word_t n_bits);

View file

@ -19,11 +19,11 @@
__attribute__((format(archetype, string_index, first_to_check)))
#if defined DEBUG || defined RELEASE_PRINTF
unsigned int puts(const char *s) VISIBLE;
word_t puts(const char *s) VISIBLE;
/* for prints that you want enabled in both DEBUG and RELEASE_PRINTF modes,
use kprintf directly */
unsigned int kprintf(const char *format, ...) VISIBLE FORMAT(printf, 1, 2);
unsigned int print_unsigned_long(unsigned long x, unsigned int ui_base) VISIBLE;
word_t kprintf(const char *format, ...) VISIBLE FORMAT(printf, 1, 2);
word_t print_unsigned_long(unsigned long x, word_t ui_base) VISIBLE;
#endif
#ifdef DEBUG

View file

@ -26,7 +26,7 @@ extern word_t ksWorkUnitsCompleted;
extern irq_state_t intStateIRQTable[] VISIBLE;
extern cte_t *intStateIRQNode VISIBLE;
extern const dschedule_t ksDomSchedule[];
extern const unsigned int ksDomScheduleLength;
extern const word_t ksDomScheduleLength;
extern word_t ksDomScheduleIdx;
extern dom_t ksCurDomain;
extern word_t ksDomainTime;

View file

@ -17,12 +17,12 @@
struct slot_range {
cte_t *cnode;
unsigned int offset;
unsigned int length;
word_t offset;
word_t length;
};
typedef struct slot_range slot_range_t;
exception_t decodeCNodeInvocation(word_t label, unsigned int length,
exception_t decodeCNodeInvocation(word_t label, word_t length,
cap_t cap, extra_caps_t extraCaps,
word_t *buffer);
exception_t invokeCNodeRevoke(cte_t *destSlot);

View file

@ -17,11 +17,11 @@
#include <arch/object/interrupt.h>
#include <plat/machine.h>
exception_t decodeIRQControlInvocation(word_t label, unsigned int length,
exception_t decodeIRQControlInvocation(word_t label, word_t length,
cte_t *srcSlot, extra_caps_t extraCaps,
word_t *buffer);
exception_t invokeIRQControl(irq_t irq, cte_t *handlerSlot, cte_t *controlSlot);
exception_t decodeIRQHandlerInvocation(word_t label, unsigned int length, irq_t irq,
exception_t decodeIRQHandlerInvocation(word_t label, word_t length, irq_t irq,
extra_caps_t extraCaps, word_t *buffer);
void invokeIRQHandler_AckIRQ(irq_t irq);
void invokeIRQHandler_SetIRQHandler(irq_t irq, cap_t cap, cte_t *slot);

View file

@ -42,7 +42,7 @@ cap_t CONST maskCapRights(cap_rights_t cap_rights, cap_t cap);
cap_t createObject(object_t t, void *regionBase, word_t);
void createNewObjects(object_t t, cte_t *parent, slot_range_t slots,
void *regionBase, word_t userSize);
exception_t decodeInvocation(word_t label, unsigned int length,
exception_t decodeInvocation(word_t label, word_t length,
cptr_t capIndex, cte_t *slot, cap_t cap,
extra_caps_t extraCaps, bool_t block, bool_t call,
word_t *buffer);

View file

@ -254,7 +254,7 @@ isArchCap(cap_t cap)
return (cap_get_capType(cap) % 2);
}
static inline unsigned int CONST
static inline word_t CONST
cap_get_capSizeBits(cap_t cap)
{
@ -279,7 +279,7 @@ cap_get_capSizeBits(cap_t cap)
return TCB_BLOCK_SIZE_BITS;
case cap_zombie_cap: {
uint32_t type = cap_zombie_cap_get_capZombieType(cap);
word_t type = cap_zombie_cap_get_capZombieType(cap);
if (type == ZombieType_ZombieTCB) {
return TCB_BLOCK_SIZE_BITS;
}

View file

@ -39,24 +39,24 @@ tcb_queue_t tcbEPDequeue(tcb_t *tcb, tcb_queue_t queue);
void setupCallerCap(tcb_t *sender, tcb_t *receiver);
void deleteCallerCap(tcb_t *receiver);
unsigned int copyMRs(tcb_t *sender, word_t *sendBuf, tcb_t *receiver,
word_t *recvBuf, unsigned int n);
exception_t decodeTCBInvocation(word_t label, unsigned int length, cap_t cap,
word_t copyMRs(tcb_t *sender, word_t *sendBuf, tcb_t *receiver,
word_t *recvBuf, word_t n);
exception_t decodeTCBInvocation(word_t label, word_t length, cap_t cap,
cte_t* slot, extra_caps_t extraCaps, bool_t call,
word_t *buffer);
exception_t decodeCopyRegisters(cap_t cap, unsigned int length,
exception_t decodeCopyRegisters(cap_t cap, word_t length,
extra_caps_t extraCaps, word_t *buffer);
exception_t decodeReadRegisters(cap_t cap, unsigned int length, bool_t call,
exception_t decodeReadRegisters(cap_t cap, word_t length, bool_t call,
word_t *buffer);
exception_t decodeWriteRegisters(cap_t cap, unsigned int length, word_t *buffer);
exception_t decodeTCBConfigure(cap_t cap, unsigned int length,
exception_t decodeWriteRegisters(cap_t cap, word_t length, word_t *buffer);
exception_t decodeTCBConfigure(cap_t cap, word_t length,
cte_t* slot, extra_caps_t rootCaps, word_t *buffer);
exception_t decodeSetPriority(cap_t cap, unsigned int length, word_t *buffer);
exception_t decodeSetIPCBuffer(cap_t cap, unsigned int length,
exception_t decodeSetPriority(cap_t cap, word_t length, word_t *buffer);
exception_t decodeSetIPCBuffer(cap_t cap, word_t length,
cte_t* slot, extra_caps_t extraCaps, word_t *buffer);
exception_t decodeSetSpace(cap_t cap, unsigned int length,
exception_t decodeSetSpace(cap_t cap, word_t length,
cte_t* slot, extra_caps_t extraCaps, word_t *buffer);
exception_t decodeDomainInvocation(word_t label, unsigned int length,
exception_t decodeDomainInvocation(word_t label, word_t length,
extra_caps_t extraCaps, word_t *buffer);
exception_t decodeBindNotification(cap_t cap, extra_caps_t extraCaps);
exception_t decodeUnbindNotification(cap_t cap);
@ -83,13 +83,13 @@ exception_t invokeTCB_CopyRegisters(tcb_t *dest, tcb_t *src,
bool_t transferFrame, bool_t transferInteger,
word_t transferArch);
exception_t invokeTCB_ReadRegisters(tcb_t *src, bool_t suspendSource,
unsigned int n, word_t arch, bool_t call);
word_t n, word_t arch, bool_t call);
exception_t invokeTCB_WriteRegisters(tcb_t *dest, bool_t resumeTarget,
unsigned int n, word_t arch, word_t *buffer);
word_t n, word_t arch, word_t *buffer);
exception_t invokeTCB_NotificationControl(tcb_t *tcb, notification_t *ntfnPtr);
cptr_t PURE getExtraCPtr(word_t *bufferPtr, unsigned int i);
void setExtraBadge(word_t *bufferPtr, word_t badge, unsigned int i);
cptr_t PURE getExtraCPtr(word_t *bufferPtr, word_t i);
void setExtraBadge(word_t *bufferPtr, word_t badge, word_t i);
exception_t lookupExtraCaps(tcb_t* thread, word_t *bufferPtr, message_info_t info);
#ifdef DEBUG

View file

@ -23,7 +23,7 @@
#define GET_FREE_REF(base,freeIndex) ((word_t)(((word_t)(base)) + FREE_INDEX_TO_OFFSET(freeIndex)))
#define GET_FREE_INDEX(base,free) (((word_t)(free) - (word_t)(base))>>MIN_SIZE_BITS)
exception_t decodeUntypedInvocation(word_t label, unsigned int length,
exception_t decodeUntypedInvocation(word_t label, word_t length,
cte_t *slot, cap_t cap,
extra_caps_t extraCaps, bool_t call,
word_t *buffer);

View file

@ -15,9 +15,9 @@
#include <stdint.h>
unsigned int strnlen(const char *s, unsigned int maxlen);
unsigned int strlcpy(char *dest, const char *src, unsigned int size);
unsigned int strlcat(char *dest, const char *src, unsigned int size);
word_t strnlen(const char *s, word_t maxlen);
word_t strlcpy(char *dest, const char *src, word_t size);
word_t strlcat(char *dest, const char *src, word_t size);
#endif

View file

@ -14,7 +14,7 @@
#include <arch/object/interrupt.h>
exception_t
Arch_decodeInterruptControl(unsigned int length, extra_caps_t extraCaps)
Arch_decodeInterruptControl(word_t length, extra_caps_t extraCaps)
{
current_syscall_error.type = seL4_IllegalOperation;
return EXCEPTION_SYSCALL_ERROR;

View file

@ -462,7 +462,7 @@ Arch_createObject(object_t t, void *regionBase, word_t userSize)
}
exception_t
Arch_decodeInvocation(word_t label, unsigned int length, cptr_t cptr,
Arch_decodeInvocation(word_t label, word_t length, cptr_t cptr,
cte_t *slot, cap_t cap, extra_caps_t extraCaps,
word_t *buffer)
{

View file

@ -68,7 +68,7 @@ setMRs_lookup_failure(tcb_t *receiver, word_t* receiveIPCBuffer,
}
}
unsigned int
word_t
setMRs_fault(tcb_t *sender, tcb_t* receiver, word_t *receiveIPCBuffer)
{
switch (fault_get_faultType(sender->tcbFault)) {
@ -132,7 +132,7 @@ setMRs_fault(tcb_t *sender, tcb_t* receiver, word_t *receiveIPCBuffer)
}
}
unsigned int
word_t
setMRs_syscall_error(tcb_t *thread, word_t *receiveIPCBuffer)
{
switch (current_syscall_error.type) {

View file

@ -1770,7 +1770,7 @@ decodeIA32FrameInvocation(
exception_t
decodeIA32MMUInvocation(
word_t label,
unsigned int length,
word_t length,
cptr_t cptr,
cte_t* cte,
cap_t cap,

View file

@ -228,7 +228,7 @@ void unmapPageDirectory(asid_t asid, vptr_t vaddr, pde_t *pd)
exception_t
decodeIA32PageDirectoryInvocation(
word_t label,
unsigned int length,
word_t length,
cte_t* cte,
cap_t cap,
extra_caps_t extraCaps,

View file

@ -321,7 +321,7 @@ void unmapPageDirectory(asid_t asid, vptr_t vaddr, pde_t *pd)
exception_t
decodeIA32PageDirectoryInvocation(
word_t label,
unsigned int length,
word_t length,
cte_t* cte,
cap_t cap,
extra_caps_t extraCaps,

View file

@ -13,7 +13,7 @@
#include <arch/object/interrupt.h>
#include <arch/linker.h>
exception_t Arch_decodeInterruptControl(unsigned int length, extra_caps_t extraCaps)
exception_t Arch_decodeInterruptControl(word_t length, extra_caps_t extraCaps)
{
current_syscall_error.type = seL4_IllegalOperation;
return EXCEPTION_SYSCALL_ERROR;

View file

@ -38,7 +38,7 @@ ensurePortOperationAllowed(cap_t cap, uint32_t start_port, uint32_t size)
exception_t
decodeIA32PortInvocation(
word_t label,
unsigned int length,
word_t length,
cptr_t cptr,
cte_t* slot,
cap_t cap,

View file

@ -555,7 +555,7 @@ Arch_createObject(object_t t, void *regionBase, word_t userSize)
exception_t
Arch_decodeInvocation(
word_t label,
unsigned int length,
word_t length,
cptr_t cptr,
cte_t* slot,
cap_t cap,

View file

@ -65,7 +65,7 @@ setMRs_lookup_failure(tcb_t *receiver, word_t* receiveIPCBuffer, lookup_fault_t
}
}
unsigned int setMRs_fault(tcb_t *sender, tcb_t* receiver, word_t *receiveIPCBuffer)
word_t setMRs_fault(tcb_t *sender, tcb_t* receiver, word_t *receiveIPCBuffer)
{
assert(n_msgRegisters == 2);
@ -141,7 +141,7 @@ unsigned int setMRs_fault(tcb_t *sender, tcb_t* receiver, word_t *receiveIPCBuff
}
}
unsigned int setMRs_syscall_error(tcb_t *thread, word_t *receiveIPCBuffer)
word_t setMRs_syscall_error(tcb_t *thread, word_t *receiveIPCBuffer)
{
assert(n_msgRegisters >= 2);

View file

@ -16,5 +16,5 @@ const dschedule_t ksDomSchedule[] = {
{ .domain = 0, .length = 1 },
};
const unsigned int ksDomScheduleLength = sizeof(ksDomSchedule) / sizeof(dschedule_t);
const word_t ksDomScheduleLength = sizeof(ksDomSchedule) / sizeof(dschedule_t);

View file

@ -19,7 +19,7 @@ fastpath_call(word_t cptr, word_t msgInfo)
message_info_t info;
cap_t ep_cap;
endpoint_t *ep_ptr;
unsigned int length;
word_t length;
tcb_t *dest;
word_t badge;
cte_t *replySlot, *callerSlot;
@ -160,7 +160,7 @@ fastpath_reply_recv(word_t cptr, word_t msgInfo)
message_info_t info;
cap_t ep_cap;
endpoint_t *ep_ptr;
unsigned int length;
word_t length;
cte_t *callerSlot;
cap_t callerCap;
tcb_t *caller;

View file

@ -27,7 +27,7 @@ ndks_boot_t ndks_boot BOOT_DATA;
BOOT_CODE bool_t
insert_region(region_t reg)
{
unsigned int i;
word_t i;
assert(reg.start <= reg.end);
if (is_reg_empty(reg)) {
@ -51,8 +51,8 @@ reg_size(region_t reg)
BOOT_CODE pptr_t
alloc_region(word_t size_bits)
{
unsigned int i;
unsigned int reg_index = 0; /* gcc cannot work out that this will not be used uninitialized */
word_t i;
word_t reg_index = 0; /* gcc cannot work out that this will not be used uninitialized */
region_t reg = REG_EMPTY;
region_t rem_small = REG_EMPTY;
region_t rem_large = REG_EMPTY;
@ -109,8 +109,8 @@ alloc_region(word_t size_bits)
/* Add the remaining regions in largest to smallest order */
insert_region(rem_large);
if (!insert_region(rem_small)) {
printf("alloc_region(): wasted 0x%x bytes due to alignment, try to increase MAX_NUM_FREEMEM_REG\n",
(unsigned int)(rem_small.end - rem_small.start));
printf("alloc_region(): wasted 0x%lx bytes due to alignment, try to increase MAX_NUM_FREEMEM_REG\n",
(word_t)(rem_small.end - rem_small.start));
}
return reg.start;
}
@ -189,7 +189,7 @@ BOOT_CODE void
create_domain_cap(cap_t root_cnode_cap)
{
cap_t cap;
unsigned int i;
word_t i;
/* Check domain scheduler assumptions. */
assert(ksDomScheduleLength > 0);
@ -443,7 +443,7 @@ provide_untyped_cap(
)
{
bool_t ret;
unsigned int i = ndks_boot.slot_pos_cur - first_untyped_slot;
word_t i = ndks_boot.slot_pos_cur - first_untyped_slot;
if (i < CONFIG_MAX_NUM_BOOTINFO_UNTYPED_CAPS) {
ndks_boot.bi_frame->ut_obj_paddr_list[i] = pptr_to_paddr((void*)pptr);
ndks_boot.bi_frame->ut_obj_size_bits_list[i] = size_bits;

View file

@ -71,7 +71,7 @@ lookupSlot(tcb_t *thread, cptr_t capptr)
lookupSlot_ret_t
lookupSlotForCNodeOp(bool_t isSource, cap_t root, cptr_t capptr,
unsigned int depth)
word_t depth)
{
resolveAddressBits_ret_t res_ret;
lookupSlot_ret_t ret;
@ -117,19 +117,19 @@ lookupSlotForCNodeOp(bool_t isSource, cap_t root, cptr_t capptr,
}
lookupSlot_ret_t
lookupSourceSlot(cap_t root, cptr_t capptr, unsigned int depth)
lookupSourceSlot(cap_t root, cptr_t capptr, word_t depth)
{
return lookupSlotForCNodeOp(true, root, capptr, depth);
}
lookupSlot_ret_t
lookupTargetSlot(cap_t root, cptr_t capptr, unsigned int depth)
lookupTargetSlot(cap_t root, cptr_t capptr, word_t depth)
{
return lookupSlotForCNodeOp(false, root, capptr, depth);
}
lookupSlot_ret_t
lookupPivotSlot(cap_t root, cptr_t capptr, unsigned int depth)
lookupPivotSlot(cap_t root, cptr_t capptr, word_t depth)
{
return lookupSlotForCNodeOp(true, root, capptr, depth);
}

View file

@ -158,7 +158,7 @@ doNormalTransfer(tcb_t *sender, word_t *sendBuffer, endpoint_t *endpoint,
word_t badge, bool_t canGrant, tcb_t *receiver,
word_t *receiveBuffer, bool_t diminish)
{
unsigned int msgTransferred;
word_t msgTransferred;
message_info_t tag;
exception_t status;
extra_caps_t caps;
@ -190,7 +190,7 @@ void
doFaultTransfer(word_t badge, tcb_t *sender, tcb_t *receiver,
word_t *receiverIPCBuffer)
{
unsigned int sent;
word_t sent;
message_info_t msgInfo;
sent = setMRs_fault(sender, receiver, receiverIPCBuffer);
@ -206,7 +206,7 @@ transferCaps(message_info_t info, extra_caps_t caps,
endpoint_t *endpoint, tcb_t *receiver,
word_t *receiveBuffer, bool_t diminish)
{
unsigned int i;
word_t i;
cte_t* destSlot;
info = message_info_set_msgExtraCaps(info, 0);

View file

@ -51,8 +51,8 @@ xmod(unsigned long x, unsigned int denom)
}
}
unsigned int
print_unsigned_long(unsigned long x, unsigned int ui_base)
word_t
print_unsigned_long(unsigned long x, word_t ui_base)
{
char out[sizeof(unsigned long) * 2 + 3];
unsigned int i, j;
@ -251,7 +251,7 @@ vprintf(const char *format, va_list ap)
return n;
}
unsigned int puts(const char *s)
word_t puts(const char *s)
{
for (; *s; s++) {
kernel_putchar(*s);
@ -260,7 +260,7 @@ unsigned int puts(const char *s)
return 0;
}
unsigned int
word_t
kprintf(const char *format, ...)
{
va_list args;

View file

@ -38,7 +38,7 @@ static void emptySlot(cte_t *slot, irq_t irq);
static exception_t reduceZombie(cte_t* slot, bool_t exposed);
exception_t
decodeCNodeInvocation(word_t label, unsigned int length, cap_t cap,
decodeCNodeInvocation(word_t label, word_t length, cap_t cap,
extra_caps_t extraCaps, word_t *buffer)
{
lookupSlot_ret_t lu_ret;

View file

@ -209,7 +209,7 @@ receiveIPC(tcb_t *thread, cap_t cap, bool_t isBlocking)
void
replyFromKernel_error(tcb_t *thread)
{
unsigned int len;
word_t len;
word_t *ipcBuffer;
ipcBuffer = lookupIPCBuffer(true, thread);

View file

@ -23,7 +23,7 @@
#include <model/statedata.h>
exception_t
decodeIRQControlInvocation(word_t label, unsigned int length,
decodeIRQControlInvocation(word_t label, word_t length,
cte_t *srcSlot, extra_caps_t extraCaps,
word_t *buffer)
{
@ -90,7 +90,7 @@ invokeIRQControl(irq_t irq, cte_t *handlerSlot, cte_t *controlSlot)
}
exception_t
decodeIRQHandlerInvocation(word_t label, unsigned int length, irq_t irq,
decodeIRQHandlerInvocation(word_t label, word_t length, irq_t irq,
extra_caps_t extraCaps, word_t *buffer)
{
switch (label) {
@ -135,7 +135,7 @@ decodeIRQHandlerInvocation(word_t label, unsigned int length, irq_t irq,
bool_t trig, pol;
if (length < 2) {
userError("IRQSetMode: Not enough arguments: %d", length);
userError("IRQSetMode: Not enough arguments: %ld", length);
current_syscall_error.type = seL4_TruncatedMessage;
return EXCEPTION_SYSCALL_ERROR;
}

View file

@ -569,7 +569,7 @@ createNewObjects(object_t t, cte_t *parent, slot_range_t slots,
{
word_t objectSize;
void *nextFreeArea;
unsigned int i;
word_t i;
word_t totalObjectSize UNUSED;
/* ghost check that we're visiting less bytes than the max object size */
@ -593,7 +593,7 @@ createNewObjects(object_t t, cte_t *parent, slot_range_t slots,
}
exception_t
decodeInvocation(word_t label, unsigned int length,
decodeInvocation(word_t label, word_t length,
cptr_t capIndex, cte_t *slot, cap_t cap,
extra_caps_t extraCaps, bool_t block, bool_t call,
word_t *buffer)

View file

@ -54,7 +54,7 @@ tcbSchedEnqueue(tcb_t *tcb)
tcb_queue_t queue;
dom_t dom;
prio_t prio;
unsigned int idx;
word_t idx;
dom = tcb->tcbDomain;
prio = tcb->tcbPriority;
@ -85,7 +85,7 @@ tcbSchedAppend(tcb_t *tcb)
tcb_queue_t queue;
dom_t dom;
prio_t prio;
unsigned int idx;
word_t idx;
dom = tcb->tcbDomain;
prio = tcb->tcbPriority;
@ -116,7 +116,7 @@ tcbSchedDequeue(tcb_t *tcb)
tcb_queue_t queue;
dom_t dom;
prio_t prio;
unsigned int idx;
word_t idx;
dom = tcb->tcbDomain;
prio = tcb->tcbPriority;
@ -180,14 +180,14 @@ tcbEPDequeue(tcb_t *tcb, tcb_queue_t queue)
}
cptr_t PURE
getExtraCPtr(word_t *bufferPtr, unsigned int i)
getExtraCPtr(word_t *bufferPtr, word_t i)
{
return (cptr_t)bufferPtr[seL4_MsgMaxLength + 2 + i];
}
void
setExtraBadge(word_t *bufferPtr, word_t badge,
unsigned int i)
word_t i)
{
bufferPtr[seL4_MsgMaxLength + 2 + i] = badge;
}
@ -230,7 +230,7 @@ lookupExtraCaps(tcb_t* thread, word_t *bufferPtr, message_info_t info)
{
lookupSlot_raw_ret_t lu_ret;
cptr_t cptr;
unsigned int i, length;
word_t i, length;
if (!bufferPtr) {
current_extra_caps.excaprefs[0] = NULL;
@ -258,11 +258,11 @@ lookupExtraCaps(tcb_t* thread, word_t *bufferPtr, message_info_t info)
}
/* Copy IPC MRs from one thread to another */
unsigned int
word_t
copyMRs(tcb_t *sender, word_t *sendBuf, tcb_t *receiver,
word_t *recvBuf, unsigned int n)
word_t *recvBuf, word_t n)
{
unsigned int i;
word_t i;
/* Copy inline words */
for (i = 0; i < n && i < n_msgRegisters; i++) {
@ -287,7 +287,7 @@ copyMRs(tcb_t *sender, word_t *sendBuf, tcb_t *receiver,
* functions directly. This is a significant deviation from the Haskell
* spec. */
exception_t
decodeTCBInvocation(word_t label, unsigned int length, cap_t cap,
decodeTCBInvocation(word_t label, word_t length, cap_t cap,
cte_t* slot, extra_caps_t extraCaps, bool_t call,
word_t *buffer)
{
@ -347,7 +347,7 @@ enum CopyRegistersFlags {
};
exception_t
decodeCopyRegisters(cap_t cap, unsigned int length,
decodeCopyRegisters(cap_t cap, word_t length,
extra_caps_t extraCaps, word_t *buffer)
{
word_t transferArch;
@ -392,7 +392,7 @@ enum ReadRegistersFlags {
};
exception_t
decodeReadRegisters(cap_t cap, unsigned int length, bool_t call,
decodeReadRegisters(cap_t cap, word_t length, bool_t call,
word_t *buffer)
{
word_t transferArch, flags, n;
@ -438,7 +438,7 @@ enum WriteRegistersFlags {
};
exception_t
decodeWriteRegisters(cap_t cap, unsigned int length, word_t *buffer)
decodeWriteRegisters(cap_t cap, word_t length, word_t *buffer)
{
word_t flags, w;
word_t transferArch;
@ -479,14 +479,14 @@ decodeWriteRegisters(cap_t cap, unsigned int length, word_t *buffer)
* specialisations of TCBConfigure. */
exception_t
decodeTCBConfigure(cap_t cap, unsigned int length, cte_t* slot,
decodeTCBConfigure(cap_t cap, word_t length, cte_t* slot,
extra_caps_t rootCaps, word_t *buffer)
{
cte_t *bufferSlot, *cRootSlot, *vRootSlot;
cap_t bufferCap, cRootCap, vRootCap;
deriveCap_ret_t dc_ret;
cptr_t faultEP;
unsigned int prio;
word_t prio;
word_t cRootData, vRootData, bufferAddr;
if (length < 5 || rootCaps.excaprefs[0] == NULL
@ -587,7 +587,7 @@ decodeTCBConfigure(cap_t cap, unsigned int length, cte_t* slot,
}
exception_t
decodeSetPriority(cap_t cap, unsigned int length, word_t *buffer)
decodeSetPriority(cap_t cap, word_t length, word_t *buffer)
{
prio_t newPrio;
@ -620,7 +620,7 @@ decodeSetPriority(cap_t cap, unsigned int length, word_t *buffer)
}
exception_t
decodeSetIPCBuffer(cap_t cap, unsigned int length, cte_t* slot,
decodeSetIPCBuffer(cap_t cap, word_t length, cte_t* slot,
extra_caps_t extraCaps, word_t *buffer)
{
cptr_t cptr_bufferPtr;
@ -666,7 +666,7 @@ decodeSetIPCBuffer(cap_t cap, unsigned int length, cte_t* slot,
}
exception_t
decodeSetSpace(cap_t cap, unsigned int length, cte_t* slot,
decodeSetSpace(cap_t cap, word_t length, cte_t* slot,
extra_caps_t extraCaps, word_t *buffer)
{
cptr_t faultEP;
@ -743,7 +743,7 @@ decodeSetSpace(cap_t cap, unsigned int length, cte_t* slot,
}
exception_t
decodeDomainInvocation(word_t label, unsigned int length, extra_caps_t extraCaps, word_t *buffer)
decodeDomainInvocation(word_t label, word_t length, extra_caps_t extraCaps, word_t *buffer)
{
word_t domain;
cap_t tcap;
@ -950,7 +950,7 @@ invokeTCB_CopyRegisters(tcb_t *dest, tcb_t *tcb_src,
}
if (transferFrame) {
unsigned int i;
word_t i;
word_t v;
word_t pc;
@ -964,7 +964,7 @@ invokeTCB_CopyRegisters(tcb_t *dest, tcb_t *tcb_src,
}
if (transferInteger) {
unsigned int i;
word_t i;
word_t v;
for (i = 0; i < n_gpRegisters; i++) {
@ -984,9 +984,9 @@ invokeTCB_CopyRegisters(tcb_t *dest, tcb_t *tcb_src,
*/
exception_t
invokeTCB_ReadRegisters(tcb_t *tcb_src, bool_t suspendSource,
unsigned int n, word_t arch, bool_t call)
word_t n, word_t arch, bool_t call)
{
unsigned int i, j;
word_t i, j;
exception_t e;
tcb_t *thread;
@ -1045,9 +1045,9 @@ invokeTCB_ReadRegisters(tcb_t *tcb_src, bool_t suspendSource,
exception_t
invokeTCB_WriteRegisters(tcb_t *dest, bool_t resumeTarget,
unsigned int n, word_t arch, word_t *buffer)
word_t n, word_t arch, word_t *buffer)
{
unsigned int i;
word_t i;
word_t pc;
exception_t e;

View file

@ -23,13 +23,13 @@
#include <util.h>
static word_t
alignUp(word_t baseValue, unsigned int alignment)
alignUp(word_t baseValue, word_t alignment)
{
return (baseValue + (BIT(alignment) - 1)) & ~MASK(alignment);
}
exception_t
decodeUntypedInvocation(word_t label, unsigned int length, cte_t *slot,
decodeUntypedInvocation(word_t label, word_t length, cte_t *slot,
cap_t cap, extra_caps_t extraCaps,
bool_t call, word_t *buffer)
{
@ -40,7 +40,7 @@ decodeUntypedInvocation(word_t label, unsigned int length, cte_t *slot,
cap_t nodeCap;
lookupSlot_ret_t lu_ret;
word_t nodeSize;
unsigned int i;
word_t i;
slot_range_t slots;
word_t freeRef, alignedFreeRef, objectSize, untypedFreeBytes;
word_t freeIndex;
@ -196,10 +196,10 @@ decodeUntypedInvocation(word_t label, unsigned int length, cte_t *slot,
if (objectSize >= wordBits || (untypedFreeBytes >> objectSize) < nodeWindow) {
userError("Untyped Retype: Insufficient memory "
"(%u * %u bytes needed, %u bytes available).",
(unsigned int)nodeWindow,
"(%lu * %u bytes needed, %lu bytes available).",
(word_t)nodeWindow,
(objectSize >= wordBits ? -1 : (1 << objectSize)),
(unsigned int)(untypedFreeBytes));
(word_t)(untypedFreeBytes));
current_syscall_error.type = seL4_NotEnoughMemory;
current_syscall_error.memoryLeft = untypedFreeBytes;
return EXCEPTION_SYSCALL_ERROR;

View file

@ -13,16 +13,16 @@
#ifdef DEBUG
unsigned int strnlen(const char *s, unsigned int maxlen)
word_t strnlen(const char *s, word_t maxlen)
{
unsigned int len;
word_t len;
for (len = 0; len < maxlen && s[len]; len++);
return len;
}
unsigned int strlcpy(char *dest, const char *src, unsigned int size)
word_t strlcpy(char *dest, const char *src, word_t size)
{
unsigned int len;
word_t len;
for (len = 0; len + 1 < size && src[len]; len++) {
dest[len] = src[len];
}
@ -30,9 +30,9 @@ unsigned int strlcpy(char *dest, const char *src, unsigned int size)
return len;
}
unsigned int strlcat(char *dest, const char *src, unsigned int size)
word_t strlcat(char *dest, const char *src, word_t size)
{
unsigned int len;
word_t len;
/* get to the end of dest */
for (len = 0; len < size && dest[len]; len++);
/* check that dest was at least 'size' length to prevent inserting

View file

@ -82,7 +82,7 @@ memcpy(void* ptr_dst, const void* ptr_src, unsigned long n)
int
strncmp(const char* s1, const char* s2, int n)
{
unsigned int i;
word_t i;
int diff;
for (i = 0; i < n; i++) {