Files | |
file | arch.h |
file | arg.h |
file | regname.h |
file | asm.h |
file | atomic.h |
file | barrier.h |
file | boot.h |
file | byteorder.h |
file | context.h |
file | cpu.h |
file | cpuid.h |
file | cuda.h |
file | pic.h |
file | elf.h |
file | exception.h |
file | faddr.h |
file | fpu_context.h |
file | memstr.h |
file | types.h |
file | cpu.c |
file | cuda.c |
file | pic.c |
file | ppc32.c |
Data Structures | |
struct | utask_t |
struct | taskmap_t |
struct | memzone_t |
struct | memmap_t |
struct | screen_t |
struct | keyboard_t |
struct | bootinfo_t |
struct | context |
struct | cpu_arch |
struct | cpu_info |
struct | istate |
struct | fpu_context |
struct | pte_t |
Defines | |
#define | cr0 0 |
#define | cr1 1 |
#define | cr2 2 |
#define | cr3 3 |
#define | cr4 4 |
#define | cr5 5 |
#define | cr6 6 |
#define | cr7 7 |
#define | r0 0 |
#define | r1 1 |
#define | r2 2 |
#define | r3 3 |
#define | r4 4 |
#define | r5 5 |
#define | r6 6 |
#define | r7 7 |
#define | r8 8 |
#define | r9 9 |
#define | r10 10 |
#define | r11 11 |
#define | r12 12 |
#define | r13 13 |
#define | r14 14 |
#define | r15 15 |
#define | r16 16 |
#define | r17 17 |
#define | r18 18 |
#define | r19 19 |
#define | r20 20 |
#define | r21 21 |
#define | r22 22 |
#define | r23 23 |
#define | r24 24 |
#define | r25 25 |
#define | r26 26 |
#define | r27 27 |
#define | r28 28 |
#define | r29 29 |
#define | r30 30 |
#define | r31 31 |
#define | sp 1 |
#define | fr0 0 |
#define | fr1 1 |
#define | fr2 2 |
#define | fr3 3 |
#define | fr4 4 |
#define | fr5 5 |
#define | fr6 6 |
#define | fr7 7 |
#define | fr8 8 |
#define | fr9 9 |
#define | fr10 10 |
#define | fr11 11 |
#define | fr12 12 |
#define | fr13 13 |
#define | fr14 14 |
#define | fr15 15 |
#define | fr16 16 |
#define | fr17 17 |
#define | fr18 18 |
#define | fr19 19 |
#define | fr20 20 |
#define | fr21 21 |
#define | fr22 22 |
#define | fr23 23 |
#define | fr24 24 |
#define | fr25 25 |
#define | fr26 26 |
#define | fr27 27 |
#define | fr28 28 |
#define | fr29 29 |
#define | fr30 30 |
#define | fr31 31 |
#define | vr0 0 |
#define | vr1 1 |
#define | vr2 2 |
#define | vr3 3 |
#define | vr4 4 |
#define | vr5 5 |
#define | vr6 6 |
#define | vr7 7 |
#define | vr8 8 |
#define | vr9 9 |
#define | vr10 10 |
#define | vr11 11 |
#define | vr12 12 |
#define | vr13 13 |
#define | vr14 14 |
#define | vr15 15 |
#define | vr16 16 |
#define | vr17 17 |
#define | vr18 18 |
#define | vr19 19 |
#define | vr20 20 |
#define | vr21 21 |
#define | vr22 22 |
#define | vr23 23 |
#define | vr24 24 |
#define | vr25 25 |
#define | vr26 26 |
#define | vr27 27 |
#define | vr28 28 |
#define | vr29 29 |
#define | vr30 30 |
#define | vr31 31 |
#define | evr0 0 |
#define | evr1 1 |
#define | evr2 2 |
#define | evr3 3 |
#define | evr4 4 |
#define | evr5 5 |
#define | evr6 6 |
#define | evr7 7 |
#define | evr8 8 |
#define | evr9 9 |
#define | evr10 10 |
#define | evr11 11 |
#define | evr12 12 |
#define | evr13 13 |
#define | evr14 14 |
#define | evr15 15 |
#define | evr16 16 |
#define | evr17 17 |
#define | evr18 18 |
#define | evr19 19 |
#define | evr20 20 |
#define | evr21 21 |
#define | evr22 22 |
#define | evr23 23 |
#define | evr24 24 |
#define | evr25 25 |
#define | evr26 26 |
#define | evr27 27 |
#define | evr28 28 |
#define | evr29 29 |
#define | evr30 30 |
#define | evr31 31 |
#define | xer 1 |
#define | lr 8 |
#define | ctr 9 |
#define | dec 22 |
#define | sdr1 25 |
#define | srr0 26 |
#define | srr1 27 |
#define | sprg0 272 |
#define | sprg1 273 |
#define | sprg2 274 |
#define | sprg3 275 |
#define | prv 287 |
#define | ibat0u 528 |
#define | ibat0l 529 |
#define | ibat1u 530 |
#define | ibat1l 531 |
#define | ibat2u 532 |
#define | ibat2l 533 |
#define | ibat3u 534 |
#define | ibat3l 535 |
#define | dbat0u 536 |
#define | dbat0l 537 |
#define | dbat1u 538 |
#define | dbat1l 539 |
#define | dbat2u 540 |
#define | dbat2l 541 |
#define | dbat3u 542 |
#define | dbat3l 543 |
#define | hid0 1008 |
#define | msr_ir (1 << 4) |
#define | msr_dr (1 << 5) |
#define | msr_pr (1 << 14) |
#define | msr_ee (1 << 15) |
#define | hid0_ice (1 << 15) |
#define | hid0_dce (1 << 14) |
#define | hid0_icfi (1 << 11) |
#define | hid0_dci (1 << 10) |
#define | CS_ENTER_BARRIER() asm volatile ("" ::: "memory") |
#define | CS_LEAVE_BARRIER() asm volatile ("" ::: "memory") |
#define | memory_barrier() asm volatile ("sync" ::: "memory") |
#define | read_barrier() asm volatile ("sync" ::: "memory") |
#define | write_barrier() asm volatile ("eieio" ::: "memory") |
#define | BOOT_OFFSET 0x8000 |
#define | TEMP_STACK_SIZE 0x100 |
#define | TASKMAP_MAX_RECORDS 32 |
#define | MEMMAP_MAX_RECORDS 32 |
#define | BIG_ENDIAN |
#define | SP_DELTA 16 |
#define | CUDA_IRQ 10 |
#define | PIC_HW_ADDR 0x80800000 |
#define | PIC_PENDING_LOW 8 |
#define | PIC_PENDING_HIGH 4 |
#define | PIC_MASK_LOW 9 |
#define | PIC_MASK_HIGH 5 |
#define | PIC_ACK_LOW 10 |
#define | PIC_ACK_HIGH 6 |
#define | ELF_MACHINE EM_PPC |
#define | ELF_DATA_ENCODING ELFDATA2MSB |
#define | ELF_CLASS ELFCLASS32 |
#define | FADDR(fptr) ((__address) (fptr)) |
#define | memcpy(dst, src, cnt) __builtin_memcpy((dst), (src), (cnt)) |
#define | NULL 0 |
#define | SPECIAL '?' |
#define | PACKET_ADB 0x00 |
#define | PACKET_CUDA 0x01 |
#define | CUDA_POWERDOWN 0x0a |
#define | RS 0x200 |
#define | B (0 * RS) |
#define | A (1 * RS) |
#define | SR (10 * RS) |
#define | ACR (11 * RS) |
#define | SR_OUT 0x10 |
#define | TACK 0x10 |
#define | TIP 0x20 |
Typedefs | |
typedef signed char | __s8 |
typedef signed short | __s16 |
typedef signed int | __s32 |
typedef signed long long | __s64 |
typedef unsigned char | __u8 |
typedef unsigned short | __u16 |
typedef unsigned int | __u32 |
typedef unsigned long long | __u64 |
typedef __u32 | __address |
typedef __u32 | pfn_t |
typedef __u32 | ipl_t |
typedef __u32 | __native |
Functions | |
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 void | cpu_sleep (void) |
void | cpu_halt (void) |
void | asm_delay_loop (__u32 t) |
void | userspace_asm (__address uspace_uarg, __address stack, __address entry) |
static void | atomic_inc (atomic_t *val) |
static void | atomic_dec (atomic_t *val) |
static long | atomic_postinc (atomic_t *val) |
static long | atomic_postdec (atomic_t *val) |
static long | atomic_preinc (atomic_t *val) |
static long | atomic_predec (atomic_t *val) |
static __u64 | __u64_le2host (__u64 n) |
static __native | __native_le2host (__native n) |
static void | cpu_version (struct cpu_info *info) |
void | cuda_init (__address base, size_t size) |
int | cuda_get_scancode (void) |
void | cuda_grab (void) |
void | cuda_release (void) |
void | pic_init (void) |
void | pic_enable_interrupt (int intnum) |
void | pic_disable_interrupt (int intnum) |
void | pic_ack_interrupt (int intnum) |
int | pic_get_pending (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 | 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 | cpu_arch_init (void) |
void | cpu_identify (void) |
void | cpu_print_report (cpu_t *m) |
void | send_packet (const __u8 kind, index_t count,...) |
static void | receive_packet (__u8 *kind, index_t count, __u8 data[]) |
static void | cuda_resume (chardev_t *d) |
static void | cuda_suspend (chardev_t *d) |
static char | key_read (chardev_t *d) |
static void | cuda_irq (int n, istate_t *istate) |
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 | calibrate_delay_loop (void) |
void | userspace (uspace_arg_t *kernel_uarg) |
void | arch_grab_console (void) |
void | arch_release_console (void) |
Variables | |
bootinfo_t | bootinfo |
context | packed |
cpu_info | packed |
fpu_context | packed |
static volatile __u8 * | cuda = NULL |
static iroutine | vector |
static char | lchars [0x80] |
static chardev_t | kbrd |
static chardev_operations_t | ops |
static volatile __u32 * | pic |
bootinfo_t | bootinfo |
|
|
|
Definition at line 55 of file cuda.c. Referenced by send_packet(). |
|
Definition at line 52 of file cuda.c. Referenced by receive_packet(), and send_packet(). |
|
Definition at line 41 of file byteorder.h. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 38 of file barrier.h. Referenced by spinlock_trylock(). |
|
Definition at line 39 of file barrier.h. Referenced by spinlock_unlock(). |
|
|
|
Definition at line 41 of file cuda.h. Referenced by cuda_grab(), cuda_init(), and cuda_release(). |
|
Definition at line 49 of file cuda.c. Referenced by cpu_halt(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 40 of file elf.h. Referenced by elf_load(). |
|
Definition at line 39 of file elf.h. Referenced by elf_load(). |
|
Definition at line 38 of file elf.h. Referenced by elf_load(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 40 of file faddr.h. Referenced by main_ap(), scheduler(), and thread_create(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 38 of file memstr.h. Referenced by _bubblesort(), _qsort(), clear_screen(), ptl0_create(), scroll_screen(), sys_ipc_answer(), sys_ipc_answer_fast(), thread_create(), and vsnprintf_write(). |
|
|
|
Definition at line 41 of file barrier.h. Referenced by preemption_disable(), and preemption_enable(). |
|
|
|
|
|
|
|
|
|
|
Definition at line 46 of file cuda.c. Referenced by cuda_get_scancode(). |
|
Definition at line 47 of file cuda.c. Referenced by cpu_halt(). |
|
Definition at line 46 of file pic.h. Referenced by pic_ack_interrupt(). |
|
Definition at line 45 of file pic.h. Referenced by pic_ack_interrupt(). |
|
Definition at line 39 of file pic.h. Referenced by pic_init(). |
|
Definition at line 44 of file pic.h. Referenced by pic_disable_interrupt(), and pic_enable_interrupt(). |
|
Definition at line 43 of file pic.h. Referenced by pic_disable_interrupt(), and pic_enable_interrupt(). |
|
Definition at line 42 of file pic.h. Referenced by pic_get_pending(). |
|
Definition at line 41 of file pic.h. Referenced by pic_get_pending(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 190 of file regname.h. Referenced by pht_insert(), and pht_real_insert(). |
|
|
|
Definition at line 42 of file context.h. Referenced by before_thread_runs_arch(), and userspace(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 54 of file cuda.c. Referenced by receive_packet(), and send_packet(). |
|
Definition at line 57 of file cuda.c. Referenced by send_packet(). |
|
|
|
|
|
Definition at line 58 of file cuda.c. Referenced by send_packet(). |
|
|
|
|
|
Definition at line 59 of file cuda.c. Referenced by receive_packet(), and send_packet(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 43 of file barrier.h. Referenced by clock_update_counters(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Convert little-endian __native to host __native Convert little-endian __native parameter to host endianess.
Definition at line 58 of file byteorder.h. |
|
Definition at line 43 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: |
|
Acquire console back for kernel Definition at line 110 of file ppc32.c. References cuda_grab(). Referenced by sys_debug_enable_console(). Here is the call graph for this function: |
|
Definition at line 70 of file ppc32.c. References keyboard_t::addr, screen_t::addr, bootinfo, screen_t::bpp, config, config_t::cpu_active, cuda_init(), fb_init(), screen_t::height, bootinfo_t::keyboard, pic_init(), screen_t::scanline, bootinfo_t::screen, keyboard_t::size, screen_t::width, and zone_merge_all(). Referenced by main_ap(), and main_bsp_separated_stack(). Here is the call graph for this function: |
|
|
|
Definition at line 48 of file ppc32.c. References utask_t::addr, init_task_t::addr, bootinfo, init_t::cnt, taskmap_t::count, init, utask_t::size, init_task_t::size, bootinfo_t::taskmap, taskmap_t::tasks, and init_t::tasks. |
|
Definition at line 61 of file ppc32.c. References interrupt_init(), and start_decrementer(). Referenced by main_ap(), and main_bsp_separated_stack(). Here is the call graph for this function: |
|
Definition at line 85 of file ppc32.c. References memory_print_map(). Referenced by main_bsp_separated_stack(). Here is the call graph for this function: |
|
Return console to userspace Definition at line 118 of file ppc32.c. References cuda_release(). Referenced by cmd_continue(). Here is the call graph for this function: |
|
Referenced by delay(). |
|
Definition at line 54 of file atomic.h. References atomic::count. Referenced by _slab_free(), atomic_postdec(), atomic_predec(), 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(). |
|
Definition at line 38 of file atomic.h. References atomic::count. Referenced by _ipc_call(), atomic_postinc(), atomic_preinc(), ipc_backsend_err(), magazine_obj_put(), put_mag_to_cache(), slab_alloc(), slab_space_alloc(), and thread_ready(). |
|
Definition at line 76 of file atomic.h. References atomic_dec(), and atomic::count. Here is the call graph for this function: |
|
Definition at line 70 of file atomic.h. References atomic_inc(), and atomic::count. Here is the call graph for this function: |
|
Definition at line 88 of file atomic.h. References atomic_dec(), and atomic::count. Here is the call graph for this function: |
|
Definition at line 82 of file atomic.h. References atomic_inc(), and atomic::count. Referenced by check_call_limit(), ipc_irq_send_msg(), and ipc_irq_send_notif(). Here is the call graph for this function: |
|
Definition at line 94 of file ppc32.c. Referenced by main_ap(), and main_bsp_separated_stack(). |
|
|
|
Definition at line 317 of file cuda.c. References CUDA_POWERDOWN, PACKET_CUDA, and send_packet(). Referenced by _getc(), and halt(). Here is the call graph for this function: |
|
Definition at line 48 of file cpu.c. References CPU, cpu_version(), and info. Here is the call graph for this function: |
|
Definition at line 57 of file cpu.c. References cpu::arch, cpu::id, printf(), cpu_arch::revision, and cpu_arch::version. Referenced by cpu_list(). Here is the call graph for this function: |
|
Definition at line 143 of file asm.h. Referenced by find_best_thread(). |
|
Definition at line 45 of file cpuid.h. Referenced by cpu_identify(). |
|
Definition at line 238 of file cuda.c. References PACKET_ADB, and receive_packet(). Referenced by code_execute(), and cuda_irq(). Here is the call graph for this function: |
|
Initialize keyboard and service interrupts using kernel routine Definition at line 264 of file cuda.c. References cuda_irq(), CUDA_IRQ, int_register, and vector. Referenced by arch_grab_console(). Here is the call graph for this function: |
|
Definition at line 278 of file cuda.c. References chardev_initialize(), cuda, cuda_irq(), CUDA_IRQ, hw_map(), int_register, kbrd, NULL, ops, pic_enable_interrupt(), stdin, and sysinfo_set_item_val(). Referenced by arch_post_mm_init(). Here is the call graph for this function: |
|
Definition at line 251 of file cuda.c. References chardev_push_character(), cuda_get_scancode(), kbrd, and lchars. Referenced by cuda_grab(), and cuda_init(). Here is the call graph for this function: |
|
Resume the former interrupt vector Definition at line 271 of file cuda.c. References CUDA_IRQ, int_register, and vector. Referenced by arch_release_console(). |
|
|
|
|
|
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 131 of file asm.h. References STACK_SIZE. |
|
Disable interrupts. Disable interrupts and return previous value of EE.
|
|
Enable interrupts. Enable interrupts and return previous value of EE.
|
|
Return interrupt priority level. Return EE.
|
|
Restore interrupt priority level. Restore EE.
|
|
Return true if exception happened while in userspace Definition at line 91 of file exception.h. References panic. Referenced by exc_dispatch(). |
|
Definition at line 96 of file exception.h. References istate::pc. |
|
Definition at line 85 of file exception.h. References istate::pc. |
|
|
|
|
|
|
|
|
Definition at line 69 of file pic.c. References pic, PIC_ACK_HIGH, and PIC_ACK_LOW. Referenced by exception_external(). |
|
Definition at line 60 of file pic.c. References pic, PIC_MASK_HIGH, and PIC_MASK_LOW. |
|
Definition at line 50 of file pic.c. References pic, PIC_MASK_HIGH, and PIC_MASK_LOW. Referenced by cuda_init(). |
|
Return number of pending interrupt Definition at line 78 of file pic.c. References fnzb32(), pic, PIC_PENDING_HIGH, and PIC_PENDING_LOW. Referenced by exception_external(). Here is the call graph for this function: |
|
Definition at line 43 of file pic.c. References hw_map(), PAGE_SIZE, pic, and PIC_HW_ADDR. Referenced by arch_post_mm_init(). Here is the call graph for this function: |
|
Definition at line 196 of file cuda.c. References B, cuda, SR, and TIP. Referenced by cuda_get_scancode(). |
|
Definition at line 293 of file cuda.c. References ACR, B, cuda, SR, SR_OUT, TACK, TIP, va_arg, and va_start. Referenced by cpu_halt(). |
|
Switch to user-space (CPU user priviledge level) Definition at line 98 of file ppc32.c. References SP_DELTA, THREAD_STACK_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: |
|
Referenced by userspace(). |
|
Definition at line 46 of file ppc32.c. Referenced by arch_post_mm_init(), arch_pre_main(), frame_arch_init(), get_memory_size(), and memory_print_map(). |
|
Definition at line 46 of file ppc32.c. Referenced by arch_post_mm_init(), arch_pre_main(), frame_arch_init(), get_memory_size(), and memory_print_map(). |
|
Definition at line 62 of file cuda.c. Referenced by cuda_init(), receive_packet(), and send_packet(). |
|
Definition at line 230 of file cuda.c. Referenced by cuda_init(), and cuda_irq(). |
|
Definition at line 66 of file cuda.c. Referenced by cuda_irq(). |
|
Initial value: { .suspend = cuda_suspend, .resume = cuda_resume, .read = key_read } Definition at line 231 of file cuda.c. Referenced by cuda_init(). |
|
|
|
|
|
|
|
Definition at line 41 of file pic.c. Referenced by pic_ack_interrupt(), pic_disable_interrupt(), pic_enable_interrupt(), pic_get_pending(), and pic_init(). |
|
Definition at line 63 of file cuda.c. Referenced by cuda_grab(), and cuda_release(). |