ia64
[Miscellanea]


Files

file  arch.h
file  arg.h
file  asm.h
file  atomic.h
file  barrier.h
file  byteorder.h
file  context.h
file  cpu.h
file  it.h
file  elf.h
file  faddr.h
file  fpu_context.h
file  memstr.h
file  pal.h
file  register.h
file  ski.h
file  stack.h
file  types.h
file  cpu.c
file  it.c
file  fpu_context.c
file  ia64.c
file  putchar.c
file  ski.c

Data Structures

struct  context
struct  cpu_arch
struct  fpu_context
union  psr
union  rsc
union  cr_ivr
union  cr_tpr
union  cr_itv
union  cr_isr
union  cpuid3
struct  __r128

Defines

#define LOADED_PROG_STACK_PAGES_NO   2
#define CS_ENTER_BARRIER()   memory_barrier()
#define CS_LEAVE_BARRIER()   memory_barrier()
#define memory_barrier()   __asm__ volatile ("mf\n" ::: "memory")
#define read_barrier()   memory_barrier()
#define write_barrier()   memory_barrier()
#define srlz_i()   __asm__ volatile (";; srlz.i ;;\n" ::: "memory")
#define srlz_d()   __asm__ volatile (";; srlz.d\n" ::: "memory")
#define __native_le2host(n)   (n)
#define __u64_le2host(n)   (n)
#define SP_DELTA   (0+ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT))
#define context_set(c, _pc, stack, size)
#define FAMILY_ITANIUM   0x7
#define FAMILY_ITANIUM2   0x1f
#define IT_DELTA   100000
#define ELF_MACHINE   EM_IA_64
#define ELF_DATA_ENCODING   ELFDATA2LSB
#define ELF_CLASS   ELFCLASS64
#define FADDR(f)   (*((__address *)(f)));
#define ARCH_HAS_FPU   1
#define FPU_CONTEXT_ALIGN   16
#define FRS   96
#define memcpy(dst, src, cnt)   __builtin_memcpy((dst), (src), (cnt))
#define PAL_OK   0
#define PAL_UNIMPL   -1
#define PAL_INVARG   -2
#define PAL_ERR   -3
#define PAL_CACHE_FLUSH   1
#define PAL_CACHE_INFO   2
#define PAL_CACHE_INIT   3
#define PAL_CACHE_PROT_INFO   38
#define PAL_CACHE_SHARED_INFO   43
#define PAL_CACHE_SUMMARY   4
#define PAL_MEM_ATTRIB   5
#define PAL_PREFETCH_VISIBILITY   41
#define PAL_PTCE_INFO   6
#define PAL_VM_INFO   7
#define PAL_VM_PAGE_SIZE   34
#define PAL_VM_SUMMARY   8
#define PAL_VM_TR_READ   261
#define PAL_BUS_GET_FEATURES   9
#define PAL_BUS_SET_FEATURES   10
#define PAL_DEBUG_INFO   11
#define PAL_FIXED_ADDR   12
#define PAL_FREQ_BASE   13
#define PAL_FREQ_RATIOS   14
#define PAL_LOGICAL_TO_PHYSICAL   42
#define PAL_PERF_MON_INFO   15
#define PAL_PLATFORM_ADDR   16
#define PAL_PROC_GET_FEATURES   17
#define PAL_PROC_SET_FEATURES   18
#define PAL_REGISTER_INFO   39
#define PAL_RSE_INFO   19
#define PAL_VERSION   20
#define PAL_MC_CLEAR_LOG   21
#define PAL_MC_DRAIN   22
#define PAL_MC_DYNAMIC_STATE   24
#define PAL_MC_ERROR_INFO   25
#define PAL_MC_EXPECTED   23
#define PAL_MC_REGISTER_MEM   27
#define PAL_MC_RESUME   26
#define PAL_HALT   28
#define PAL_HALT_INFO   257
#define PAL_HALT_LIGHT   29
#define PAL_CACHE_LINE_INIT   31
#define PAL_CACHE_READ   259
#define PAL_CACHE_WRITE   260
#define PAL_TEST_INFO   37
#define PAL_TEST_PROC   258
#define PAL_COPY_INFO   30
#define PAL_COPY_PAL   256
#define PAL_ENTER_IA_32_ENV   33
#define PAL_PMI_ENTRYPOINT   32
#define PAL_PTCE_INFO_BASE()   (0x100000000LL)
#define PAL_PTCE_INFO_COUNT1()   (2)
#define PAL_PTCE_INFO_COUNT2()   (3)
#define PAL_PTCE_INFO_STRIDE1()   (0x10000000)
#define PAL_PTCE_INFO_STRIDE2()   (0x2000)
#define CR_IVR_MASK   0xf
#define PSR_IC_MASK   0x2000
#define PSR_I_MASK   0x4000
#define PSR_PK_MASK   0x8000
#define PSR_DT_MASK   (1<<17)
#define PSR_RT_MASK   (1<<27)
#define PSR_DFL_MASK   (1<<18)
#define PSR_DFH_MASK   (1<<19)
#define PSR_IT_MASK   0x0000001000000000
#define PSR_CPL_SHIFT   32
#define PSR_CPL_MASK_SHIFTED   3
#define PFM_MASK   (~0x3fffffffff)
#define RSC_MODE_MASK   3
#define RSC_PL_MASK   12
#define AR_KR0   0
#define AR_KR1   1
#define AR_KR2   2
#define AR_KR3   3
#define AR_KR4   4
#define AR_KR5   5
#define AR_KR6   6
#define AR_KR7   7
#define AR_RSC   16
#define AR_BSP   17
#define AR_BSPSTORE   18
#define AR_RNAT   19
#define AR_FCR   21
#define AR_EFLAG   24
#define AR_CSD   25
#define AR_SSD   26
#define AR_CFLG   27
#define AR_FSR   28
#define AR_FIR   29
#define AR_FDR   30
#define AR_CCV   32
#define AR_UNAT   36
#define AR_FPSR   40
#define AR_ITC   44
#define AR_PFS   64
#define AR_LC   65
#define AR_EC   66
#define CR_DCR   0
#define CR_ITM   1
#define CR_IVA   2
#define CR_PTA   8
#define CR_IPSR   16
#define CR_ISR   17
#define CR_IIP   19
#define CR_IFA   20
#define CR_ITIR   21
#define CR_IIPA   22
#define CR_IFS   23
#define CR_IIM   24
#define CR_IHA   25
#define CR_LID   64
#define CR_IVR   65
#define CR_TPR   66
#define CR_EOI   67
#define CR_IRR0   68
#define CR_IRR1   69
#define CR_IRR2   70
#define CR_IRR3   71
#define CR_ITV   72
#define CR_PMV   73
#define CR_CMCV   74
#define CR_LRR0   80
#define CR_LRR1   81
#define SKI_INIT_CONSOLE   20
#define SKI_GETCHAR   21
#define SKI_PUTCHAR   31
#define STACK_ITEM_SIZE   8
#define STACK_ALIGNMENT   16
#define STACK_SCRATCH_AREA_SIZE   16
#define REGISTER_STACK_ALIGNMENT   8
#define NULL   0
#define IT_SERVICE_CLOCKS   64

