sparc64
[Miscellanea]


Files

file  arch.h
file  arg.h
file  asm.h
file  atomic.h
file  barrier.h
file  boot.h
file  byteorder.h
file  console.h
file  context.h
file  cpu.h
file  fb.h
file  i8042.h
file  tick.h
file  elf.h
file  faddr.h
file  fpu_context.h
file  memstr.h
file  register.h
file  stack.h
file  types.h
file  console.c
file  cpu.c
file  i8042.c
file  tick.c
file  sparc64.c

Data Structures

struct  context
struct  cpu_arch
struct  fpu_context
union  ver_reg
union  pstate_reg
union  tick_reg
union  tick_compare_reg
union  softint_reg

Defines

#define CS_ENTER_BARRIER()   __asm__ volatile ("" ::: "memory")
#define CS_LEAVE_BARRIER()   __asm__ volatile ("" ::: "memory")
#define memory_barrier()
#define read_barrier()
#define write_barrier()
#define VMA   0x400000
#define LMA   0x4000
#define SP_DELTA   STACK_WINDOW_SAVE_AREA_SIZE
#define context_set(c, _pc, stack, size)
#define MANUF_FUJITSU   0x04
#define MANUF_ULTRASPARC   0x17
#define MANUF_SUN   0x3e
#define IMPL_ULTRASPARCI   0x10
#define IMPL_ULTRASPARCII   0x11
#define IMPL_ULTRASPARCII_I   0x12
#define IMPL_ULTRASPARCII_E   0x13
#define IMPL_ULTRASPARCIII   0x15
#define IMPL_ULTRASPARCIV_PLUS   0x19
#define IMPL_SPARC64V   0x5
#define FB_PHYS_ADDRESS   0x1c901000000ULL
#define FB_X_RES   1152
#define FB_Y_RES   900
#define FB_COLOR_DEPTH   8
#define KBD_PHYS_ADDRESS   0x1fff8904000ULL
#define STATUS_REG   4
#define COMMAND_REG   4
#define DATA_REG   6
#define LAST_REG   DATA_REG
#define TICK_DELTA   500000
#define ELF_MACHINE   EM_SPARCV9
#define ELF_DATA_ENCODING   ELFDATA2MSB
#define ELF_CLASS   ELFCLASS64
#define FADDR(fptr)   ((__address) (fptr))
#define memcpy(dst, src, cnt)   __builtin_memcpy((dst), (src), (cnt))
#define STACK_ITEM_SIZE   8
#define STACK_ALIGNMENT   16
#define STACK_WINDOW_SAVE_AREA_SIZE   (16*STACK_ITEM_SIZE)
#define STACK_BIAS   2047
#define NULL   0
#define KEYBOARD_POLL_PAUSE   50000

Typedefs

typedef ver_reg ver_reg_t
typedef pstate_reg pstate_reg_t
typedef tick_reg tick_reg_t
typedef tick_compare_reg tick_compare_reg_t
typedef softint_reg softint_reg_t
typedef signed char __s8
typedef signed short __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 __u64 __address
typedef __u64 pfn_t
typedef __u64 ipl_t
typedef __u64 __native
typedef __s64 __snative
typedef pte pte_t
typedef __u8 asi_t

Functions

