mips32
[Miscellanea]


Files

file  arch.h
file  arg.h
file  boot.h
file  regname.h
file  asm.h
file  atomic.h
file  barrier.h
file  byteorder.h
file  cache.h
file  console.h
file  context.h
file  cp0.h
file  cpu.h
file  arc.h
file  msim.h
file  serial.h
file  elf.h
file  exception.h
file  faddr.h
file  fpu_context.h
file  memstr.h
file  stack.h
file  types.h
file  cache.c
file  console.c
file  cpu.c
file  arc.c
file  msim.c
file  serial.c
file  exception.c
file  fpu_context.c
file  mips32.c

Data Structures

struct  context
struct  cpu_arch
struct  __attribute__
struct  __attribute__
struct  __attribute__
struct  __attribute__
struct  arc_memdescriptor_t
struct  arc_sysid_t
struct  arc_func_vector_t
struct  __attribute__
struct  serial_t
struct  istate
struct  fpu_context
struct  data_t

Defines

#define va_start(ap, lst)   ((ap) = (va_list)&(lst) + sizeof(lst))
#define va_arg(ap, type)   (((type *)((ap) = (va_list)( (sizeof(type) <= 4) ? ((__address)((ap) + 2*4 - 1) & (~3)) : ((__address)((ap) + 2*8 -1) & (~7)) )))[-1])
#define va_copy(dst, src)   ((dst)=(src))
#define va_end(ap)
#define TEMP_STACK_SIZE   0x100
#define zero   0
#define at   1
#define v0   2
#define v1   3
#define a0   4
#define a1   5
#define a2   6
#define a3   7
#define t0   8
#define t1   9
#define t2   10
#define t3   11
#define t4   12
#define t5   13
#define t6   14
#define t7   15
#define s0   16
#define s1   17
#define s2   18
#define s3   19
#define s4   20
#define s5   21
#define s6   22
#define s7   23
#define t8   24
#define t9   25
#define k0   26
#define k1   27
#define gp   28
#define sp   29
#define s8   30
#define ra   31
#define rindex   0
#define rrandom   1
#define entrylo0   2
#define entrylo1   3
#define context   4
#define pagemask   5
#define wired   6
#define badvaddr   8
#define count   9
#define entryhi   10
#define compare   11
#define status   12
#define cause   13
#define epc   14
#define rconfig   16
#define lladdr   17
#define watchlo   18
#define watchhi   19
#define xcontext   20
#define rdebug   23
#define depc   24
#define eepc   30
#define atomic_inc(x)   ((void) atomic_add(x, 1))
#define atomic_dec(x)   ((void) atomic_add(x, -1))
#define atomic_postinc(x)   (atomic_add(x, 1) - 1)
#define atomic_postdec(x)   (atomic_add(x, -1) + 1)
#define atomic_preinc(x)   atomic_add(x, 1)
#define atomic_predec(x)   atomic_add(x, -1)
#define CS_ENTER_BARRIER()   __asm__ volatile ("" ::: "memory")
#define CS_LEAVE_BARRIER()   __asm__ volatile ("" ::: "memory")
#define memory_barrier()   __asm__ volatile ("" ::: "memory")
#define read_barrier()   __asm__ volatile ("" ::: "memory")
#define write_barrier()   __asm__ volatile ("" ::: "memory")
#define __native_le2host(n)   (n)
#define __u64_le2host(n)   (n)
#define SP_DELTA   (0 + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT))
#define cp0_status_ie_enabled_bit   (1<<0)
#define cp0_status_exl_exception_bit   (1<<1)
#define cp0_status_erl_error_bit   (1<<2)
#define cp0_status_um_bit   (1<<4)
#define cp0_status_bev_bootstrap_bit   (1<<22)
#define cp0_status_fpu_bit   (1<<29)
#define cp0_status_im_shift   8
#define cp0_status_im_mask   0xff00
#define cp0_cause_excno(cause)   ((cause >> 2) & 0x1f)
#define cp0_cause_coperr(cause)   ((cause >> 28) & 0x3)
#define fpu_cop_id   1
#define cp0_compare_value   100000
#define cp0_mask_all_int()   cp0_status_write(cp0_status_read() & ~(cp0_status_im_mask))
#define cp0_unmask_all_int()   cp0_status_write(cp0_status_read() | cp0_status_im_mask)
#define cp0_mask_int(it)   cp0_status_write(cp0_status_read() & ~(1<<(cp0_status_im_shift+(it))))
#define cp0_unmask_int(it)   cp0_status_write(cp0_status_read() | (1<<(cp0_status_im_shift+(it))))
#define GEN_READ_CP0(nm, reg)
#define GEN_WRITE_CP0(nm, reg)
#define ARC_BASE_ADDR   0x1000;
#define ARC_MAGIC   0x53435241
#define ARC_FRAME   4096
#define MSIM_VIDEORAM   0xB0000000
#define MSIM_KBD_ADDRESS   0xB0000000
#define MSIM_KBD_IRQ   2
#define SERIAL_MAX   4
#define SERIAL_COM1   0x3f8
#define SERIAL_COM1_IRQ   4
#define SERIAL_COM2   0x2f8
#define SERIAL_COM2_IRQ   3
#define P_WRITEB(where, what)   (*((volatile char *) (0xB8000000+where))=what)
#define P_READB(where)   (*((volatile char *)(0xB8000000+where)))
#define SERIAL_READ(x)   P_READB(x)
#define SERIAL_WRITE(x, c)   P_WRITEB(x,c)
#define SERIAL_READ_IER(x)   (P_READB((x) + 1))
#define SERIAL_WRITE_IER(x, c)   (P_WRITEB((x)+1,c))
#define SERIAL_READ_IIR(x)   (P_READB((x) + 2))
#define SERIAL_READ_LSR(x)   (P_READB((x) + 5))
#define TRANSMIT_EMPTY_BIT   5
#define ELF_MACHINE   EM_MIPS
#define ELF_DATA_ENCODING   ELFDATA2LSB
#define ELF_CLASS   ELFCLASS32
#define EXC_Int   0
#define EXC_Mod   1
#define EXC_TLBL   2
#define EXC_TLBS   3
#define EXC_AdEL   4
#define EXC_AdES   5
#define EXC_IBE   6
#define EXC_DBE   7
#define EXC_Sys   8
#define EXC_Bp   9
#define EXC_RI   10
#define EXC_CpU   11
#define EXC_Ov   12
#define EXC_Tr   13
#define EXC_VCEI   14
#define EXC_FPE   15
#define EXC_WATCH   23
#define EXC_VCED   31
#define FADDR(fptr)   ((__address) (fptr))
#define FPU_CONTEXT_ALIGN   sizeof(__native)
#define memcpy(dst, src, cnt)   __builtin_memcpy((dst), (src), (cnt))
#define STACK_ITEM_SIZE   4
#define STACK_ALIGNMENT   8
#define NULL   0
#define EXCEPTION_JUMP_SIZE   8
#define TLB_EXC   ((char *) 0x80000000)
#define NORM_EXC   ((char *) 0x80000180)
#define CACHE_EXC   ((char *) 0x80000100)