Typedefs

typedef psr psr_t
typedef rsc rsc_t
typedef cr_ivr cr_ivr_t
typedef cr_tpr cr_tpr_t
typedef cr_itv cr_itv_t
typedef cr_isr cr_isr_t
typedef cpuid3 cpuid3_t
typedef signed char __s8
typedef signed short int __s16
typedef signed int __s32
typedef signed long __s64
typedef unsigned char __u8
typedef unsigned short __u16
typedef unsigned int __u32
typedef unsigned long __u64
typedef unsigned char __r8
typedef unsigned short __r16
typedef unsigned int __r32
typedef unsigned long __r64
typedef __u64 __address
typedef __u64 pfn_t
typedef __u64 ipl_t
typedef __u64 __native
typedef __s64 __snative
typedef pte pte_t

Functions

static __address get_stack_base (void)
static __u64 psr_read (void)
static __u64 iva_read (void)
static void iva_write (__u64 v)
static __u64 ivr_read (void)
static void itc_write (__u64 v)
static __u64 itc_read (void)
static void itm_write (__u64 v)
static __u64 itm_read (void)
static __u64 itv_read (void)
static void itv_write (__u64 v)
static void eoi_write (__u64 v)
static __u64 tpr_read (void)
static void tpr_write (__u64 v)
static ipl_t interrupts_disable (void)
static ipl_t interrupts_enable (void)
static void interrupts_restore (ipl_t ipl)
static ipl_t interrupts_read (void)
static void pk_disable (void)
void cpu_halt (void)
void cpu_sleep (void)
void asm_delay_loop (__u32 t)
void switch_to_userspace (__address entry, __address sp, __address bsp, __address uspace_uarg, __u64 ipsr, __u64 rsc)
static long atomic_add (atomic_t *val, int imm)
static void atomic_inc (atomic_t *val)
static void atomic_dec (atomic_t *val)
static long atomic_preinc (atomic_t *val)
static long atomic_predec (atomic_t *val)
static long atomic_postinc (atomic_t *val)
static long atomic_postdec (atomic_t *val)
static __u64 cpuid_read (int n)
void it_init (void)
void it_interrupt (void)
void memsetw (__address dst, size_t cnt, __u16 x)
void memsetb (__address dst, size_t cnt, __u8 x)
int memcmp (__address src, __address dst, int cnt)
void ski_init_console (void)
void ski_set_console_sysinfo (void)
void poll_keyboard (void)
void cpu_arch_init (void)
void cpu_identify (void)
void cpu_print_report (cpu_t *m)
void fpu_context_save (fpu_context_t *fctx)
void fpu_context_restore (fpu_context_t *fctx)
void fpu_enable (void)
void fpu_disable (void)
void fpu_init (void)
void arch_pre_main (void)
void arch_pre_mm_init (void)
void arch_post_mm_init (void)
void arch_pre_smp_init (void)
void arch_post_smp_init (void)
void userspace (uspace_arg_t *kernel_uarg)
__native sys_tls_set (__native addr)
void arch_grab_console (void)
void arch_release_console (void)
void putchar (const char ch)
static void ski_putchar (chardev_t *d, const char ch)
static __s32 ski_getchar (void)
static char ski_getchar_blocking (chardev_t *d)
static void ski_kb_enable (chardev_t *d)
static void ski_kb_disable (chardev_t *d)

Variables

chardev_t ski_uconsole
int kbd_uspace
static int kbd_release = 0
chardev_t ski_console
chardev_t ski_uconsole
static bool kb_disable
int kbd_uspace = 0
static chardev_operations_t ski_ops

Define Documentation

#define __native_le2host  )     (n)
 

Definition at line 39 of file byteorder.h.

#define __u64_le2host  )     (n)
 

Definition at line 40 of file byteorder.h.

Referenced by get_symbol_addr(), get_symtab_entry(), and symtab_print_search().

#define AR_BSP   17
 

Definition at line 70 of file register.h.

#define AR_BSPSTORE   18
 

Definition at line 71 of file register.h.

#define AR_CCV   32
 

Definition at line 84 of file register.h.

#define AR_CFLG   27
 

Definition at line 79 of file register.h.

#define AR_CSD   25
 

Definition at line 77 of file register.h.

#define AR_EC   66
 