static __u64 pstate_read (void)
static void pstate_write (__u64 v)
static __u64 tick_compare_read (void)
static void tick_compare_write (__u64 v)
static __u64 tick_read (void)
static void tick_write (__u64 v)
static __u64 softint_read (void)
static void softint_write (__u64 v)
static void clear_softint_write (__u64 v)
static ipl_t interrupts_enable (void)
static ipl_t interrupts_disable (void)
static void interrupts_restore (ipl_t ipl)
static ipl_t interrupts_read (void)
static __address get_stack_base (void)
static __u64 ver_read (void)
static __u64 tba_read (void)
static __u64 tpc_read (void)
static __u64 tl_read (void)
static void tba_write (__u64 v)
static __u64 asi_u64_read (asi_t asi, __address va)
static void asi_u64_write (asi_t asi, __address va, __u64 v)
void cpu_halt (void)
void cpu_sleep (void)
void asm_delay_loop (__u32 t)
static long atomic_add (atomic_t *val, int i)
static long atomic_preinc (atomic_t *val)
static long atomic_postinc (atomic_t *val)
static long atomic_predec (atomic_t *val)
static long atomic_postdec (atomic_t *val)
static void atomic_inc (atomic_t *val)
static void atomic_dec (atomic_t *val)
static void flush (void)
static void membar (void)
static __u64 __u64_le2host (__u64 n)
static __native __native_le2host (__native n)
void kofwinput (void *arg)
void kkbdpoll (void *arg)
void ofw_sparc64_console_init (void)
void standalone_sparc64_console_init (void)
static void i8042_data_write (__u8 data)
static __u8 i8042_data_read (void)
static __u8 i8042_status_read (void)
static void i8042_command_write (__u8 command)
void kbd_init (void)
void tick_init (void)
void tick_interrupt (int n, istate_t *istate)
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)
static void ofw_sparc64_putchar (chardev_t *d, const char ch)
static char ofw_sparc64_getchar (chardev_t *d)
static void ofw_sparc64_suspend (chardev_t *d)
static void ofw_sparc64_resume (chardev_t *d)
void cpu_arch_init (void)
void cpu_identify (void)
void cpu_print_report (cpu_t *m)
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 calibrate_delay_loop (void)
void arch_grab_console (void)
void arch_release_console (void)

Variables

volatile __u8kbd_virt_address
mutex_t canwork
static volatile int ofw_console_active
static chardev_t ofw_sparc64_console
static chardev_operations_t ofw_sparc64_console_ops
volatile __u8kbd_virt_address = NULL

Define Documentation

#define COMMAND_REG   4
 

Definition at line 43 of file i8042.h.

Referenced by i8042_command_write().

#define context_set c,
_pc,
stack,
size   ) 
 

Value:

(c)->pc = ((__address) _pc) - 8;                                                                \
        (c)->sp = ((__address) stack) + ALIGN_UP((size), STACK_ALIGNMENT) - (STACK_BIAS + SP_DELTA);    \
        (c)->fp = -STACK_BIAS;                                                                          \
        (c)->cleanwin = 0

Definition at line 56 of file context.h.

 
#define CS_ENTER_BARRIER  )     __asm__ volatile ("" ::: "memory")
 

Definition at line 41 of file barrier.h.

Referenced by spinlock_trylock().

 
#define CS_LEAVE_BARRIER  )     __asm__ volatile ("" ::: "memory")
 

Definition at line 42 of file barrier.h.

Referenced by spinlock_unlock().

#define DATA_REG   6
 

Definition at line 44 of file i8042.h.

Referenced by i8042_data_read(), and i8042_data_write().

#define ELF_CLASS   ELFCLASS64
 

Definition at line 40 of file elf.h.

Referenced by elf_load().

#define ELF_DATA_ENCODING   ELFDATA2MSB
 

Definition at line 39 of file elf.h.

Referenced by elf_load().

#define ELF_MACHINE   EM_SPARCV9
 

Definition at line 38 of file elf.h.

Referenced by elf_load().

#define FADDR fptr   )     ((__address) (fptr))
 

Definition at line 40 of file faddr.h.

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

#define FB_COLOR_DEPTH   8
 

Definition at line 43 of file fb.h.

Referenced by standalone_sparc64_console_init().

#define FB_PHYS_ADDRESS   0x1c901000000ULL
 

Definition at line 38 of file fb.h.

Referenced by standalone_sparc64_console_init().

#define FB_X_RES   1152
 

Definition at line 40 of file fb.h.

Referenced by standalone_sparc64_console_init().

#define FB_Y_RES   900
 

Definition at line 41 of file fb.h.