Typedefs

typedef __address va_list
typedef signed char __s8
typedef unsigned char __u8
typedef signed short __s16
typedef unsigned short __u16
typedef unsigned long __u32
typedef signed long __s32
typedef unsigned long long __u64
typedef signed long long __s64
typedef __u32 __address
typedef __u32 ipl_t
typedef __u32 __native
typedef __s32 __snative
typedef pte pte_t
typedef __u32 pfn_t

Enumerations

enum  cm_resource_type {
  CmResourceTypeNull = 0, CmResourceTypePort, CmResourceTypeInterrupt, CmResourceTypeMemory,
  CmResourceTypeDma, CmResourceTypeDeviceSpecific, CmResourceTypeVendor, CmResourceTypeProductName,
  CmResourceTypeSerialNumber
}
enum  arc_component_class {
  SystemClass = 0, ProcessorClass, CacheClass, AdapterClass,
  ControllerClass, PeripheralClass, MemoryClass
}
enum  arc_component_type {
  ARC_type = 0, CPU_type, FPU_type, PrimaryICache,
  PrimaryDCache, SecondaryICache, SecondaryDCache, SecondaryCache,
  Memory, EISAAdapter, TCAdapter, SCSIAdapter,
  DTIAdapter, MultiFunctionAdapter, DiskController, TapeController,
  CDROMController, WORMController, SerialController, NetworkController,
  DisplayController, ParallelController, PointerController, KeyboardController,
  AudioController, OtherController, DiskPeripheral, FloppyDiskPeripheral,
  TapePeripheral, ModemPeripheral, MonitorPeripheral, PrinterPeripheral,
  PointerPeripheral, KeyboardPeripheral, TerminalPeripheral, LinePeripheral,
  NetworkPeripheral, OtherPeripheral, XTalkAdapter, PCIAdapter,
  GIOAdapter, TPUAdapter, Anonymous
}
enum  arc_component_flags {
  Failed = 1, ReadOnly = 2, Removable = 4, ConsoleIn = 8,
  ConsoleOut = 16, Input = 32, Output = 64
}
enum  arc_memorytype_t {
  ExceptionBlock, SystemParameterBlock, FreeContiguous, FreeMemory,
  BadMemory, LoadedProgram, FirmwareTemporary, FirmwarePermanent
}

Functions

static void cpu_sleep (void)
static __address get_stack_base (void)
void cpu_halt (void)
void asm_delay_loop (__u32 t)
void userspace_asm (__address ustack, __address uspace_uarg, __address entry)
static long atomic_add (atomic_t *val, int i)
void cache_error (void)
void console_init (void)
 GEN_READ_CP0 (index, 0)
 GEN_WRITE_CP0 (index, 0)
 GEN_READ_CP0 (random, 1)
 GEN_READ_CP0 (entry_lo0, 2)
 GEN_WRITE_CP0 (entry_lo0, 2)
 GEN_READ_CP0 (entry_lo1, 3)
 GEN_WRITE_CP0 (entry_lo1, 3)
 GEN_READ_CP0 (context, 4)
 GEN_WRITE_CP0 (context, 4)
 GEN_READ_CP0 (pagemask, 5)
 GEN_WRITE_CP0 (pagemask, 5)
 GEN_READ_CP0 (wired, 6)
 GEN_WRITE_CP0 (wired, 6)
 GEN_READ_CP0 (badvaddr, 8)
 GEN_READ_CP0 (count, 9)
 GEN_WRITE_CP0 (count, 9)
 GEN_READ_CP0 (entry_hi, 10)
 GEN_WRITE_CP0 (entry_hi, 10)
 GEN_READ_CP0 (compare, 11)
 GEN_WRITE_CP0 (compare, 11)
 GEN_READ_CP0 (status, 12)
 GEN_WRITE_CP0 (status, 12)
 GEN_READ_CP0 (cause, 13)
 GEN_WRITE_CP0 (cause, 13)
 GEN_READ_CP0 (epc, 14)
 GEN_WRITE_CP0 (epc, 14)
 GEN_READ_CP0 (prid, 15)
int arc_init (void)
int arc_enabled (void)
void arc_frame_init (void)
void arc_console (void)
void msim_console (void)
void msim_kbd_release (void)
void msim_kbd_grab (void)
void serial_console (void)
int serial_init (void)
static void istate_set_retaddr (istate_t *istate, __address retaddr)
static int istate_from_uspace (istate_t *istate)
static __native istate_get_pc (istate_t *istate)
void exception (istate_t *istate)
void tlb_refill_entry (void)
void exception_entry (void)
void cache_error_entry (void)
void exception_init (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 arch_grab_console (void)
void arch_release_console (void)
void cpu_arch_init (void)
void cpu_identify (void)
void cpu_print_report (cpu_t *m)
static void arc_putchar (char ch)
static void arc_print_confdata (arc_component *c)
static void arc_print_component (arc_component *c)
static int cmd_arc_print_devices (cmd_arg_t *argv)
static int cmd_arc_print_memmap (cmd_arg_t *argv)
static int cmd_reboot (cmd_arg_t *argv)
static void arc_keyboard_poll (void)
static char arc_read (chardev_t *dev)
static void arc_write (chardev_t *dev, const char ch)
static void arc_enable (chardev_t *dev)
static void arc_disable (chardev_t *dev)
static void timer_replace (int n, istate_t *istate)
static void msim_write (chardev_t *dev, const char ch)
static void msim_enable (chardev_t *dev)
static void msim_disable (chardev_t *dev)
static char msim_do_read (chardev_t *dev)
static void msim_interrupt (int n, istate_t *istate)
static void serial_write (chardev_t *d, const char ch)
static void serial_enable (chardev_t *d)
static void serial_disable (chardev_t *d)
static char serial_do_read (chardev_t *dev)
static void serial_interrupt (int n, void *stack)
static void print_regdump (istate_t *istate)
static void unhandled_exception (int n, istate_t *istate)
static void reserved_instr_exception (int n, istate_t *istate)
static void breakpoint_exception (int n, istate_t *istate)
static void tlbmod_exception (int n, istate_t *istate)
static void tlbinv_exception (int n, istate_t *istate)
static void interrupt_exception (int n, istate_t *istate)
static void syscall_exception (int n, istate_t *istate)
void fpu_disable (void)
void fpu_enable (void)
void fpu_init ()
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)
__address supervisor_sp __attribute__ ((section(".text")))
void userspace (uspace_arg_t *kernel_uarg)
void before_task_runs_arch (void)
void before_thread_runs_arch (void)
void after_thread_ran_arch (void)
__native sys_tls_set (__native addr)