Definition at line 95 of file register.h.

#define AR_EFLAG   24
 

Definition at line 76 of file register.h.

#define AR_FCR   21
 

Definition at line 74 of file register.h.

#define AR_FDR   30
 

Definition at line 82 of file register.h.

#define AR_FIR   29
 

Definition at line 81 of file register.h.

#define AR_FPSR   40
 

Definition at line 88 of file register.h.

#define AR_FSR   28
 

Definition at line 80 of file register.h.

#define AR_ITC   44
 

Definition at line 90 of file register.h.

#define AR_KR0   0
 

Application registers.

Definition at line 60 of file register.h.

#define AR_KR1   1
 

Definition at line 61 of file register.h.

#define AR_KR2   2
 

Definition at line 62 of file register.h.

#define AR_KR3   3
 

Definition at line 63 of file register.h.

#define AR_KR4   4
 

Definition at line 64 of file register.h.

#define AR_KR5   5
 

Definition at line 65 of file register.h.

#define AR_KR6   6
 

Definition at line 66 of file register.h.

#define AR_KR7   7
 

Definition at line 67 of file register.h.

#define AR_LC   65
 

Definition at line 94 of file register.h.

#define AR_PFS   64
 

Definition at line 93 of file register.h.

#define AR_RNAT   19
 

Definition at line 72 of file register.h.

#define AR_RSC   16
 

Definition at line 69 of file register.h.

#define AR_SSD   26
 

Definition at line 78 of file register.h.

#define AR_UNAT   36
 

Definition at line 86 of file register.h.

#define ARCH_HAS_FPU   1
 

Definition at line 38 of file fpu_context.h.

#define context_set c,
_pc,
stack,
size   ) 
 

Value:

do {                                                                                            \
                (c)->pc = (__address) _pc;                                                              \
                (c)->bsp = ((__address) stack) + ALIGN_UP((size), REGISTER_STACK_ALIGNMENT);            \
                (c)->ar_pfs &= PFM_MASK;                                                                \
                (c)->sp = ((__address) stack) + ALIGN_UP((size), STACK_ALIGNMENT) - SP_DELTA;           \
        } while (0);

Definition at line 57 of file context.h.

#define CR_CMCV   74
 

Definition at line 127 of file register.h.

#define CR_DCR   0
 

Control registers.

Definition at line 100 of file register.h.

#define CR_EOI   67
 

Definition at line 120 of file register.h.

#define CR_IFA   20
 

Definition at line 110 of file register.h.

#define CR_IFS   23
 

Definition at line 113 of file register.h.

#define CR_IHA   25
 

Definition at line 115 of file register.h.

#define CR_IIM   24
 

Definition at line 114 of file register.h.

#define CR_IIP   19
 

Definition at line 109 of file register.h.

#define CR_IIPA   22
 

Definition at line 112 of file register.h.

#define CR_IPSR   16
 

Definition at line 106 of file register.h.

#define CR_IRR0   68
 

Definition at line 121 of file register.h.

#define CR_IRR1   69
 

Definition at line 122 of file register.h.

#define CR_IRR2   70
 

Definition at line 123 of file register.h.

#define CR_IRR3   71
 

Definition at line 124 of file register.h.

#define CR_ISR   17
 

Definition at line 107 of file register.h.

#define CR_ITIR   21
 

Definition at line 111 of file register.h.

#define CR_ITM   1
 

Definition at line 101 of file register.h.

#define CR_ITV   72
 

Definition at line 125 of file register.h.

#define CR_IVA   2
 

Definition at line 102 of file register.h.

#define CR_IVR   65
 

Definition at line 118 of file register.h.

#define CR_IVR_MASK   0xf
 

Definition at line 38 of file register.h.

#define CR_LID   64
 

Definition at line 117 of file register.h.

#define CR_LRR0   80
 

Definition at line 129 of file register.h.

#define CR_LRR1   81
 

Definition at line 130 of file register.h.

#define CR_PMV   73
 

Definition at line 126 of file register.h.

#define CR_PTA   8
 

Definition at line 104 of file register.h.

#define CR_TPR   66
 

Definition at line 119 of file register.h.

 
#define CS_ENTER_BARRIER  )     memory_barrier()
 

Definition at line 41 of file barrier.h.

Referenced by spinlock_trylock().

 
#define CS_LEAVE_BARRIER  )     memory_barrier()
 

Definition at line 42 of file barrier.h.

Referenced by spinlock_unlock().

#define ELF_CLASS   ELFCLASS64
 

Definition at line 40 of file elf.h.

Referenced by elf_load().

#define ELF_DATA_ENCODING   ELFDATA2LSB
 

Definition at line 39 of file elf.h.

Referenced by elf_load().

#define ELF_MACHINE   EM_IA_64
 

Definition at line 38 of file elf.h.

Referenced by elf_load().

#define FADDR f   )     (*((__address *)(f)));
 

Calculate absolute address of function referenced by fptr pointer.

Parameters:
f Function pointer.

Definition at line 48 of file faddr.h.

Referenced by main_ap(), scheduler(), and thread_create().

#define FAMILY_ITANIUM   0x7
 

Definition at line 42 of file cpu.h.

Referenced by cpu_print_report().

#define FAMILY_ITANIUM2   0x1f
 

Definition at line 43 of file cpu.h.

Referenced by cpu_print_report().

#define FPU_CONTEXT_ALIGN   16
 

Definition at line 39 of file fpu_context.h.

Referenced by thread_init().

#define FRS   96
 

Definition at line 43 of file fpu_context.h.

#define IT_DELTA   100000
 

Definition at line 44 of file it.h.

Referenced by it_init(), and it_interrupt().

#define IT_SERVICE_CLOCKS   64
 

Interval Timer driver.