Referenced by standalone_sparc64_console_init().

#define IMPL_SPARC64V   0x5
 

Definition at line 51 of file cpu.h.

Referenced by cpu_print_report().

#define IMPL_ULTRASPARCI   0x10
 

Definition at line 44 of file cpu.h.

Referenced by cpu_print_report().

#define IMPL_ULTRASPARCII   0x11
 

Definition at line 45 of file cpu.h.

Referenced by cpu_print_report().

#define IMPL_ULTRASPARCII_E   0x13
 

Definition at line 47 of file cpu.h.

Referenced by cpu_print_report().

#define IMPL_ULTRASPARCII_I   0x12
 

Definition at line 46 of file cpu.h.

Referenced by cpu_print_report().

#define IMPL_ULTRASPARCIII   0x15
 

Definition at line 48 of file cpu.h.

Referenced by cpu_print_report().

#define IMPL_ULTRASPARCIV_PLUS   0x19
 

Definition at line 49 of file cpu.h.

Referenced by cpu_print_report().

#define KBD_PHYS_ADDRESS   0x1fff8904000ULL
 

Definition at line 40 of file i8042.h.

Referenced by kbd_init().

#define KEYBOARD_POLL_PAUSE   50000
 

Definition at line 51 of file console.c.

Referenced by kkbdpoll(), and kofwinput().

#define LAST_REG   DATA_REG
 

Definition at line 46 of file i8042.h.

Referenced by kbd_init().

#define LMA   0x4000
 

Definition at line 39 of file boot.h.

#define MANUF_FUJITSU   0x04
 

Definition at line 40 of file cpu.h.

Referenced by cpu_print_report().

#define MANUF_SUN   0x3e
 

Definition at line 42 of file cpu.h.

Referenced by cpu_print_report().

#define MANUF_ULTRASPARC   0x17
 

UltraSPARC I, UltraSPARC II

Definition at line 41 of file cpu.h.

Referenced by cpu_print_report().

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

Definition at line 38 of file memstr.h.

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

 
#define memory_barrier  ) 
 

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(), arch_post_smp_init(), 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(), fb_init(), 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(), i8042_init(), 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(), kofwinput(), 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(), print_string(), printf_putstr(), rotate_from_left(), rotate_from_right(), scheduler(), scheduler_separated_stack(), slab_alloc(), slab_cache_init(), slab_free(), slab_obj_create(), slab_space_alloc(), standalone_sparc64_console_init(), 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 read_barrier  ) 
 

Definition at line 45 of file barrier.h.

#define SP_DELTA   STACK_WINDOW_SAVE_AREA_SIZE
 

Definition at line 50 of file context.h.

#define STACK_ALIGNMENT   16
 

According to SPARC Compliance Definition, every stack frame is 16-byte aligned.

Definition at line 41 of file stack.h.

#define STACK_BIAS   2047
 

By convention, the actual top of the stack is sp + STACK_BIAS.

Definition at line 51 of file stack.h.

#define STACK_ITEM_SIZE   8
 

Definition at line 38 of file stack.h.

#define STACK_WINDOW_SAVE_AREA_SIZE   (16*STACK_ITEM_SIZE)
 

16-extended-word save area for i[0-7] and l[0-7] registers.

Definition at line 46 of file stack.h.

#define STATUS_REG   4
 

Definition at line 42 of file i8042.h.

Referenced by i8042_status_read().

#define TICK_DELTA   500000
 

Definition at line 40 of file tick.h.

Referenced by tick_init().

#define VMA   0x400000
 

Definition at line 38 of file boot.h.

 
#define write_barrier  ) 
 

Definition at line 46 of file barrier.h.

Referenced by clock_update_counters().


Typedef Documentation

typedef __u64 __address
 

Definition at line 50 of file types.h.

typedef __u64 __native
 

Definition at line 55 of file types.h.

typedef signed short __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 56 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 __u8 asi_t
 

Definition at line 60 of file types.h.