Variables

static struct data_t imp_data []
static struct data_t imp_data80 []
static char * basetypes []
static char * ctypes []
static arc_sbp * sbp = (arc_sbp *)PA2KA(0x1000)
static arc_func_vector_tarc_entry
static cmd_info_t devlist_info
static cmd_info_t memmap_info
static cmd_info_t reboot_info
static bool kbd_polling_enabled
static chardev_t console
static chardev_operations_t arc_ops
iroutine old_timer
static chardev_t console
static chardev_operations_t msim_ops
static iroutine oldvector
static chardev_t console
static serial_t sconf [SERIAL_MAX]
static bool kb_enabled
static chardev_operations_t serial_ops
iroutine old_timer
static char * exctable []
bootinfo_t bootinfo

Define Documentation

#define __native_le2host  )     (n)
 

Definition at line 53 of file byteorder.h.

#define __u64_le2host  )     (n)
 

Definition at line 54 of file byteorder.h.

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

#define a0   4
 

Definition at line 42 of file regname.h.

#define a1   5
 

Definition at line 43 of file regname.h.

#define a2   6
 

Definition at line 44 of file regname.h.

#define a3   7
 

Definition at line 45 of file regname.h.

#define ARC_BASE_ADDR   0x1000;
 

Definition at line 41 of file arc.h.

#define ARC_FRAME   4096
 

Definition at line 44 of file arc.h.

Referenced by arc_frame_init(), and cmd_arc_print_memmap().

#define ARC_MAGIC   0x53435241
 

Definition at line 42 of file arc.h.

Referenced by arc_init().

#define at   1
 

Definition at line 39 of file regname.h.

#define atomic_dec  )     ((void) atomic_add(x, -1))
 

Definition at line 39 of file atomic.h.

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().

#define atomic_inc  )     ((void) atomic_add(x, 1))
 

Definition at line 38 of file atomic.h.

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

#define atomic_postdec  )     (atomic_add(x, -1) + 1)
 

Definition at line 42 of file atomic.h.

#define atomic_postinc  )     (atomic_add(x, 1) - 1)
 

Definition at line 41 of file atomic.h.

#define atomic_predec  )     atomic_add(x, -1)
 

Definition at line 45 of file atomic.h.

#define atomic_preinc  )     atomic_add(x, 1)
 

Definition at line 44 of file atomic.h.

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

#define badvaddr   8
 

Definition at line 78 of file regname.h.

Referenced by tlb_invalid(), tlb_modified(), and tlb_refill().

#define CACHE_EXC   ((char *) 0x80000100)
 

Definition at line 68 of file mips32.c.

Referenced by arch_pre_mm_init().

#define cause   13
 

Definition at line 83 of file regname.h.

Referenced by interrupt_exception().

#define compare   11
 

Definition at line 81 of file regname.h.

#define context   4
 

Definition at line 75 of file regname.h.

#define count   9
 

Definition at line 79 of file regname.h.

Referenced by anon_share(), arc_keyboard_poll(), arc_read(), elf_share(), kcpulb(), printf_putstr(), tlb_shootdown_ipi_recv(), zone_get_frame(), and zone_merge_all().

#define cp0_cause_coperr cause   )     ((cause >> 28) & 0x3)
 

Definition at line 52 of file cp0.h.

#define cp0_cause_excno cause   )     ((cause >> 2) & 0x1f)
 

Definition at line 51 of file cp0.h.

#define cp0_compare_value   100000
 

Definition at line 59 of file cp0.h.

Referenced by timer_exception(), and timer_start().

 
#define cp0_mask_all_int  )     cp0_status_write(cp0_status_read() & ~(cp0_status_im_mask))
 

Definition at line 61 of file cp0.h.

Referenced by arch_pre_mm_init().

#define cp0_mask_int it   )     cp0_status_write(cp0_status_read() & ~(1<<(cp0_status_im_shift+(it))))
 

Definition at line 63 of file cp0.h.

Referenced by msim_disable().

#define cp0_status_bev_bootstrap_bit   (1<<22)
 

Definition at line 45 of file cp0.h.

Referenced by arch_pre_mm_init().

#define cp0_status_erl_error_bit   (1<<2)
 

Definition at line 43 of file cp0.h.

Referenced by arch_pre_mm_init().

#define cp0_status_exl_exception_bit   (1<<1)
 

Definition at line 42 of file cp0.h.

Referenced by userspace().

#define cp0_status_fpu_bit   (1<<29)
 

Definition at line 46 of file cp0.h.

Referenced by fpu_disable(), and fpu_enable().

#define cp0_status_ie_enabled_bit   (1<<0)
 

Definition at line 41 of file cp0.h.

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

#define cp0_status_im_mask   0xff00
 

Definition at line 49 of file cp0.h.

#define cp0_status_im_shift   8
 

Definition at line 48 of file cp0.h.

#define cp0_status_um_bit   (1<<4)
 

Definition at line 44 of file cp0.h.

Referenced by istate_from_uspace(), and userspace().

 
#define cp0_unmask_all_int  )     cp0_status_write(cp0_status_read() | cp0_status_im_mask)
 

Definition at line 62 of file cp0.h.

#define cp0_unmask_int it   )     cp0_status_write(cp0_status_read() | (1<<(cp0_status_im_shift+(it))))
 

Definition at line 64 of file cp0.h.

Referenced by arch_pre_mm_init(), msim_console(), and msim_enable().

 
#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 depc   24
 

Definition at line 91 of file regname.h.

#define eepc   30
 

Definition at line 92 of file regname.h.

#define ELF_CLASS   ELFCLASS32
 

Definition at line 46 of file elf.h.

Referenced by elf_load().

#define ELF_DATA_ENCODING   ELFDATA2LSB
 

Definition at line 43 of file elf.h.

Referenced by elf_load().

#define ELF_MACHINE   EM_MIPS
 

Definition at line 38 of file elf.h.

Referenced by elf_load().

#define entryhi   10
 

Definition at line 80 of file regname.h.

#define entrylo0   2
 

Definition at line 73 of file regname.h.

#define entrylo1   3
 

Definition at line 74 of file regname.h.

#define epc   14
 

Definition at line 84 of file regname.h.

#define EXC_AdEL   4
 

Definition at line 49 of file exception.h.

#define EXC_AdES   5
 

Definition at line 50 of file exception.h.

#define EXC_Bp   9
 

Definition at line 54 of file exception.h.

Referenced by exception_init().

#define EXC_CpU   11
 

Definition at line 56 of file exception.h.

Referenced by exception_init().

#define EXC_DBE   7
 

Definition at line 52 of file exception.h.

#define EXC_FPE   15
 

Definition at line 60 of file exception.h.