Definition at line 47 of file it.c.

Referenced by it_interrupt().

#define LOADED_PROG_STACK_PAGES_NO   2
 

Definition at line 38 of file arch.h.

#define memcpy dst,
src,
cnt   )     __builtin_memcpy((dst), (src), (cnt))
 

Definition at line 38 of file memstr.h.

Referenced by _bubblesort(), _qsort(), sys_ipc_answer(), sys_ipc_answer_fast(), thread_create(), and vsnprintf_write().

 
#define memory_barrier  )     __asm__ volatile ("mf\n" ::: "memory")
 

Definition at line 44 of file barrier.h.

Referenced by preemption_disable(), and preemption_enable().

#define NULL   0
 

Definition at line 38 of file types.h.

Referenced by _btree_insert(), _btree_remove(), _rwlock_read_lock_timeout(), _slab_reclaim(), _waitq_wakeup_unsafe(), anon_share(), as_area_create(), btree_init(), btree_insert(), btree_leaf_node_left_neighbour(), btree_leaf_node_right_neighbour(), btree_search(), buddy_system_alloc(), check_area_conflicts(), clock_counter_init(), cmdtab_compl(), code_from_uspace(), elf_share(), find_best_thread(), find_free_zone_lock(), find_zone_and_lock(), frame_alloc_generic(), frame_free(), frame_reference_add(), futex_find(), get_call(), get_full_current_mag(), get_mag_from_cache(), get_symbol_addr(), ht_create(), ht_mapping_find(), ht_mapping_insert(), ipc_init(), ipc_irq_cleanup(), ipc_irq_make_table(), ipc_irq_register(), ipc_irq_unregister(), ipc_phone_init(), ipc_wait_for_call(), kcpulb(), kinit(), klog_init(), ktaskclnp(), ktaskgc(), let_others_in(), link_initialize(), magazine_destroy(), magazine_obj_get(), main_bsp_separated_stack(), make_empty_current_mag(), node_initialize(), parse_argument(), parse_cmdline(), poll_keyboard(), print_string(), printf_putstr(), rotate_from_left(), rotate_from_right(), scheduler(), scheduler_separated_stack(), ski_set_console_sysinfo(), slab_alloc(), slab_cache_init(), slab_free(), slab_obj_create(), slab_space_alloc(), sys_as_area_create(), sys_ipc_answer(), sys_ipc_answer_fast(), sys_sysinfo_valid(), sys_sysinfo_value(), sysinfo_create_path(), sysinfo_dump(), sysinfo_find_item(), sysinfo_get_val(), sysinfo_set_item_function(), sysinfo_set_item_undefined(), sysinfo_set_item_val(), task_create(), task_destroy(), task_init(), task_kill(), task_run_program(), the_initialize(), thr_constructor(), thread_create(), thread_destroy(), thread_exists(), thread_init(), timeout_register(), timeout_reinitialize(), uinit(), vprintf(), waitq_interrupt_sleep(), waitq_timeouted_sleep(), zone_buddy_find_block(), zone_buddy_find_buddy(), zone_print_list(), and zone_print_one().

#define PAL_BUS_GET_FEATURES   9
 

Definition at line 59 of file pal.h.

#define PAL_BUS_SET_FEATURES   10
 

Definition at line 60 of file pal.h.

#define PAL_CACHE_FLUSH   1
 

These are the indices for PAL_PROC.

Definition at line 44 of file pal.h.

#define PAL_CACHE_INFO   2
 

Definition at line 45 of file pal.h.

#define PAL_CACHE_INIT   3
 

Definition at line 46 of file pal.h.

#define PAL_CACHE_LINE_INIT   31
 

Definition at line 86 of file pal.h.

#define PAL_CACHE_PROT_INFO   38
 

Definition at line 47 of file pal.h.

#define PAL_CACHE_READ   259
 

Definition at line 87 of file pal.h.

#define PAL_CACHE_SHARED_INFO   43
 

Definition at line 48 of file pal.h.

#define PAL_CACHE_SUMMARY   4
 

Definition at line 49 of file pal.h.

#define PAL_CACHE_WRITE   260
 

Definition at line 88 of file pal.h.

#define PAL_COPY_INFO   30
 

Definition at line 92 of file pal.h.

#define PAL_COPY_PAL   256
 

Definition at line 93 of file pal.h.

#define PAL_DEBUG_INFO   11
 

Definition at line 61 of file pal.h.

#define PAL_ENTER_IA_32_ENV   33
 

Definition at line 94 of file pal.h.

#define PAL_ERR   -3
 

Can not compete call without error.

Definition at line 41 of file pal.h.

#define PAL_FIXED_ADDR   12
 

Definition at line 62 of file pal.h.

#define PAL_FREQ_BASE   13
 

Definition at line 63 of file pal.h.

#define PAL_FREQ_RATIOS   14
 

Definition at line 64 of file pal.h.

#define PAL_HALT   28
 

Definition at line 82 of file pal.h.

#define PAL_HALT_INFO   257
 

Definition at line 83 of file pal.h.

#define PAL_HALT_LIGHT   29
 

Definition at line 84 of file pal.h.

#define PAL_INVARG   -2
 

Invalid argument.

Definition at line 40 of file pal.h.

#define PAL_LOGICAL_TO_PHYSICAL   42
 

Definition at line 65 of file pal.h.

#define PAL_MC_CLEAR_LOG   21
 

Definition at line 74 of file pal.h.

#define PAL_MC_DRAIN   22
 

Definition at line 75 of file pal.h.

#define PAL_MC_DYNAMIC_STATE   24
 

Definition at line 76 of file pal.h.

#define PAL_MC_ERROR_INFO   25
 

Definition at line 77 of file pal.h.

#define PAL_MC_EXPECTED   23
 