typedef __u64 ipl_t
 

Definition at line 53 of file types.h.

typedef __u64 pfn_t
 

Definition at line 51 of file types.h.

typedef union pstate_reg pstate_reg_t
 

Definition at line 73 of file register.h.

typedef struct pte pte_t
 

Definition at line 58 of file types.h.

typedef union softint_reg softint_reg_t
 

Definition at line 105 of file register.h.

typedef union tick_compare_reg tick_compare_reg_t
 

Definition at line 93 of file register.h.

typedef union tick_reg tick_reg_t
 

Definition at line 83 of file register.h.

typedef union ver_reg ver_reg_t
 

Definition at line 53 of file register.h.


Function Documentation

static __native __native_le2host __native  n  )  [static]
 

Definition at line 46 of file byteorder.h.

References __u64_byteorder_swap().

Here is the call graph for this function:

static __u64 __u64_le2host __u64  n  )  [static]
 

Definition at line 41 of file byteorder.h.

References __u64_byteorder_swap().

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

Here is the call graph for this function:

void arch_grab_console void   ) 
 

Acquire console back for kernel

Definition at line 88 of file sparc64.c.

Referenced by sys_debug_enable_console().

void arch_post_mm_init void   ) 
 

Definition at line 51 of file sparc64.c.

References standalone_sparc64_console_init().

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 60 of file sparc64.c.

References kkbdpoll(), kofwinput(), NULL, panic, TASK, thread_create(), and thread_ready().

Here is the call graph for this function:

void arch_pre_mm_init void   ) 
 

Definition at line 43 of file sparc64.c.

References interrupts_disable(), ofw_sparc64_console_init(), tick_init(), and trap_init().

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 56 of file sparc64.c.

Referenced by main_bsp_separated_stack().

void arch_release_console void   ) 
 

Return console to userspace

Definition at line 94 of file sparc64.c.

Referenced by cmd_continue().

static __u64 asi_u64_read asi_t  asi,
__address  va
[static]
 

Load __u64 from alternate space.

Parameters:
asi ASI determining the alternate space.
va Virtual address within the ASI.
Returns:
Value read from the virtual address in the specified address space.

Definition at line 287 of file asm.h.

Referenced by dmmu_set(), dtlb_data_access_read(), dtlb_sfar_read(), dtlb_sfsr_read(), dtlb_tag_access_read(), dtlb_tag_read_read(), immu_set(), itlb_data_access_read(), itlb_sfsr_read(), itlb_tag_access_read(), itlb_tag_read_read(), mmu_primary_context_read(), and mmu_secondary_context_read().

static void asi_u64_write asi_t  asi,
__address  va,
__u64  v
[static]
 

Store __u64 to alternate space.

Parameters:
asi ASI determining the alternate space.
va Virtual address within the ASI.
v Value to be written.

Definition at line 302 of file asm.h.

Referenced by dmmu_set(), dtlb_data_access_write(), dtlb_data_in_write(), dtlb_demap(), dtlb_sfsr_write(), dtlb_tag_access_write(), immu_set(), itlb_data_access_write(), itlb_data_in_write(), itlb_demap(), itlb_sfsr_write(), itlb_tag_access_write(), mmu_primary_context_write(), and mmu_secondary_context_write().

void asm_delay_loop __u32  t  ) 
 

Referenced by delay().

static long atomic_add atomic_t val,
int  i
[static]
 

Atomic add operation.

Use atomic compare and swap operation to atomically add signed value.

Parameters:
val Atomic variable.
i Signed value to be added.
Returns:
Value of the atomic variable as it existed before addition.

Definition at line 50 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 95 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 90 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 85 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 75 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 80 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 70 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 calibrate_delay_loop void   ) 
 

Definition at line 81 of file sparc64.c.

Referenced by main_ap(), and main_bsp_separated_stack().

static void clear_softint_write __u64  v  )  [static]
 

Write CLEAR_SOFTINT Register.