#define EXC_IBE   6
 

Definition at line 51 of file exception.h.

#define EXC_Int   0
 

Definition at line 45 of file exception.h.

Referenced by exception_init().

#define EXC_Mod   1
 

Definition at line 46 of file exception.h.

Referenced by exception_init().

#define EXC_Ov   12
 

Definition at line 57 of file exception.h.

#define EXC_RI   10
 

Definition at line 55 of file exception.h.

Referenced by exception_init().

#define EXC_Sys   8
 

Definition at line 53 of file exception.h.

Referenced by exception_init().

#define EXC_TLBL   2
 

Definition at line 47 of file exception.h.

Referenced by exception_init().

#define EXC_TLBS   3
 

Definition at line 48 of file exception.h.

Referenced by exception_init().

#define EXC_Tr   13
 

Definition at line 58 of file exception.h.

#define EXC_VCED   31
 

Definition at line 62 of file exception.h.

#define EXC_VCEI   14
 

Definition at line 59 of file exception.h.

#define EXC_WATCH   23
 

Definition at line 61 of file exception.h.

#define EXCEPTION_JUMP_SIZE   8
 

Definition at line 64 of file mips32.c.

Referenced by arch_pre_mm_init().

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

Definition at line 40 of file faddr.h.

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

#define FPU_CONTEXT_ALIGN   sizeof(__native)
 

Definition at line 40 of file fpu_context.h.

Referenced by thread_init().

#define fpu_cop_id   1
 

Definition at line 54 of file cp0.h.

#define GEN_READ_CP0 nm,
reg   ) 
 

Value:

static inline __u32 cp0_ ##nm##_read(void) \
  { \
      __u32 retval; \
      asm("mfc0 %0, $" #reg : "=r"(retval)); \
      return retval; \
  }

Definition at line 66 of file cp0.h.

#define GEN_WRITE_CP0 nm,
reg   ) 
 

Value:

static inline void cp0_ ##nm##_write(__u32 val) \
 { \
    asm("mtc0 %0, $" #reg : : "r"(val) ); \
 }

Definition at line 73 of file cp0.h.

#define gp   28
 

Definition at line 66 of file regname.h.

Referenced by cmd_call0(), cmd_call1(), cmd_call2(), and cmd_call3().

#define k0   26
 

Definition at line 64 of file regname.h.

#define k1   27
 

Definition at line 65 of file regname.h.

#define lladdr   17
 

Definition at line 86 of file regname.h.

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

Definition at line 38 of file memstr.h.

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

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

Definition at line 44 of file barrier.h.

Referenced by preemption_disable(), and preemption_enable().

#define MSIM_KBD_ADDRESS   0xB0000000
 

Address of 'keyboard' device.

Definition at line 42 of file msim.h.

Referenced by msim_do_read(), and msim_interrupt().

#define MSIM_KBD_IRQ   2
 

Definition at line 43 of file msim.h.

Referenced by msim_console(), msim_disable(), msim_enable(), msim_kbd_grab(), and msim_kbd_release().

#define MSIM_VIDEORAM   0xB0000000
 

Definition at line 40 of file msim.h.

Referenced by msim_write().

#define NORM_EXC   ((char *) 0x80000180)
 

Definition at line 67 of file mips32.c.

Referenced by arch_pre_mm_init().

#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(), arc_enabled(), arc_frame_init(), arc_init(), arch_post_mm_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(), cmd_add_breakpoint(), cmd_arc_print_devices(), cmd_arc_print_memmap(), cmd_del_breakpoint(), cmdtab_compl(), code_from_uspace(), debugger_bpoint(), debugger_init(), elf_share(), fb_init(), find_best_thread(), find_free_zone_lock(), find_mapping_and_check(), 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(), 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(), print_string(), printf_putstr(), pt_mapping_find(), rotate_from_left(), rotate_from_right(), scheduler(), scheduler_separated_stack(), 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 P_READB where   )     (*((volatile char *)(0xB8000000+where)))
 

Definition at line 47 of file serial.h.

#define P_WRITEB where,
what   )     (*((volatile char *) (0xB8000000+where))=what)
 

Definition at line 46 of file serial.h.

#define pagemask   5
 

Definition at line 76 of file regname.h.

#define ra   31
 

Definition at line 69 of file regname.h.

#define rconfig   16
 

Definition at line 85 of file regname.h.

#define rdebug   23
 

Definition at line 90 of file regname.h.

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

Definition at line 45 of file barrier.h.

#define rindex   0
 

Definition at line 71 of file regname.h.

#define rrandom   1
 

Definition at line 72 of file regname.h.

#define s0   16
 

Definition at line 54 of file regname.h.

#define s1   17
 

Definition at line 55 of file regname.h.

#define s2   18
 

Definition at line 56 of file regname.h.

#define s3   19
 

Definition at line 57 of file regname.h.

#define s4   20
 

Definition at line 58 of file regname.h.

#define s5   21
 

Definition at line 59 of file regname.h.

#define s6   22
 

Definition at line 60 of file regname.h.

#define s7   23
 

Definition at line 61 of file regname.h.

#define s8   30
 

Definition at line 68 of file regname.h.

#define SERIAL_COM1   0x3f8
 

Definition at line 41 of file serial.h.

Referenced by serial_init().

#define SERIAL_COM1_IRQ   4
 

Definition at line 42 of file serial.h.

Referenced by serial_init().

#define SERIAL_COM2   0x2f8
 

Definition at line 43 of file serial.h.

#define SERIAL_COM2_IRQ   3
 

Definition at line 44 of file serial.h.

#define SERIAL_MAX   4
 

Definition at line 40 of file serial.h.

#define SERIAL_READ  )     P_READB(x)
 

Definition at line 49 of file serial.h.

Referenced by serial_do_read(), and serial_interrupt().

#define SERIAL_READ_IER  )     (P_READB((x) + 1))
 

Definition at line 52 of file serial.h.

#define SERIAL_READ_IIR  )     (P_READB((x) + 2))
 

Definition at line 55 of file serial.h.

#define SERIAL_READ_LSR  )     (P_READB((x) + 5))
 

Definition at line 57 of file serial.h.

Referenced by serial_do_read(), serial_init(), serial_interrupt(), and serial_write().

#define SERIAL_WRITE x,
 )     P_WRITEB(x,c)
 

Definition at line 50 of file serial.h.

Referenced by serial_write().

#define SERIAL_WRITE_IER x,
 )     (P_WRITEB((x)+1,c))
 

Definition at line 53 of file serial.h.

#define sp   29
 

Definition at line 67 of file regname.h.

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

Definition at line 44 of file context.h.

Referenced by before_thread_runs_arch().

#define STACK_ALIGNMENT   8
 

Definition at line 39 of file stack.h.

#define STACK_ITEM_SIZE   4
 

