ppc-hw.c File Reference

#include <os_config.h>
#include <config/config_param.h>
#include <config/config_cparam.h>
#include <sys/ktypes.h>
#include <xparameters.h>
#include <sys/process.h>
#include <xil_exception.h>
#include <xtime_l.h>
#include <xpseudo_asm.h>
#include <sys/syscall.h>
#include <sys/decls.h>
#include <xreg405.h>
#include <stdio.h>

Functions

void hw_init (void)
void pit_initialize (unsigned int interval)
void pit_reset (void)
void timer_int_handler (int)
void xmk_enter_kernel (void)
void xmk_leave_kernel (void)

Variables

char timer_need_refresh
 Ticks since kernel startup.
unsigned char sched_partial_tick
 Do we need a reset?

Detailed Description

PPC Hardware initialization

Function Documentation

void hw_init void   ) 
 

Microblaze hardware specific initialization

  • If an interrupt controller is present register interrupt controller handler as the main interrupt handler. Register timer with interrupt controller handler
  • Else, Register timer interrupt handler as the main interrupt handler
  • Configure PIT is timer is PIT.
    Parameters:
    none 
    Returns:
  • nothing
    Note:
  • none

void pit_initialize unsigned int  interval  ) 
 

Initialize the PIT timer in the system

Parameters:
interval is the interval to interrupt the system at.
Returns:
  • nothing
Note:
  • none

void pit_reset void   ) 
 

Enable and start PIT timer with configured PIT interval loaded to the PIT counter

Parameters:
none 
Returns:
  • nothing
Note:
  • none

void timer_int_handler int  irq_num  ) 
 

System timer interrupt handler

  • Do a rescheduling operation
  • If a context switch occurs within this routine,
    • When returning out of process_scheduler, process executing will return in the appropriate context when it was switched out on a previous flow through this execution path.
  • Reset PIT interval to start a full time slice (if PIT in the system) (if INTC not present)
    Parameters:
    none 
    Returns:
  • nothing
    Note:
  • May NOT return from this routine if a NEW process context is scheduled in the scheduler
  • A context switch does not occur within this routine if an INTC is present. The switch occurs at the end of the INTC ISR.

void xmk_enter_kernel void   )  [inline]
 

Lock kernel by turning off ALL system interrupts

Returns:
  • Nothing
Note:
  • Locks kernel against ALL interrupts.
  • Does not lock against critical interrupts.

void xmk_leave_kernel void   )  [inline]
 

Unlock kernel by turning on system timer interrupts

Returns:
  • Nothing
Note:
  • Unlocks kernel with respect to ALL interrupts except critical interrupts


Generated on Thu Feb 13 14:46:24 2014 for 2014.1_doc by  doxygen 1.4.5