Bits set in CLEAR_SOFTINT register will be cleared in SOFTINT register.

Parameters:
v New value of CLEAR_SOFTINT register.

Definition at line 137 of file asm.h.

Referenced by tick_interrupt().

void cpu_arch_init void   ) 
 

Definition at line 41 of file cpu.c.

void cpu_halt void   ) 
 

Referenced by _getc(), halt(), and ofw_done().

void cpu_identify void   ) 
 

Definition at line 45 of file cpu.c.

References CPU, and ver_read().

Here is the call graph for this function:

void cpu_print_report cpu_t m  ) 
 

Definition at line 50 of file cpu.c.

References CPU, IMPL_SPARC64V, IMPL_ULTRASPARCI, IMPL_ULTRASPARCII, IMPL_ULTRASPARCII_E, IMPL_ULTRASPARCII_I, IMPL_ULTRASPARCIII, IMPL_ULTRASPARCIV_PLUS, MANUF_FUJITSU, MANUF_SUN, MANUF_ULTRASPARC, and printf().

Referenced by cpu_list().

Here is the call graph for this function:

void cpu_sleep void   ) 
 

Referenced by find_best_thread().

static void flush void   )  [static]
 

Flush Instruction Memory instruction.

Definition at line 49 of file barrier.h.

Referenced by dtlb_data_access_write(), dtlb_data_in_write(), dtlb_demap(), dtlb_sfsr_write(), dtlb_tag_access_write(), itlb_data_access_write(), itlb_data_in_write(), itlb_demap(), itlb_sfsr_write(), itlb_tag_access_write(), mmu_primary_context_write(), and mmu_secondary_context_write().

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 bytes long. The stack must start on page boundary.

Definition at line 210 of file asm.h.

References STACK_SIZE.

static void i8042_command_write __u8  command  )  [static]
 

Definition at line 65 of file i8042.h.

References COMMAND_REG, and kbd_virt_address.

Referenced by i8042_grab().

static __u8 i8042_data_read void   )  [static]
 

Definition at line 55 of file i8042.h.

References DATA_REG, and kbd_virt_address.

Referenced by i8042_init(), i8042_interrupt(), i8042_poll(), and key_read().

static void i8042_data_write __u8  data  )  [static]
 

Definition at line 50 of file i8042.h.

References DATA_REG, and kbd_virt_address.

Referenced by i8042_grab().

static __u8 i8042_status_read void   )  [static]
 

Definition at line 60 of file i8042.h.

References kbd_virt_address, and STATUS_REG.

Referenced by i8042_init(), i8042_poll(), i8042_wait(), and key_read().

static ipl_t interrupts_disable void   )  [static]
 

Disable interrupts.

Disable interrupts and return previous value of IPL.

Returns:
Old interrupt priority level.

Definition at line 168 of file asm.h.

References pstate_reg::ie, pstate_read(), pstate_write(), and pstate_reg::value.

Here is the call graph for this function:

static ipl_t interrupts_enable void   )  [static]
 

Enable interrupts.

Enable interrupts and return previous value of IPL.

Returns:
Old interrupt priority level.

Definition at line 149 of file asm.h.

References pstate_reg::ie, pstate_read(), pstate_write(), and pstate_reg::value.

Here is the call graph for this function:

static ipl_t interrupts_read void   )  [static]
 

Return interrupt priority level.

Return IPL.

Returns:
Current interrupt priority level.

Definition at line 200 of file asm.h.

References pstate_read().

Here is the call graph for this function:

static void interrupts_restore ipl_t  ipl  )  [static]
 

Restore interrupt priority level.

Restore IPL.

Parameters:
ipl Saved interrupt priority level.

Definition at line 186 of file asm.h.

References pstate_reg::ie, pstate_read(), pstate_write(), and pstate_reg::value.

Here is the call graph for this function:

void kbd_init void   ) 
 

Definition at line 42 of file i8042.c.