Definition at line 78 of file pal.h.

#define PAL_MC_REGISTER_MEM   27
 

Definition at line 79 of file pal.h.

#define PAL_MC_RESUME   26
 

Definition at line 80 of file pal.h.

#define PAL_MEM_ATTRIB   5
 

Definition at line 51 of file pal.h.

#define PAL_OK   0
 

Call completed without error.

Definition at line 38 of file pal.h.

#define PAL_PERF_MON_INFO   15
 

Definition at line 66 of file pal.h.

#define PAL_PLATFORM_ADDR   16
 

Definition at line 67 of file pal.h.

#define PAL_PMI_ENTRYPOINT   32
 

Definition at line 95 of file pal.h.

#define PAL_PREFETCH_VISIBILITY   41
 

Definition at line 52 of file pal.h.

#define PAL_PROC_GET_FEATURES   17
 

Definition at line 68 of file pal.h.

#define PAL_PROC_SET_FEATURES   18
 

Definition at line 69 of file pal.h.

#define PAL_PTCE_INFO   6
 

Definition at line 53 of file pal.h.

 
#define PAL_PTCE_INFO_BASE  )     (0x100000000LL)
 

Definition at line 100 of file pal.h.

Referenced by tlb_invalidate_all().

 
#define PAL_PTCE_INFO_COUNT1  )     (2)
 

Definition at line 101 of file pal.h.

Referenced by tlb_invalidate_all().

 
#define PAL_PTCE_INFO_COUNT2  )     (3)
 

Definition at line 102 of file pal.h.

Referenced by tlb_invalidate_all().

 
#define PAL_PTCE_INFO_STRIDE1  )     (0x10000000)
 

Definition at line 103 of file pal.h.

Referenced by tlb_invalidate_all().

 
#define PAL_PTCE_INFO_STRIDE2  )     (0x2000)
 

Definition at line 104 of file pal.h.

Referenced by tlb_invalidate_all().

#define PAL_REGISTER_INFO   39
 

Definition at line 70 of file pal.h.

#define PAL_RSE_INFO   19
 

Definition at line 71 of file pal.h.

#define PAL_TEST_INFO   37
 

Definition at line 89 of file pal.h.

#define PAL_TEST_PROC   258
 

Definition at line 90 of file pal.h.

#define PAL_UNIMPL   -1
 

Unimplemented procedure.

Definition at line 39 of file pal.h.

#define PAL_VERSION   20
 

Definition at line 72 of file pal.h.

#define PAL_VM_INFO   7
 

Definition at line 54 of file pal.h.

#define PAL_VM_PAGE_SIZE   34
 

Definition at line 55 of file pal.h.

#define PAL_VM_SUMMARY   8
 

Definition at line 56 of file pal.h.

#define PAL_VM_TR_READ   261
 

Definition at line 57 of file pal.h.

#define PFM_MASK   (~0x3fffffffff)
 

Definition at line 54 of file register.h.

#define PSR_CPL_MASK_SHIFTED   3
 

Definition at line 52 of file register.h.

#define PSR_CPL_SHIFT   32
 

Definition at line 51 of file register.h.

#define PSR_DFH_MASK   (1<<19)
 

Definition at line 47 of file register.h.

Referenced by fpu_disable(), and fpu_enable().

#define PSR_DFL_MASK   (1<<18)
 

Definition at line 46 of file register.h.

#define PSR_DT_MASK   (1<<17)
 

Definition at line 43 of file register.h.

#define PSR_I_MASK   0x4000
 

Definition at line 40 of file register.h.

Referenced by interrupts_disable(), interrupts_enable(), and interrupts_restore().

#define PSR_IC_MASK   0x2000
 

Definition at line 39 of file register.h.

Referenced by tc_mapping_insert(), and tr_mapping_insert().

#define PSR_IT_MASK   0x0000001000000000
 

Definition at line 49 of file register.h.

#define PSR_PK_MASK   0x8000
 

Definition at line 41 of file register.h.

Referenced by pk_disable().

#define PSR_RT_MASK   (1<<27)
 

Definition at line 44 of file register.h.

 
#define read_barrier  )     memory_barrier()
 

Definition at line 45 of file barrier.h.

#define REGISTER_STACK_ALIGNMENT   8
 

Definition at line 41 of file stack.h.

#define RSC_MODE_MASK   3
 

Definition at line 56 of file register.h.

#define RSC_PL_MASK   12
 

Definition at line 57 of file register.h.

#define SKI_GETCHAR   21
 

Definition at line 42 of file ski.h.

Referenced by ski_getchar().

#define SKI_INIT_CONSOLE   20
 

Definition at line 41 of file ski.h.

Referenced by ski_init_console().

#define SKI_PUTCHAR   31
 

Definition at line 43 of file ski.h.

Referenced by ski_putchar().

#define SP_DELTA   (0+ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT))
 

Definition at line 50 of file context.h.

Referenced by before_thread_runs_arch().

 
#define srlz_d  )     __asm__ volatile (";; srlz.d\n" ::: "memory")
 

Definition at line 49 of file barrier.h.

Referenced by arch_pre_mm_init(), external_interrupt(), it_init(), it_interrupt(), set_environment(), tc_mapping_insert(), tlb_invalidate_pages(), tr_mapping_insert(), vhpt_compare(), vhpt_hash(), vhpt_mapping_insert(), and vhpt_set_record().

 
#define srlz_i  )     __asm__ volatile (";; srlz.i ;;\n" ::: "memory")
 

Definition at line 48 of file barrier.h.

Referenced by set_environment(), tc_mapping_insert(), tlb_invalidate_pages(), tr_mapping_insert(), vhpt_compare(), vhpt_hash(), vhpt_mapping_insert(), and vhpt_set_record().