Definition at line 38 of file stack.h.

#define status   12
 

Definition at line 82 of file regname.h.

Referenced by slab_space_alloc(), and thr_constructor().

#define t0   8
 

Definition at line 46 of file regname.h.

#define t1   9
 

Definition at line 47 of file regname.h.

Referenced by task_run_program().

#define t2   10
 

Definition at line 48 of file regname.h.

Referenced by task_run_program().

#define t3   11
 

Definition at line 49 of file regname.h.

#define t4   12
 

Definition at line 50 of file regname.h.

#define t5   13
 

Definition at line 51 of file regname.h.

#define t6   14
 

Definition at line 52 of file regname.h.

#define t7   15
 

Definition at line 53 of file regname.h.

#define t8   24
 

Definition at line 62 of file regname.h.

#define t9   25
 

Definition at line 63 of file regname.h.

#define TEMP_STACK_SIZE   0x100
 

Definition at line 40 of file boot.h.

#define TLB_EXC   ((char *) 0x80000000)
 

Definition at line 66 of file mips32.c.

Referenced by arch_pre_mm_init().

#define TRANSMIT_EMPTY_BIT   5
 

Definition at line 58 of file serial.h.

Referenced by serial_write().

#define v0   2
 

Definition at line 40 of file regname.h.

#define v1   3
 

Definition at line 41 of file regname.h.

#define va_arg ap,
type   )     (((type *)((ap) = (va_list)( (sizeof(type) <= 4) ? ((__address)((ap) + 2*4 - 1) & (~3)) : ((__address)((ap) + 2*8 -1) & (~7)) )))[-1])
 

Definition at line 50 of file arg.h.

#define va_copy dst,
src   )     ((dst)=(src))
 

Definition at line 53 of file arg.h.

#define va_end ap   ) 
 

Definition at line 55 of file arg.h.

#define va_start ap,
lst   )     ((ap) = (va_list)&(lst) + sizeof(lst))
 

Definition at line 47 of file arg.h.

#define watchhi   19
 

Definition at line 88 of file regname.h.

#define watchlo   18
 

Definition at line 87 of file regname.h.

#define wired   6
 

Definition at line 77 of file regname.h.

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

Definition at line 46 of file barrier.h.

Referenced by clock_update_counters().

#define xcontext   20
 

Definition at line 89 of file regname.h.

#define zero   0
 

Definition at line 38 of file regname.h.


Typedef Documentation

typedef __u32 __address
 

Definition at line 52 of file types.h.

typedef __u32 __native
 

Definition at line 56 of file types.h.

typedef signed short __s16
 

Definition at line 43 of file types.h.

typedef signed long __s32
 

Definition at line 47 of file types.h.

typedef signed long long __s64
 

Definition at line 50 of file types.h.

typedef signed char __s8
 

Definition at line 40 of file types.h.

typedef __s32 __snative
 

Definition at line 57 of file types.h.

typedef unsigned short __u16
 

Definition at line 44 of file types.h.

typedef unsigned long __u32
 

Definition at line 46 of file types.h.

typedef unsigned long long __u64
 

Definition at line 49 of file types.h.

typedef unsigned char __u8
 

Definition at line 41 of file types.h.

typedef __u32 ipl_t
 

Definition at line 54 of file types.h.

typedef __u32 pfn_t
 

Definition at line 61 of file types.h.

typedef struct pte pte_t
 

Definition at line 59 of file types.h.

typedef __address va_list
 

va_arg macro for MIPS32 - problem is that 64 bit values must be aligned on an 8-byte boundary (32bit values not) To satisfy this, paddings must be sometimes inserted.

Definition at line 45 of file arg.h.


Enumeration Type Documentation

enum arc_component_class
 

Enumerator:
SystemClass 
ProcessorClass 
CacheClass 
AdapterClass 
ControllerClass 
PeripheralClass 
MemoryClass 

Definition at line 86 of file arc.h.

enum arc_component_flags
 

Enumerator:
Failed 
ReadOnly 
Removable 
ConsoleIn 
ConsoleOut 
Input 
Output 

Definition at line 142 of file arc.h.

enum arc_component_type
 

Enumerator:
ARC_type 
CPU_type 
FPU_type 
PrimaryICache 
PrimaryDCache 
SecondaryICache 
SecondaryDCache 
SecondaryCache 
Memory 
EISAAdapter 
TCAdapter 
SCSIAdapter 
DTIAdapter 
MultiFunctionAdapter 
DiskController 
TapeController 
CDROMController 
WORMController 
SerialController 
NetworkController 
DisplayController 
ParallelController 
PointerController 
KeyboardController 
AudioController 
OtherController 
DiskPeripheral 
FloppyDiskPeripheral 
TapePeripheral 
ModemPeripheral 
MonitorPeripheral 
PrinterPeripheral 
PointerPeripheral 
KeyboardPeripheral 
TerminalPeripheral 
LinePeripheral 
NetworkPeripheral 
OtherPeripheral 
XTalkAdapter 
PCIAdapter 
GIOAdapter 
TPUAdapter 
Anonymous 

Definition at line 96 of file arc.h.

enum arc_memorytype_t
 

Enumerator:
ExceptionBlock 
SystemParameterBlock 
FreeContiguous 
FreeMemory 
BadMemory 
LoadedProgram 
FirmwareTemporary 
FirmwarePermanent 

Definition at line 176 of file arc.h.

enum cm_resource_type
 

Enumerator:
CmResourceTypeNull 
CmResourceTypePort 
CmResourceTypeInterrupt 
CmResourceTypeMemory 
CmResourceTypeDma 
CmResourceTypeDeviceSpecific 
CmResourceTypeVendor 
CmResourceTypeProductName 
CmResourceTypeSerialNumber 

Definition at line 46 of file arc.h.


Function Documentation

__address supervisor_sp __attribute__ (section(".text"))   ) 
 

void after_thread_ran_arch void   ) 
 

Definition at line 169 of file mips32.c.

Referenced by after_thread_ran().

void arc_console void   ) 
 

Definition at line 365 of file arc.c.

References arc_ops, chardev_initialize(), console, int_register, stdin, stdout, TIMER_IRQ, and timer_replace().

Referenced by console_init().

Here is the call graph for this function:

static void arc_disable chardev_t dev  )  [static]
 

Definition at line 344 of file arc.c.

static void arc_enable chardev_t dev  )  [static]
 

Definition at line 339 of file arc.c.

int arc_enabled void   ) 
 

Return true if ARC is available

Definition at line 116 of file arc.c.

References NULL, and sbp.

Referenced by console_init(), and frame_arch_init().

void arc_frame_init void   ) 
 

Definition at line 379 of file arc.c.

