/branches/dynload/kernel/arch/mips32/include/types.h |
---|
57,7 → 57,9 |
typedef uint32_t unative_t; |
typedef int32_t native_t; |
typedef uintptr_t ioport_t; |
typedef volatile uint8_t ioport8_t; |
typedef volatile uint16_t ioport16_t; |
typedef volatile uint32_t ioport32_t; |
typedef struct { |
} fncptr_t; |
/branches/dynload/kernel/arch/mips32/include/asm.h |
---|
75,16 → 75,36 |
extern ipl_t interrupts_read(void); |
extern void asm_delay_loop(uint32_t t); |
static inline void pio_write_8(ioport_t port, uint8_t v) |
static inline void pio_write_8(ioport8_t *port, uint8_t v) |
{ |
/* XXX */ |
*port = v; |
} |
static inline uint8_t pio_read_8(ioport_t port) |
static inline void pio_write_16(ioport16_t *port, uint16_t v) |
{ |
return 0; /* XXX */ |
*port = v; |
} |
static inline void pio_write_32(ioport32_t *port, uint32_t v) |
{ |
*port = v; |
} |
static inline uint8_t pio_read_8(ioport8_t *port) |
{ |
return *port; |
} |
static inline uint16_t pio_read_16(ioport16_t *port) |
{ |
return *port; |
} |
static inline uint32_t pio_read_32(ioport32_t *port) |
{ |
return *port; |
} |
#endif |
/** @} |
/branches/dynload/kernel/arch/mips32/include/mm/frame.h |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup mips32mm |
/** @addtogroup mips32mm |
* @{ |
*/ |
/** @file |
46,8 → 46,6 |
extern void frame_arch_init(void); |
extern void physmem_print(void); |
extern uintptr_t end_frame; |
#endif /* __ASM__ */ |
#endif /* KERNEL */ |
/branches/dynload/kernel/arch/mips32/src/mm/frame.c |
---|
26,7 → 26,7 |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup mips32mm |
/** @addtogroup mips32mm |
* @{ |
*/ |
/** @file |
65,9 → 65,7 |
static count_t phys_regions_count = 0; |
static phys_region_t phys_regions[MAX_REGIONS]; |
uintptr_t end_frame = 0; |
/** Check whether frame is available |
* |
* Returns true if given frame is generally available for use. |
220,7 → 218,7 |
ZERO_PAGE_VALUE = 0xdeadbeef; |
if (ZERO_PAGE_VALUE != 0xdeadbeef) |
avail = false; |
#if defined(lgxemul) || defined(bgxemul) |
#if defined(MACHINE_lgxemul) || defined(MACHINE_bgxemul) |
else { |
ZERO_PAGE_VALUE_KSEG1(frame) = 0xaabbccdd; |
if (ZERO_PAGE_VALUE_KSEG1(frame) != 0xaabbccdd) |
238,10 → 236,8 |
} |
} |
end_frame = frame; |
frame_add_region(start_frame, frame); |
frame_add_region(start_frame, end_frame); |
/* Blacklist interrupt vector frame */ |
frame_mark_unavailable(0, 1); |
/branches/dynload/kernel/arch/mips32/src/mm/page.c |
---|
51,11 → 51,5 |
return physaddr + 0xa0000000; |
} |
void hw_area(uintptr_t *physaddr, pfn_t *frames) |
{ |
*physaddr = end_frame; |
*frames = ADDR2PFN(0xffffffff - end_frame); |
} |
/** @} |
*/ |
/branches/dynload/kernel/arch/mips32/src/interrupt.c |
---|
101,7 → 101,7 |
cp0_compare_write(nextcount); |
} |
static irq_ownership_t timer_claim(void *instance) |
static irq_ownership_t timer_claim(irq_t *irq) |
{ |
return IRQ_ACCEPT; |
} |
/branches/dynload/kernel/arch/mips32/src/drivers/serial.c |
---|
34,7 → 34,6 |
#include <interrupt.h> |
#include <arch/cp0.h> |
#include <ipc/irq.h> |
#include <arch/drivers/serial.h> |
#include <console/chardev.h> |
#include <console/console.h> |
114,13 → 113,10 |
/** Process keyboard interrupt. Does not work in simics? */ |
static void serial_irq_handler(irq_t *irq) |
{ |
if ((irq->notif_cfg.notify) && (irq->notif_cfg.answerbox)) |
ipc_irq_send_notif(irq); |
else |
serial_handler(); |
serial_handler(); |
} |
static irq_ownership_t serial_claim(void *instance) |
static irq_ownership_t serial_claim(irq_t *irq) |
{ |
return IRQ_ACCEPT; |
} |
/branches/dynload/kernel/arch/mips32/src/drivers/msim.c |
---|
33,7 → 33,6 |
*/ |
#include <interrupt.h> |
#include <ipc/irq.h> |
#include <console/chardev.h> |
#include <arch/drivers/msim.h> |
#include <arch/cp0.h> |
95,21 → 94,17 |
/** Process keyboard interrupt. */ |
static void msim_irq_handler(irq_t *irq) |
{ |
if ((irq->notif_cfg.notify) && (irq->notif_cfg.answerbox)) |
ipc_irq_send_notif(irq); |
else { |
char ch = 0; |
char ch = 0; |
ch = *((char *) MSIM_KBD_ADDRESS); |
if (ch =='\r') |
ch = '\n'; |
if (ch == 0x7f) |
ch = '\b'; |
chardev_push_character(&console, ch); |
} |
ch = *((char *) MSIM_KBD_ADDRESS); |
if (ch =='\r') |
ch = '\n'; |
if (ch == 0x7f) |
ch = '\b'; |
chardev_push_character(&console, ch); |
} |
static irq_ownership_t msim_claim(void *instance) |
static irq_ownership_t msim_claim(irq_t *irq) |
{ |
return IRQ_ACCEPT; |
} |