#define STACK_ALIGNMENT   16
 

Definition at line 39 of file stack.h.

Referenced by userspace().

#define STACK_ITEM_SIZE   8
 

Definition at line 38 of file stack.h.

Referenced by userspace().

#define STACK_SCRATCH_AREA_SIZE   16
 

Definition at line 40 of file stack.h.

 
#define write_barrier  )     memory_barrier()
 

Definition at line 46 of file barrier.h.

Referenced by clock_update_counters().


Typedef Documentation

typedef __u64 __address
 

Definition at line 58 of file types.h.

typedef __u64 __native
 

Definition at line 63 of file types.h.

typedef unsigned short __r16
 

Definition at line 52 of file types.h.

typedef unsigned int __r32
 

Definition at line 53 of file types.h.

typedef unsigned long __r64
 

Definition at line 54 of file types.h.

typedef unsigned char __r8
 

Definition at line 51 of file types.h.

typedef signed short int __s16
 

Definition at line 41 of file types.h.

typedef signed int __s32
 

Definition at line 42 of file types.h.

typedef signed long __s64
 

Definition at line 43 of file types.h.

typedef signed char __s8
 

Definition at line 40 of file types.h.

typedef __s64 __snative
 

Definition at line 64 of file types.h.

typedef unsigned short __u16
 

Definition at line 46 of file types.h.

typedef unsigned int __u32
 

Definition at line 47 of file types.h.

typedef unsigned long __u64
 

Definition at line 48 of file types.h.

typedef unsigned char __u8
 

Definition at line 45 of file types.h.

typedef union cpuid3 cpuid3_t
 

Definition at line 271 of file register.h.

typedef union cr_isr cr_isr_t
 

Definition at line 257 of file register.h.

typedef union cr_itv cr_itv_t
 

Definition at line 226 of file register.h.

typedef union cr_ivr cr_ivr_t
 

Definition at line 199 of file register.h.

typedef union cr_tpr cr_tpr_t
 

Definition at line 212 of file register.h.

typedef __u64 ipl_t
 

Definition at line 61 of file types.h.

typedef __u64 pfn_t
 

Definition at line 59 of file types.h.

typedef union psr psr_t
 

Definition at line 178 of file register.h.

typedef struct pte pte_t
 

Definition at line 66 of file types.h.

typedef union rsc rsc_t
 

Definition at line 191 of file register.h.


Function Documentation

void arch_grab_console void   ) 
 

Acquire console back for kernel

Definition at line 142 of file ia64.c.

References kbd_release, and kbd_uspace.

Referenced by sys_debug_enable_console().

void arch_post_mm_init void   ) 
 

Definition at line 87 of file ia64.c.

References ski_set_console_sysinfo().

Referenced by main_ap(), and main_bsp_separated_stack().

Here is the call graph for this function:

void arch_post_smp_init void   ) 
 

Definition at line 96 of file ia64.c.

void arch_pre_main void   ) 
 

Definition at line 55 of file ia64.c.

References init_task_t::addr, init_t::cnt, init, init_task_t::size, and init_t::tasks.

void arch_pre_mm_init void   ) 
 

Definition at line 77 of file ia64.c.

References it_init(), iva_write(), ivt, ski_init_console(), and srlz_d.

Referenced by main_ap(), and main_bsp_separated_stack().

Here is the call graph for this function:

void arch_pre_smp_init void   ) 
 

Definition at line 92 of file ia64.c.

Referenced by main_bsp_separated_stack().

void arch_release_console void   ) 
 

Return console to userspace

Definition at line 150 of file ia64.c.

References kbd_release, and kbd_uspace.

Referenced by cmd_continue().

void asm_delay_loop __u32  t  ) 
 

Referenced by delay().

static long atomic_add atomic_t val,
int  imm
[static]
 

Atomic addition.

Parameters:
val Atomic value.
imm Value to add.
Returns:
Value before addition.

Definition at line 45 of file atomic.h.

References atomic::count.

Referenced by atomic_dec(), atomic_inc(), atomic_postdec(), atomic_postinc(), atomic_predec(), and atomic_preinc().

static void atomic_dec atomic_t val  )  [static]
 

Definition at line 55 of file atomic.h.

References atomic_add().

Referenced by _slab_free(), check_call_limit(), get_mag_from_cache(), ipc_wait_for_call(), kcpulb(), magazine_destroy(), magazine_obj_get(), slab_space_free(), and sys_ipc_wait_for_call().

Here is the call graph for this function:

static void atomic_inc atomic_t val  )  [static]
 

Definition at line 54 of file atomic.h.

References atomic_add().

Referenced by _ipc_call(), ipc_backsend_err(), magazine_obj_put(), put_mag_to_cache(), slab_alloc(), slab_space_alloc(), and thread_ready().

Here is the call graph for this function:

static long atomic_postdec atomic_t val  )  [static]
 

Definition at line 61 of file atomic.h.

References atomic_add().

Here is the call graph for this function:

static long atomic_postinc atomic_t val  )  [static]
 

Definition at line 60 of file atomic.h.

References atomic_add().

Here is the call graph for this function:

static long atomic_predec atomic_t val  )  [static]
 

Definition at line 58 of file atomic.h.

References atomic_add().

Here is the call graph for this function:

static long atomic_preinc atomic_t val  )  [static]
 

Definition at line 57 of file atomic.h.

References atomic_add().

Referenced by check_call_limit(), ipc_irq_send_msg(), and ipc_irq_send_notif().

Here is the call graph for this function:

void cpu_arch_init void   ) 
 

Definition at line 40 of file cpu.c.

void cpu_halt void   ) 
 

Referenced by _getc(), and halt().

void cpu_identify void   ) 
 

Definition at line 44 of file cpu.c.