References ADDR2PFN(), ALIGN_DOWN, ALIGN_UP, arc_entry, ARC_FRAME, arc_memdescriptor_t::basecount, arc_memdescriptor_t::basepage, config, FRAME_SIZE, FreeContiguous, FreeMemory, arc_func_vector_t::getmemorydescriptor, config_t::memory_size, NULL, SIZE2FRAMES(), arc_memdescriptor_t::type, and zone_create().

Referenced by frame_arch_init().

Here is the call graph for this function:

int arc_init void   ) 
 

Initialize ARC structure

Returns:
0 - ARC OK, -1 - ARC does not exist

Definition at line 265 of file arc.c.

References arc_entry, ARC_MAGIC, arc_putchar(), cmd_initialize(), cmd_register(), devlist_info, memmap_info, NULL, reboot_info, and sbp.

Referenced by arch_pre_mm_init().

Here is the call graph for this function:

static void arc_keyboard_poll void   )  [static]
 

Try to get character, return character or -1 if not available

Definition at line 293 of file arc.c.

References arc_entry, chardev_push_character(), console, count, arc_func_vector_t::getreadstatus, and arc_func_vector_t::read.

Referenced by timer_replace().

Here is the call graph for this function:

static void arc_print_component arc_component *  c  )  [static]
 

Print information about component

Definition at line 167 of file arc.c.

References arc_print_confdata(), ctypes, and printf().

Referenced by cmd_arc_print_devices().

Here is the call graph for this function:

static void arc_print_confdata arc_component *  c  )  [static]
 

Print configuration data that ARC reports about component

Definition at line 123 of file arc.c.

References arc_entry, free(), arc_func_vector_t::getconfigurationdata, and malloc().

Referenced by arc_print_component().

Here is the call graph for this function:

static void arc_putchar char  ch  )  [static]
 

Print charactor to console

Definition at line 237 of file arc.c.

References arc_entry, interrupts_disable(), interrupts_restore(), and arc_func_vector_t::write.

Referenced by arc_init(), and arc_write().

Here is the call graph for this function:

static char arc_read chardev_t dev  )  [static]
 

Definition at line 316 of file arc.c.

References arc_entry, count, cpu_halt(), printf(), and arc_func_vector_t::read.

Here is the call graph for this function:

static void arc_write chardev_t dev,
const char  ch
[static]
 

Definition at line 334 of file arc.c.

References arc_putchar().

Here is the call graph for this function:

void arch_grab_console void   ) 
 

Acquire console back for kernel

Definition at line 55 of file console.c.

References msim_kbd_grab().

Referenced by sys_debug_enable_console().

Here is the call graph for this function:

void arch_post_mm_init void   ) 
 

Definition at line 120 of file mips32.c.

References fb_init(), NULL, STRING, and sysinfo_set_item_val().

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 132 of file mips32.c.

void arch_pre_main void   ) 
 

Definition at line 72 of file mips32.c.

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

void arch_pre_mm_init void   ) 
 

Definition at line 85 of file mips32.c.

References arc_init(), cache_error_entry(), CACHE_EXC, console_init(), cp0_mask_all_int, cp0_status_bev_bootstrap_bit, cp0_status_erl_error_bit, cp0_unmask_int, debugger_init(), exception_entry(), exception_init(), EXCEPTION_JUMP_SIZE, interrupt_init(), interrupts_disable(), memcpy, NORM_EXC, TIMER_IRQ, TLB_EXC, and tlb_refill_entry().

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 128 of file mips32.c.

Referenced by main_bsp_separated_stack().

void arch_release_console void   ) 
 

Return console to userspace

Definition at line 62 of file console.c.

References msim_kbd_release().

Referenced by cmd_continue().

Here is the call graph for this function:

void asm_delay_loop __u32  t  ) 
 

Referenced by delay().

static long atomic_add atomic_t val,
int  i
[static]
 

Definition at line 54 of file atomic.h.

References atomic::count.

void before_task_runs_arch void   ) 
 

Perform mips32 specific tasks needed before the new task is run.

Definition at line 159 of file mips32.c.

Referenced by before_task_runs().

void before_thread_runs_arch void   ) 
 

Perform mips32 specific tasks needed before the new thread is scheduled.

Definition at line 164 of file mips32.c.

References SP_DELTA, THREAD, and THREAD_STACK_SIZE.

Referenced by before_thread_runs().

static void breakpoint_exception int  n,
istate_t istate
[static]
 

Definition at line 103 of file exception.c.

References debugger_bpoint(), and istate::epc.

Referenced by exception_init().

Here is the call graph for this function:

void cache_error void   ) 
 

Definition at line 38 of file cache.c.

References panic.

void cache_error_entry void   ) 
 

Referenced by arch_pre_mm_init().

static int cmd_arc_print_devices cmd_arg_t argv  )  [static]
 

Read from ARC bios configuration data and print it

Definition at line 183 of file arc.c.

References arc_entry, arc_print_component(), arc_func_vector_t::getchild, arc_func_vector_t::getparent, arc_func_vector_t::getpeer, and NULL.

Here is the call graph for this function:

static int cmd_arc_print_memmap cmd_arg_t argv  )  [static]
 

Read from arc bios memory map and print it

Definition at line 213 of file arc.c.

References arc_entry, ARC_FRAME, arc_memdescriptor_t::basecount, arc_memdescriptor_t::basepage, basetypes, arc_func_vector_t::getmemorydescriptor, NULL, printf(), and arc_memdescriptor_t::type.

Here is the call graph for this function:

static int cmd_reboot cmd_arg_t argv  )  [static]
 

Definition at line 249 of file arc.c.

References arc_entry, and arc_func_vector_t::reboot.

void console_init void   ) 
 

Definition at line 41 of file console.c.

References arc_console(), arc_enabled(), msim_console(), serial_console(), and serial_init().

Referenced by arch_pre_mm_init().

Here is the call graph for this function:

void cpu_arch_init void   ) 
 

Definition at line 98 of file cpu.c.

void cpu_halt void   ) 
 

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

void cpu_identify void   ) 
 

Definition at line 102 of file cpu.c.

References CPU.

void cpu_print_report cpu_t m  ) 
 

Definition at line 108 of file cpu.c.

References cpu::arch, imp_data80, cpu_arch::imp_num, printf(), and data_t::vendor.

Referenced by cpu_list().

Here is the call graph for this function:

static void cpu_sleep void   )  [static]
 

Definition at line 43 of file asm.h.

Referenced by find_best_thread().

void exception istate_t istate  ) 
 

void exception_entry void   ) 
 

Referenced by arch_pre_mm_init().

void exception_init void   ) 
 

Definition at line 156 of file exception.c.

References breakpoint_exception(), EXC_Bp, EXC_CpU, EXC_Int, EXC_Mod, exc_register(), EXC_RI, EXC_Sys, EXC_TLBL, EXC_TLBS, interrupt_exception(), IVT_ITEMS, reserved_instr_exception(), syscall_exception(), tlbinv_exception(), tlbmod_exception(), and unhandled_exception().