References hw_map(), i8042_init(), KBD_PHYS_ADDRESS, kbd_virt_address, and LAST_REG.

Referenced by standalone_sparc64_console_init().

Here is the call graph for this function:

void kkbdpoll void *  arg  ) 
 

Kernel thread for polling keyboard.

Parameters:
arg Ignored.

Definition at line 178 of file console.c.

References i8042_poll(), KEYBOARD_POLL_PAUSE, and thread_usleep().

Referenced by arch_post_smp_init().

Here is the call graph for this function:

void kofwinput void *  arg  ) 
 

Kernel thread for pushing characters read from OFW to input buffer.

Parameters:
arg Ignored.

Definition at line 155 of file console.c.

References canwork, chardev_push_character(), KEYBOARD_POLL_PAUSE, mutex_lock, mutex_unlock(), NULL, ofw_console_active, ofw_sparc64_console, ofw_sparc64_getchar(), and thread_usleep().

Referenced by arch_post_smp_init().

Here is the call graph for this function:

static void membar void   )  [static]
 

Memory Barrier instruction.

Definition at line 65 of file barrier.h.

Referenced by dmmu_set(), and immu_set().

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(), and thread_create().

void memsetw __address  dst,
size_t  cnt,
__u16  x
 

void ofw_sparc64_console_init void   ) 
 

Initialize kernel console to use OpenFirmware services.

Definition at line 71 of file console.c.

References canwork, chardev_initialize(), mutex_initialize(), ofw_console_active, ofw_sparc64_console, ofw_sparc64_console_ops, stdin, and stdout.

Referenced by arch_pre_mm_init().

Here is the call graph for this function:

char ofw_sparc64_getchar chardev_t d  )  [static]
 

Read one character using OpenFirmware.

The call is non-blocking.

Parameters:
d Character device (ignored).
Returns:
Character read or zero if no character was read.

Definition at line 121 of file console.c.

References pstate_reg::am, ofw_getchar(), pstate_read(), pstate_write(), and pstate_reg::value.

Referenced by kofwinput().

Here is the call graph for this function:

void ofw_sparc64_putchar chardev_t d,
const char  ch
[static]
 

Write one character using OpenFirmware.

Parameters:
d Character device (ignored).
ch Character to be written.

Definition at line 95 of file console.c.

References pstate_reg::am, ofw_putchar(), pstate_read(), pstate_write(), and pstate_reg::value.

Here is the call graph for this function:

void ofw_sparc64_resume chardev_t d  )  [static]
 

Definition at line 146 of file console.c.

References canwork, and mutex_unlock().

Here is the call graph for this function:

void ofw_sparc64_suspend chardev_t d  )  [static]
 

Definition at line 141 of file console.c.

References canwork, and mutex_lock.

static __u64 pstate_read void   )  [static]
 

Read Processor State register.

Returns:
Value of PSTATE register.

Definition at line 47 of file asm.h.

Referenced by interrupts_disable(), interrupts_enable(), interrupts_read(), interrupts_restore(), ofw_sparc64_getchar(), and ofw_sparc64_putchar().

static void pstate_write __u64  v  )  [static]
 

Write Processor State register.

Parameters:
v New value of PSTATE register.

Definition at line 60 of file asm.h.

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

static __u64 softint_read void   )  [static]
 

Read SOFTINT Register.

Returns:
Value of SOFTINT register.

Definition at line 113 of file asm.h.

Referenced by tick_interrupt().

static void softint_write __u64  v  )  [static]
 

Write SOFTINT Register.

Parameters:
v New value of SOFTINT register.

Definition at line 126 of file asm.h.

void standalone_sparc64_console_init void   ) 
 

Initialize kernel console to use framebuffer and keyboard directly.

Definition at line 81 of file console.c.

References FB_COLOR_DEPTH, fb_init(), FB_PHYS_ADDRESS, FB_X_RES, FB_Y_RES, kbd_init(), NULL, ofw_console_active, and stdin.