References CPU, and cpuid_read().

Here is the call graph for this function:

void cpu_print_report cpu_t m  ) 
 

Definition at line 51 of file cpu.c.

References cpu::arch, CPU, cpu_arch::cpuid3, cpuid3::family, FAMILY_ITANIUM, FAMILY_ITANIUM2, and printf().

Referenced by cpu_list().

Here is the call graph for this function:

void cpu_sleep void   ) 
 

Referenced by find_best_thread().

static __u64 cpuid_read int  n  )  [static]
 

Read CPUID register.

Parameters:
n CPUID register number.
Returns:
Value of CPUID[n] register.

Definition at line 57 of file cpu.h.

Referenced by cpu_identify().

static void eoi_write __u64  v  )  [static]
 

Write EOI (End Of Interrupt) register.

Parameters:
v This value is ignored.

Definition at line 176 of file asm.h.

Referenced by it_interrupt().

void fpu_context_restore fpu_context_t fctx  ) 
 

Definition at line 163 of file fpu_context.c.

References fpu_context::fr.

Referenced by before_thread_runs().

void fpu_context_save fpu_context_t fctx  ) 
 

Definition at line 41 of file fpu_context.c.

References fpu_context::fr.

Referenced by scheduler().

void fpu_disable void   ) 
 

Definition at line 304 of file fpu_context.c.

References PSR_DFH_MASK.

Referenced by before_thread_runs().

void fpu_enable void   ) 
 

Definition at line 283 of file fpu_context.c.

References PSR_DFH_MASK.

void fpu_init void   ) 
 

Definition at line 326 of file fpu_context.c.

Referenced by before_thread_runs().

static __address get_stack_base void   )  [static]
 

Return base address of current stack

Return the base address of the current stack. The stack is assumed to be STACK_SIZE long. The stack must start on page boundary.

Definition at line 48 of file asm.h.

References STACK_SIZE.

static ipl_t interrupts_disable void   )  [static]
 

Disable interrupts.

Disable interrupts and return previous value of PSR.

Returns:
Old interrupt priority level.

Definition at line 210 of file asm.h.

References PSR_I_MASK.

static ipl_t interrupts_enable void   )  [static]
 

Enable interrupts.

Enable interrupts and return previous value of PSR.

Returns:
Old interrupt priority level.

Definition at line 231 of file asm.h.

References PSR_I_MASK.

static ipl_t interrupts_read void   )  [static]
 

Return interrupt priority level.

Returns:
PSR.

Definition at line 265 of file asm.h.

References psr_read().

Here is the call graph for this function:

static void interrupts_restore ipl_t  ipl  )  [static]
 

Restore interrupt priority level.

Restore PSR.

Parameters:
ipl Saved interrupt priority level.

Definition at line 253 of file asm.h.

References interrupts_disable(), interrupts_enable(), and PSR_I_MASK.

Here is the call graph for this function:

void it_init void   ) 
 

Initialize Interval Timer.

Definition at line 50 of file it.c.

References INTERRUPT_TIMER, IT_DELTA, itc_write(), itm_write(), itv_read(), itv_write(), cr_itv::m, srlz_d, cr_itv::value, and cr_itv::vector.

Referenced by arch_pre_mm_init().

Here is the call graph for this function:

void it_interrupt void   ) 
 

Process Interval Timer interrupt.

Definition at line 72 of file it.c.

References clock(), CPU, EOI, eoi_write(), IT_DELTA, IT_SERVICE_CLOCKS, itc_read(), itm_read(), itm_write(), poll_keyboard(), and srlz_d.

Referenced by external_interrupt().

Here is the call graph for this function:

static __u64 itc_read void   )  [static]
 

Read ITC (Interval Timer Counter) register.

Returns:
Current counter value.

Definition at line 119 of file asm.h.

Referenced by it_interrupt().

static void itc_write __u64  v  )  [static]
 

Write ITC (Interval Timer Counter) register.

Parameters:
v New counter value.

Definition at line 110 of file asm.h.

Referenced by it_init().

static __u64 itm_read void   )  [static]
 

Read ITM (Interval Timer Match) register.

Returns:
Match value.

Definition at line 141 of file asm.h.

Referenced by it_interrupt().

static void itm_write __u64  v  )  [static]
 

Write ITM (Interval Timer Match) register.

Parameters:
v New match value.

Definition at line 132 of file asm.h.

Referenced by it_init(), and it_interrupt().

static __u64 itv_read void   )  [static]
 

Read ITV (Interval Timer Vector) register.

Returns:
Current vector and mask bit.

Definition at line 154 of file asm.h.

Referenced by it_init().

static void itv_write __u64  v  )  [static]
 

Write ITV (Interval Timer Vector) register.

Parameters:
v New vector and mask bit.

Definition at line 167 of file asm.h.

Referenced by it_init().

static __u64 iva_read void   )  [static]
 

Read IVA (Interruption Vector Address).

Returns:
Return location of interruption vector table.

Definition at line 74 of file asm.h.

static void iva_write __u64  v  )  [static]
 

Write IVA (Interruption Vector Address) register.

Parameters:
v New location of interruption vector table.

Definition at line 87 of file asm.h.

Referenced by arch_pre_mm_init().

static __u64 ivr_read void   )  [static]
 

Read IVR (External Interrupt Vector Register).

Returns:
Highest priority, pending, unmasked external interrupt vector.

Definition at line 97 of file asm.h.

Referenced by external_interrupt().

int memcmp __address  src,
__address  dst,
int  cnt
 

void memsetb __address  dst,
size_t  cnt,
__u8  x
 

Referenced by _ipc_call_init(), _slab_cache_create(), anon_page_fault(), as_area_create(), cpu_init(), hash_table_create(), make_magcache(), thread_create(), and vhpt_invalidate_all().