Referenced by arch_pre_mm_init().

Here is the call graph for this function:

void fpu_disable void   ) 
 

Definition at line 41 of file fpu_context.c.

References cp0_status_fpu_bit.

Referenced by before_thread_runs().

void fpu_enable void   ) 
 

Definition at line 48 of file fpu_context.c.

References cp0_status_fpu_bit.

Referenced by before_thread_runs().

void fpu_init void   ) 
 

Definition at line 55 of file fpu_context.c.

Referenced by before_thread_runs().

GEN_READ_CP0 prid  ,
15 
 

GEN_READ_CP0 epc  ,
14 
 

GEN_READ_CP0 cause  ,
13 
 

GEN_READ_CP0 status  ,
12 
 

GEN_READ_CP0 compare  ,
11 
 

GEN_READ_CP0 entry_hi  ,
10 
 

GEN_READ_CP0 count  ,
 

GEN_READ_CP0 badvaddr  ,
 

GEN_READ_CP0 wired  ,
 

GEN_READ_CP0 pagemask  ,
 

GEN_READ_CP0 context  ,
 

GEN_READ_CP0 entry_lo1  ,
 

GEN_READ_CP0 entry_lo0  ,
 

GEN_READ_CP0 random  ,
 

GEN_READ_CP0 index  ,
 

GEN_WRITE_CP0 epc  ,
14 
 

GEN_WRITE_CP0 cause  ,
13 
 

GEN_WRITE_CP0 status  ,
12 
 

GEN_WRITE_CP0 compare  ,
11 
 

GEN_WRITE_CP0 entry_hi  ,
10 
 

GEN_WRITE_CP0 count  ,
 

GEN_WRITE_CP0 wired  ,
 

GEN_WRITE_CP0 pagemask  ,
 

GEN_WRITE_CP0 context  ,
 

GEN_WRITE_CP0 entry_lo1  ,
 

GEN_WRITE_CP0 entry_lo0  ,
 

GEN_WRITE_CP0 index  ,
 

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 55 of file asm.h.

References STACK_SIZE.

static void interrupt_exception int  n,
istate_t istate
[static]
 

Definition at line 137 of file exception.c.

References cause, exc_dispatch(), and INT_OFFSET.

Referenced by exception_init().

Here is the call graph for this function:

static int istate_from_uspace istate_t istate  )  [static]
 

Return true if exception happened while in userspace

Definition at line 109 of file exception.h.

References cp0_status_um_bit, and istate::status.

Referenced by exc_dispatch().

static __native istate_get_pc istate_t istate  )  [static]
 

Definition at line 113 of file exception.h.

References istate::epc.

static void istate_set_retaddr istate_t istate,
__address  retaddr
[static]
 

Definition at line 103 of file exception.h.

References istate::epc.

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

void memsetw __address  dst,
size_t  cnt,
__u16  x
 

void msim_console void   ) 
 

Definition at line 106 of file msim.c.

References chardev_initialize(), console, cp0_unmask_int, int_register, msim_interrupt(), MSIM_KBD_IRQ, msim_ops, stdin, and stdout.

Referenced by console_init().

Here is the call graph for this function:

void msim_disable chardev_t dev  )  [static]
 

Definition at line 68 of file msim.c.

References cp0_mask_int, and MSIM_KBD_IRQ.

static char msim_do_read chardev_t dev  )  [static]
 

Read character using polling, assume interrupts disabled

Definition at line 75 of file msim.c.

References MSIM_KBD_ADDRESS.

void msim_enable chardev_t dev  )  [static]
 

Definition at line 62 of file msim.c.

References cp0_unmask_int, and MSIM_KBD_IRQ.

static void msim_interrupt int  n,
istate_t istate
[static]
 

Process keyboard interrupt.

Definition at line 92 of file msim.c.

References chardev_push_character(), console, and MSIM_KBD_ADDRESS.

Referenced by msim_console(), and msim_kbd_grab().

Here is the call graph for this function:

void msim_kbd_grab void   ) 
 

Definition at line 119 of file msim.c.

References int_register, msim_interrupt(), MSIM_KBD_IRQ, and oldvector.

Referenced by arch_grab_console().

Here is the call graph for this function:

void msim_kbd_release void   ) 
 

Definition at line 123 of file msim.c.

References int_register, MSIM_KBD_IRQ, and oldvector.

Referenced by arch_release_console().

void msim_write chardev_t dev,
const char  ch
[static]
 

Putchar that works with MSIM & gxemul

Definition at line 56 of file msim.c.

References MSIM_VIDEORAM.

static void print_regdump istate_t istate  )  [static]
 

Definition at line 70 of file exception.c.

References istate::epc, get_symtab_entry(), printf(), istate::ra, and istate::sp.

Referenced by unhandled_exception().

Here is the call graph for this function:

static void reserved_instr_exception int  n,
istate_t istate
[static]
 

Definition at line 93 of file exception.c.

References ASSERT, istate::epc, istate::k1, THREAD, unhandled_exception(), and istate::v1.

Referenced by exception_init().

Here is the call graph for this function:

void serial_console void   ) 
 

Definition at line 127 of file serial.c.

References chardev_initialize(), console, chardev::data, int_register, kb_enabled, old_timer, sconf, serial_ops, stdin, stdout, TIMER_IRQ, and timer_replace().

Referenced by console_init().

Here is the call graph for this function:

static void serial_disable chardev_t d  )  [static]
 

Definition at line 62 of file serial.c.

References kb_enabled.

static char serial_do_read chardev_t dev  )  [static]
 

Read character from serial port, wait until available

Definition at line 80 of file serial.c.

References chardev::data, serial_t::port, SERIAL_READ, and SERIAL_READ_LSR.

static void serial_enable chardev_t d  )  [static]
 

Definition at line 57 of file serial.c.

References kb_enabled.

int serial_init void   ) 
 

Definition at line 67 of file serial.c.

References serial_t::irq, serial_t::port, sconf, SERIAL_COM1, SERIAL_COM1_IRQ, and SERIAL_READ_LSR.

Referenced by console_init().

static void serial_interrupt int  n,
void *  stack
[static]
 

Process keyboard interrupt. Does not work in simics?

Definition at line 96 of file serial.c.

References chardev_push_character(), console, chardev::data, serial_t::port, SERIAL_READ, and SERIAL_READ_LSR.

Here is the call graph for this function:

static void serial_write chardev_t d,
const char  ch
[static]
 

Definition at line 45 of file serial.c.

References chardev::data, serial_t::port, SERIAL_READ_LSR, SERIAL_WRITE, and TRANSMIT_EMPTY_BIT.

__native sys_tls_set __native  addr  ) 
 

Set thread-local-storage pointer