Referenced by arch_post_mm_init().

Here is the call graph for this function:

static __u64 tba_read void   )  [static]
 

Read Trap Base Address register.

Returns:
Current value in TBA.

Definition at line 236 of file asm.h.

static void tba_write __u64  v  )  [static]
 

Write Trap Base Address register.

Parameters:
v New value of TBA.

Definition at line 275 of file asm.h.

Referenced by trap_switch_trap_table().

static __u64 tick_compare_read void   )  [static]
 

Read TICK_compare Register.

Returns:
Value of TICK_comapre register.

Definition at line 69 of file asm.h.

static void tick_compare_write __u64  v  )  [static]
 

Write TICK_compare Register.

Parameters:
v New value of TICK_comapre register.

Definition at line 82 of file asm.h.

Referenced by tick_init().

void tick_init void   ) 
 

Initialize tick interrupt.

Definition at line 44 of file tick.c.

References compare(), interrupt_register(), tick_compare_write(), TICK_DELTA, tick_interrupt(), and tick_write().

Referenced by arch_pre_mm_init().

Here is the call graph for this function:

void tick_interrupt int  n,
istate_t istate
 

Process tick interrupt.

Parameters:
n Interrupt Level, 14, (can be ignored)
istate Interrupted state.

Definition at line 60 of file tick.c.

References ASSERT, clear_softint_write(), clock(), softint_read(), softint_reg::tick_int, tick_write(), and softint_reg::value.

Referenced by tick_init().

Here is the call graph for this function:

static __u64 tick_read void   )  [static]
 

Read TICK Register.

Returns:
Value of TICK register.

Definition at line 91 of file asm.h.

static void tick_write __u64  v  )  [static]
 

Write TICK Register.

Parameters:
v New value of TICK register.

Definition at line 104 of file asm.h.

Referenced by tick_init(), and tick_interrupt().

static __u64 tl_read void   )  [static]
 

Read Trap Level register.

Returns:
Current value in TL.

Definition at line 262 of file asm.h.

static __u64 tpc_read void   )  [static]
 

Read Trap Program Counter register.

Returns:
Current value in TPC.

Definition at line 249 of file asm.h.

Referenced by do_data_access_error(), do_illegal_instruction(), and fast_data_access_mmu_miss().

static __u64 ver_read void   )  [static]
 

Read Version Register.

Returns:
Value of VER register.

Definition at line 223 of file asm.h.

Referenced by cpu_identify().


Variable Documentation

mutex_t canwork
 

Definition at line 58 of file console.c.

Referenced by kofwinput(), ofw_sparc64_console_init(), ofw_sparc64_resume(), and ofw_sparc64_suspend().

volatile __u8* kbd_virt_address = NULL
 

Definition at line 40 of file i8042.c.

Referenced by i8042_command_write(), i8042_data_read(), i8042_data_write(), i8042_status_read(), and kbd_init().

volatile __u8* kbd_virt_address
 

Definition at line 40 of file i8042.c.

Referenced by i8042_command_write(), i8042_data_read(), i8042_data_write(), i8042_status_read(), and kbd_init().

volatile int ofw_console_active [static]
 

Definition at line 60 of file console.c.

Referenced by kofwinput(), ofw_sparc64_console_init(), and standalone_sparc64_console_init().

chardev_t ofw_sparc64_console [static]
 

Definition at line 62 of file console.c.

Referenced by kofwinput(), and ofw_sparc64_console_init().

chardev_operations_t ofw_sparc64_console_ops [static]
 

Initial value:

 {
        .write = ofw_sparc64_putchar,
        .read = ofw_sparc64_getchar,
        .resume = ofw_sparc64_resume,
        .suspend = ofw_sparc64_suspend
}

Definition at line 63 of file console.c.

Referenced by ofw_sparc64_console_init().


Generated on Sun Jun 18 17:48:10 2006 for HelenOS Kernel (sparc64) by  doxygen 1.4.6