void memsetw __address  dst,
size_t  cnt,
__u16  x
 

static void pk_disable void   )  [static]
 

Disable protection key checking.

Definition at line 271 of file asm.h.

References PSR_PK_MASK.

Referenced by page_arch_init().

void poll_keyboard void   ) 
 

Ask keyboard if a key was pressed.

Definition at line 114 of file ski.c.

References chardev_push_character(), IRQ_KBD, kb_disable, kbd_uspace, NULL, ski_console, ski_getchar(), ski_uconsole, and virtual_interrupt().

Referenced by it_interrupt().

Here is the call graph for this function:

static __u64 psr_read void   )  [static]
 

Return Processor State Register.

Returns:
PSR.

Definition at line 61 of file asm.h.

Referenced by interrupts_read(), and userspace().

void putchar const char  ch  ) 
 

Definition at line 38 of file putchar.c.

__s32 ski_getchar void   )  [static]
 

Ask debug console if a key was pressed.

Use SSC (Simulator System Call) to get character from debug console.

This call is non-blocking.

Returns:
ASCII code of pressed key or 0 if no key pressed.

Definition at line 81 of file ski.c.

References SKI_GETCHAR.

Referenced by poll_keyboard(), and ski_getchar_blocking().

static char ski_getchar_blocking chardev_t d  )  [static]
 

This is a blocking wrapper for ski_getchar(). To be used when the kernel crashes.

Definition at line 102 of file ski.c.

References ski_getchar().

Here is the call graph for this function:

void ski_init_console void   ) 
 

Initialize debug console

Issue SSC (Simulator System Call) to to open debug console.

Definition at line 175 of file ski.c.

References chardev_initialize(), ski_console, SKI_INIT_CONSOLE, ski_ops, ski_uconsole, stdin, and stdout.

Referenced by arch_pre_mm_init().

Here is the call graph for this function:

static void ski_kb_disable chardev_t d  )  [static]
 

Definition at line 156 of file ski.c.

References kb_disable.

static void ski_kb_enable chardev_t d  )  [static]
 

Definition at line 150 of file ski.c.

References kb_disable.

void ski_putchar chardev_t d,
const char  ch
[static]
 

Display character on debug console

Use SSC (Simulator System Call) to display character on debug console.

Parameters:
d Character device.
ch Character to be printed.

Definition at line 57 of file ski.c.

References SKI_PUTCHAR.

void ski_set_console_sysinfo void   ) 
 

Setup console sysinfo (i.e. Keyboard IRQ)

Because sysinfo neads memory allocation/dealocation this functions should be called separetely from init.

Definition at line 197 of file ski.c.

References IRQ_KBD, NULL, and sysinfo_set_item_val().

Referenced by arch_post_mm_init().

Here is the call graph for this function:

void switch_to_userspace __address  entry,
__address  sp,
__address  bsp,
__address  uspace_uarg,
__u64  ipsr,
__u64  rsc
 

Referenced by userspace().

__native sys_tls_set __native  addr  ) 
 

Set thread-local-storage pointer.

We use r13 (a.k.a. tp) for this purpose.

Definition at line 134 of file ia64.c.

static __u64 tpr_read void   )  [static]
 

Read TPR (Task Priority Register).

Returns:
Current value of TPR.

Definition at line 185 of file asm.h.

static void tpr_write __u64  v  )  [static]
 

Write TPR (Task Priority Register).

Parameters:
v New value of TPR.

Definition at line 198 of file asm.h.

void userspace uspace_arg_t kernel_uarg  ) 
 

Enter userspace and never return.

Definition at line 101 of file ia64.c.

References ALIGN_UP, rsc::be, psr::bn, psr::cpl, psr::i, psr::ic, rsc::loadrs, rsc::mode, PAGE_SIZE, rsc::pl, psr_read(), psr::ri, STACK_ALIGNMENT, STACK_ITEM_SIZE, switch_to_userspace(), uspace_arg::uspace_entry, uspace_arg::uspace_stack, uspace_arg::uspace_uarg, rsc::value, and psr::value.

Referenced by uinit().

Here is the call graph for this function:


Variable Documentation

bool kb_disable [static]
 

Definition at line 43 of file ski.c.

Referenced by poll_keyboard(), ski_kb_disable(), and ski_kb_enable().

int kbd_release = 0 [static]
 

Definition at line 53 of file ia64.c.

Referenced by arch_grab_console(), and arch_release_console().

int kbd_uspace = 0
 

Definition at line 44 of file ski.c.

Referenced by arch_grab_console(), arch_release_console(), irq_ipc_bind_arch(), poll_keyboard(), and virtual_interrupt().

int kbd_uspace
 

Definition at line 44 of file ski.c.

Referenced by arch_grab_console(), arch_release_console(), irq_ipc_bind_arch(), poll_keyboard(), and virtual_interrupt().

chardev_t ski_console
 

Definition at line 41 of file ski.c.

Referenced by poll_keyboard(), and ski_init_console().

chardev_operations_t ski_ops [static]
 

Initial value:

 {
        .resume = ski_kb_enable,
        .suspend = ski_kb_disable,
        .write = ski_putchar,
        .read = ski_getchar_blocking
}

Definition at line 162 of file ski.c.

Referenced by ski_init_console().

chardev_t ski_uconsole
 

Definition at line 42 of file ski.c.

Referenced by code_execute(), poll_keyboard(), and ski_init_console().

chardev_t ski_uconsole
 

Definition at line 42 of file ski.c.

Referenced by code_execute(), poll_keyboard(), and ski_init_console().


Generated on Sun Jun 18 17:01:24 2006 for HelenOS Kernel (ia64) by  doxygen 1.4.6