We have it currently in K1, it is possible to have it separately in the future.

Definition at line 178 of file mips32.c.

static void syscall_exception int  n,
istate_t istate
[static]
 

Handle syscall userspace call

Definition at line 151 of file exception.c.

References panic.

Referenced by exception_init().

static void timer_replace int  n,
istate_t istate
[static]
 

Do polling on timer interrupt

Definition at line 358 of file arc.c.

References arc_keyboard_poll(), and old_timer.

Referenced by arc_console(), and serial_console().

Here is the call graph for this function:

void tlb_refill_entry void   ) 
 

Referenced by arch_pre_mm_init().

static void tlbinv_exception int  n,
istate_t istate
[static]
 

Definition at line 120 of file exception.c.

References tlb_invalid().

Referenced by exception_init().

Here is the call graph for this function:

static void tlbmod_exception int  n,
istate_t istate
[static]
 

Definition at line 115 of file exception.c.

References tlb_modified().

Referenced by exception_init().

Here is the call graph for this function:

static void unhandled_exception int  n,
istate_t istate
[static]
 

Definition at line 85 of file exception.c.

References exctable, fault_if_from_uspace, panic, and print_regdump().

Referenced by exception_init(), and reserved_instr_exception().

Here is the call graph for this function:

void userspace uspace_arg_t uarg  ) 
 

Switch to user-space (CPU user priviledge level)

Definition at line 144 of file mips32.c.

References cp0_status_exl_exception_bit, cp0_status_ie_enabled_bit, cp0_status_um_bit, PAGE_SIZE, userspace_asm(), uspace_arg::uspace_entry, uspace_arg::uspace_stack, and uspace_arg::uspace_uarg.

Referenced by uinit().

Here is the call graph for this function:

void userspace_asm __address  ustack,
__address  uspace_uarg,
__address  entry
 

Referenced by userspace().


Variable Documentation

arc_func_vector_t* arc_entry [static]
 

Definition at line 110 of file arc.c.

Referenced by arc_frame_init(), arc_init(), arc_keyboard_poll(), arc_print_confdata(), arc_putchar(), arc_read(), cmd_arc_print_devices(), cmd_arc_print_memmap(), and cmd_reboot().

chardev_operations_t arc_ops [static]
 

Initial value:

 {
        .resume = arc_enable,
        .suspend = arc_disable,
        .write = arc_write,
        .read = arc_read
}

Definition at line 349 of file arc.c.

Referenced by arc_console().

char* basetypes[] [static]
 

Initial value:

 {
        "ExceptionBlock",
        "SystemParameterBlock",
        "FreeContiguous",
        "FreeMemory",
        "BadMemory",
        "LoadedProgram",
        "FirmwareTemporary",
        "FirmwarePermanent"
}

Definition at line 51 of file arc.c.

Referenced by cmd_arc_print_memmap().

bootinfo_t bootinfo
 

Definition at line 70 of file mips32.c.

Referenced by arch_pre_main().

chardev_t console [static]
 

Definition at line 41 of file serial.c.

chardev_t console [static]
 

Definition at line 41 of file msim.c.

chardev_t console [static]
 

Definition at line 290 of file arc.c.

Referenced by arc_console(), arc_keyboard_poll(), msim_console(), msim_interrupt(), serial_console(), and serial_interrupt().

char* ctypes[] [static]
 

Definition at line 62 of file arc.c.

Referenced by arc_print_component().

cmd_info_t devlist_info [static]
 

Initial value:

 {
        .name = "arcdevlist",
        .description = "Print arc device list",
        .func = cmd_arc_print_devices,
        .argc = 0
}

Definition at line 202 of file arc.c.

Referenced by arc_init().

char* exctable[] [static]
 

Initial value:

 {
        "Interrupt","TLB Modified","TLB Invalid","TLB Invalid Store",
                "Address Error - load/instr. fetch",
                "Address Error - store",
                "Bus Error - fetch instruction",
                "Bus Error - data reference",
                "Syscall",
                "BreakPoint",
                "Reserved Instruction",
                "Coprocessor Unusable",
                "Arithmetic Overflow",
                "Trap",
                "Virtual Coherency - instruction",
                "Floating Point",
                NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                "WatchHi/WatchLo", 
                NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                "Virtual Coherency - data",
}

Definition at line 50 of file exception.c.

Referenced by unhandled_exception().

struct data_t imp_data[] [static]
 

Definition at line 50 of file cpu.c.

struct data_t imp_data80[] [static]
 

Initial value:

 {
        { "MIPS", "4Kc" },  
        {"Invalid","Invalid"}, 
        {"Invalid","Invalid"}, 
        {"MIPS","4Km & 4Kp"}, 
        { NULL, NULL}
}

Definition at line 90 of file cpu.c.

Referenced by cpu_print_report().

bool kb_enabled [static]
 

Definition at line 43 of file serial.c.

Referenced by serial_console(), serial_disable(), and serial_enable().

bool kbd_polling_enabled [static]
 

Definition at line 289 of file arc.c.

cmd_info_t memmap_info [static]
 

Initial value:

 {
        .name = "arcmemmap",
        .description = "Print arc memory map",
        .func = cmd_arc_print_memmap,
        .argc = 0
}

Definition at line 229 of file arc.c.

Referenced by arc_init().

chardev_operations_t msim_ops [static]
 

Initial value:

 {
        .resume = msim_enable,
        .suspend = msim_disable,
        .write = msim_write,
        .read = msim_do_read,
}

Definition at line 48 of file msim.c.

Referenced by msim_console().

iroutine old_timer
 

Definition at line 119 of file serial.c.

iroutine old_timer
 

Definition at line 356 of file arc.c.

Referenced by serial_console(), and timer_replace().

iroutine oldvector [static]
 

Definition at line 118 of file msim.c.

Referenced by msim_kbd_grab(), and msim_kbd_release().

cmd_info_t reboot_info [static]
 

Initial value:

 {
        .name = "reboot",
        .description = "Reboot computer",
        .func = cmd_reboot,
        .argc = 0
}

Definition at line 254 of file arc.c.

Referenced by arc_init().

arc_sbp* sbp = (arc_sbp *)PA2KA(0x1000) [static]
 

Definition at line 109 of file arc.c.

Referenced by arc_enabled(), and arc_init().

serial_t sconf[SERIAL_MAX] [static]
 

Definition at line 42 of file serial.c.

Referenced by serial_console(), and serial_init().

chardev_operations_t serial_ops [static]
 

Initial value:

 {
        .resume = serial_enable,
        .suspend = serial_disable,
        .write = serial_write,
        .read = serial_do_read
}

Definition at line 112 of file serial.c.

Referenced by serial_console().


Generated on Sun Jun 18 17:16:28 2006 for HelenOS Kernel (mips32) by  doxygen 1.4.6