/branches/arm/boot/doc/doxygroups.h |
---|
File deleted |
/branches/arm/boot/arch/arm32/loader/print/gxemul.c |
---|
31,7 → 31,6 |
* @{ |
*/ |
/** @file |
* @brief GXemul specific code. |
*/ |
/branches/arm/uspace/libc/arch/arm32/src/thread.c |
---|
32,17 → 32,15 |
* @{ |
*/ |
/** @file |
* @brief Uspace threads and TLS. |
*/ |
#include <thread.h> |
#include <malloc.h> |
/** Allocates TLS & TCB. |
/** Allocate TLS & TCB for initial module threads |
* |
* @param data Start of data section (output parameter). |
* @param size Size of (tbss + tdata) sections. |
* @return Pointer to the allocated #tcb_t structure. |
* @param data Start of data section |
* @return pointer to tcb_t structure |
*/ |
tcb_t * __alloc_tls(void **data, size_t size) |
{ |
53,11 → 51,6 |
return result; |
} |
/** Deallocates TLS & TCB. |
* |
* @param tcb TCB structure to be deallocated (along with corresponding TLS). |
* @param size Not used. |
*/ |
void __free_tls_arch(tcb_t *tcb, size_t size) |
{ |
free(tcb); |
/branches/arm/uspace/libc/arch/arm32/src/syscall.c |
---|
30,25 → 30,11 |
* @{ |
*/ |
/** @file |
* @brief Syscall routine. |
* @ingroup libcarm32 |
*/ |
#include <libc.h> |
/** Syscall routine. |
* |
* Stores p1-p4, id to r0-r4 registers and calls <code>swi</code> |
* instruction. Returned value is read from r0 register. |
* |
* @param p1 Parameter 1. |
* @param p2 Parameter 2. |
* @param p3 Parameter 3. |
* @param p4 Parameter 4. |
* @param id Number of syscall. |
* |
* @return Syscall return value. |
*/ |
sysarg_t __syscall(const sysarg_t p1, const sysarg_t p2, const sysarg_t p3, |
const sysarg_t p4, const syscall_t id) |
{ |
67,8 → 53,7 |
"r" (__arm_reg_r4) |
); |
return __arm_reg_r0; |
} |
return __arm_reg_r0; } |
/** @} |
*/ |
/branches/arm/uspace/libc/arch/arm32/include/psthread.h |
---|
1,5 → 1,5 |
/* |
* Copyright (c) 2007 Michal Kebrt |
* Copyright (c) 2006 Ondrej Palkovsky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
29,8 → 29,8 |
/** @addtogroup libcarm32 |
* @{ |
*/ |
/** @file |
* @brief psthread related declarations. |
/** @file |
* @ingroup libcarm32 |
*/ |
#ifndef LIBC_arm32_PSTHREAD_H_ |
40,23 → 40,13 |
#include <align.h> |
#include "thread.h" |
/** Size of a stack item */ |
#define STACK_ITEM_SIZE 4 |
/** Stack alignment - see <a href="http://www.arm.com/support/faqdev/14269.html">ABI</a> for details */ |
/** see <a href="http://www.arm.com/support/faqdev/14269.html">ABI</a> for details */ |
#define STACK_ALIGNMENT 8 |
#define SP_DELTA (0 + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT)) |
/** Sets data to the context. |
* |
* @param c Context (#context_t). |
* @param _pc Program counter. |
* @param stack Stack address. |
* @param size Stack size. |
* @param ptls Pointer to the TCB. |
*/ |
#define context_set(c, _pc, stack, size, ptls) \ |
(c)->pc = (sysarg_t) (_pc); \ |
(c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA; \ |
63,13 → 53,6 |
(c)->tls = ((sysarg_t)(ptls)) + sizeof(tcb_t) + ARM_TP_OFFSET; |
/** Thread context. |
* |
* Only registers preserved accross function calls are included. r9 is used |
* to store a TLS address. -ffixed-r9 gcc forces gcc not to use this |
* register. -mtp=soft forces gcc to use #__aeabi_read_tp to obtain |
* TLS address. |
*/ |
typedef struct { |
uint32_t sp; |
uint32_t pc; |
/branches/arm/uspace/libc/arch/arm32/include/thread.h |
---|
1,5 → 1,5 |
/* |
* Copyright (c) 2007 Pavel Jancik, Michal Kebrt |
* Copyright (c) 2006 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
26,11 → 26,10 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libcarm32 |
/** @addtogroup libcia64 |
* @{ |
*/ |
/** @file |
* @brief Uspace threads and TLS. |
*/ |
#ifndef LIBC_arm32_THREAD_H_ |
38,26 → 37,14 |
#include <unistd.h> |
/** Stack initial size. */ |
#define THREAD_INITIAL_STACK_PAGES_NO 1 |
/** Offsets for accessing __thread variables are shifted 8 bytes higher. */ |
#define ARM_TP_OFFSET (-8) |
/** TCB (Thread Control Block) struct. |
* |
* TLS starts just after this struct. |
*/ |
typedef struct { |
/** psthread data. */ |
void *pst_data; |
} tcb_t; |
/** Sets TLS address to the r9 register. |
* |
* @param tcb TCB (TLS starts behind) |
*/ |
static inline void __tcb_set(tcb_t *tcb) |
{ |
void *tls = (void *)tcb; |
69,11 → 56,6 |
); |
} |
/** Returns TCB address. |
* |
* @return TCB address (starts before TLS which address is stored in r9 register). |
*/ |
static inline tcb_t *__tcb_get(void) |
{ |
void *ret; |
84,15 → 66,6 |
return (tcb_t *)(ret - ARM_TP_OFFSET - sizeof(tcb_t)); |
} |
/** Returns TLS address stored. |
* |
* Implemented in assembly. |
* |
* @return TLS address stored in r9 register |
*/ |
extern uintptr_t __aeabi_read_tp(void); |
#endif |
/** @} |
/branches/arm/uspace/libc/arch/arm32/include/atomic.h |
---|
30,7 → 30,6 |
* @{ |
*/ |
/** @file |
* @brief Atomic operations. |
*/ |
#ifndef LIBC_arm32_ATOMIC_H_ |
38,8 → 37,8 |
/** Atomic addition. |
* |
* @param val Where to add. |
* @param i Value to be added. |
* @param val "Atomic variable". |
* @param i Value to add. |
* |
* @return Value after addition. |
*/ |
65,48 → 64,15 |
return ret; |
} |
/** Atomic increment. |
* |
* @param val Variable to be incremented. |
*/ |
static inline void atomic_inc(atomic_t *val) { atomic_add(val, 1); } |
/** Atomic decrement. |
* |
* @param val Variable to be decremented. |
*/ |
static inline void atomic_dec(atomic_t *val) { atomic_add(val, -1); } |
/** Atomic pre-increment. |
* |
* @param val Variable to be incremented. |
* @return Value after incrementation. |
*/ |
static inline long atomic_preinc(atomic_t *val) { return atomic_add(val, 1); } |
/** Atomic pre-decrement. |
* |
* @param val Variable to be decremented. |
* @return Value after decrementation. |
*/ |
static inline long atomic_predec(atomic_t *val) { return atomic_add(val, -1); } |
/** Atomic post-increment. |
* |
* @param val Variable to be incremented. |
* @return Value before incrementation. |
*/ |
static inline long atomic_postinc(atomic_t *val) { return atomic_add(val, 1) - 1; } |
/** Atomic post-decrement. |
* |
* @param val Variable to be decremented. |
* @return Value before decrementation. |
*/ |
static inline long atomic_postdec(atomic_t *val) { return atomic_add(val, -1) + 1; } |
#endif |
/** @} |
/branches/arm/uspace/libc/arch/arm32/include/syscall.h |
---|
1,5 → 1,5 |
/* |
* Copyright (c) 2007 Michal Kebrt |
* Copyright (c) 2005 Martin Decky |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
26,11 → 26,11 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup libcarm32 |
/** @addtogroup libc |
* @{ |
*/ |
/** @file |
* @brief Empty. |
/** |
* @file |
*/ |
#ifndef LIBC_arm32_SYSCALL_H_ |
/branches/arm/uspace/libc/arch/arm32/include/endian.h |
---|
29,8 → 29,7 |
/** @addtogroup libcarm32 |
* @{ |
*/ |
/** @file |
* @brief Endianness definition. |
/** @file |
*/ |
#ifndef LIBC_arm32_ENDIAN_H_ |
/branches/arm/uspace/libc/arch/arm32/include/stackarg.h |
---|
1,5 → 1,5 |
/* |
* Copyright (c) 2007 Michal Kebrt |
* Copyright (c) 2006 Josef Cejka |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
30,7 → 30,6 |
* @{ |
*/ |
/** @file |
* @brief Empty. |
*/ |
#ifndef LIBC_arm32_STACKARG_H_ |
/branches/arm/uspace/libc/arch/arm32/include/faddr.h |
---|
1,5 → 1,5 |
/* |
* Copyright (c) 2007 Michal Kebrt |
* Copyright (c) 2005 Jakub Jermar |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
29,8 → 29,7 |
/** @addtogroup libcarm32 |
* @{ |
*/ |
/** @file |
* @brief Function address conversion. |
/** @file |
*/ |
#ifndef LIBC_arm32_FADDR_H_ |
38,9 → 37,13 |
#include <libarch/types.h> |
/** Calculate absolute address of function referenced by fptr pointer. |
/** |
* |
* Calculate absolute address of function |
* referenced by fptr pointer. |
* |
* @param f Function pointer. |
* |
*/ |
#define FADDR(f) (f) |
/branches/arm/uspace/libc/arch/arm32/include/limits.h |
---|
1,5 → 1,5 |
/* |
* Copyright (c) 2007 Michal Kebrt |
* Copyright (c) 2006 Josef Cejka |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
29,17 → 29,17 |
/** @addtogroup libcarm32 |
* @{ |
*/ |
/** @file |
* @brief Limits declarations. |
/** @file |
* @ingroup libcarm32 |
*/ |
#ifndef LIBC_arm32__LIMITS_H_ |
#define LIBC_arm32__LIMITS_H_ |
#define LONG_MIN MIN_INT32 |
#define LONG_MAX MAX_INT32 |
#define ULONG_MIN MIN_UINT32 |
#define ULONG_MAX MAX_UINT32 |
# define LONG_MIN MIN_INT32 |
# define LONG_MAX MAX_INT32 |
# define ULONG_MIN MIN_UINT32 |
# define ULONG_MAX MAX_UINT32 |
#endif |
/branches/arm/uspace/libc/arch/arm32/include/types.h |
---|
29,8 → 29,8 |
/** @addtogroup libcarm32 |
* @{ |
*/ |
/** @file |
* @brief Definitions of basic types like #uintptr_t. |
/** @file |
* @ingroup libcarm32 |
*/ |
#ifndef LIBC_arm32_TYPES_H_ |
/branches/arm/uspace/libc/arch/arm32/include/config.h |
---|
29,8 → 29,7 |
/** @addtogroup libcarm32 |
* @{ |
*/ |
/** @file |
* @brief Configuration constants. |
/** @file |
*/ |
#ifndef LIBC_arm32_CONFIG_H_ |
/branches/arm/uspace/kbd/arch/arm32/src/kbd.c |
---|
32,7 → 32,6 |
* @{ |
*/ |
/** @file |
* @brief Empty, required by generic Makefile. |
*/ |
/branches/arm/uspace/kbd/arch/arm32/src/kbd_gxemul.c |
---|
26,15 → 26,15 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup kbdarm32gxemul GXemul |
* @brief HelenOS arm32 GXEmul uspace keyboard handler. |
* @ingroup kbdarm32 |
/** @addtogroup kbdarm32 arm32 |
* @brief HelenOS arm32 arch dependent parts of uspace keyboard handler. |
* @ingroup kbd |
* @{ |
*/ |
/** @file |
* @brief GXemul uspace keyboard handler. |
*/ |
#include <arch/kbd.h> |
#include <ipc/ipc.h> |
#include <sysinfo.h> |
#include <kbd.h> |
53,7 → 53,6 |
#define GXEMUL_KEY_F11 0x33325d1bL |
#define GXEMUL_KEY_F12 0x34325b1bL |
/** Function keys start code (F1=0x101) */ |
#define FUNCTION_KEYS 0x100 |
irq_cmd_t gxemul_cmds[] = { |
79,14 → 78,6 |
} |
*/ |
/** Process data sent when a key is pressed. |
* |
* @param keybuffer Buffer of scan codes. |
* @param scan_code Scan code. |
* |
* @return Code of the pressed key. |
*/ |
static int gxemul_process_no_fb(keybuffer_t *keybuffer, int scan_code) |
{ |
227,7 → 218,6 |
} |
/** Initializes keyboard handler. */ |
int kbd_arch_init(void) |
{ |
gxemul_cmds[0].addr = (void *) sysinfo_value("kbd.address.virtual"); |
236,17 → 226,10 |
} |
/** Process data sent when a key is pressed. |
* |
* @param keybuffer Buffer of scan codes. |
* @param call IPC call. |
* |
* @return Code of the pressed key. |
*/ |
int kbd_arch_process(keybuffer_t *keybuffer, ipc_call_t *call) |
{ |
int scan_code = IPC_GET_ARG2(*call); |
static int esc_count = 0; |
static int esc_count=0; |
if (scan_code == 0x1b) { |
esc_count++; |
/branches/arm/uspace/kbd/arch/arm32/include/kbd.h |
---|
1,5 → 1,5 |
/* |
* Copyright (c) 2007 Michal Kebrt |
* Copyright (c) 2006 Josef Cejka |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
26,11 → 26,12 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup kbdarm32 |
/** @addtogroup kbdarm32 arm32 |
* @brief HelenOS arm32 arch dependent parts of uspace keyboard handler. |
* @ingroup kbd |
* @{ |
*/ |
/** @file |
* @brief Empty. |
*/ |
#ifndef KBD_arm32_KBD_H_ |