Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4342 → Rev 4343

/branches/dynload/kernel/arch/sparc64/include/cpu_node.h
55,4 → 55,5
#endif
 
/** @}
*/
*/
 
/branches/dynload/kernel/arch/sparc64/include/arch.h
45,6 → 45,12
 
#define NWINDOWS 8 /** Number of register window sets. */
 
#ifndef __ASM__
 
extern void arch_pre_main(void);
 
#endif /* __ASM__ */
 
#endif
 
/** @}
/branches/dynload/kernel/arch/sparc64/include/asm.h
44,25 → 44,25
#include <arch/stack.h>
#include <arch/barrier.h>
 
static inline void outb(ioport_t port, uint8_t v)
static inline void pio_write_8(ioport_t port, uint8_t v)
{
*((volatile uint8_t *)(port)) = v;
memory_barrier();
}
 
static inline void outw(ioport_t port, uint16_t v)
static inline void pio_write_16(ioport_t port, uint16_t v)
{
*((volatile uint16_t *)(port)) = v;
memory_barrier();
}
 
static inline void outl(ioport_t port, uint32_t v)
static inline void pio_write_32(ioport_t port, uint32_t v)
{
*((volatile uint32_t *)(port)) = v;
memory_barrier();
}
 
static inline uint8_t inb(ioport_t port)
static inline uint8_t pio_read_8(ioport_t port)
{
uint8_t rv;
 
72,7 → 72,7
return rv;
}
 
static inline uint16_t inw(ioport_t port)
static inline uint16_t pio_read_16(ioport_t port)
{
uint16_t rv;
 
82,7 → 82,7
return rv;
}
 
static inline uint32_t inl(ioport_t port)
static inline uint32_t pio_read_32(ioport_t port)
{
uint32_t rv;
 
/branches/dynload/kernel/arch/sparc64/include/mm/frame.h
73,6 → 73,7
typedef union frame_address frame_address_t;
 
extern uintptr_t last_frame;
extern uintptr_t end_frame;
extern void frame_arch_init(void);
#define physmem_print()
 
/branches/dynload/kernel/arch/sparc64/include/cpu_family.h
79,4 → 79,5
#endif
 
/** @}
*/
*/
 
/branches/dynload/kernel/arch/sparc64/src/console.c
141,32 → 141,10
{
thread_detach(THREAD);
 
#ifdef CONFIG_Z8530
if (kbd_type == KBD_Z8530) {
/*
* The z8530 driver is interrupt-driven.
*/
if (kbd_type != KBD_SGCN)
return;
}
#endif
 
#ifdef CONFIG_NS16550
#ifdef CONFIG_NS16550_INTERRUPT_DRIVEN
if (kbd_type == KBD_NS16550) {
/*
* The ns16550 driver is interrupt-driven.
*/
return;
}
#endif
#endif
while (1) {
#ifdef CONFIG_NS16550
#ifndef CONFIG_NS16550_INTERRUPT_DRIVEN
if (kbd_type == KBD_NS16550)
ns16550_poll();
#endif
#endif
#ifdef CONFIG_SGCN
if (kbd_type == KBD_SGCN)
sgcn_poll();
/branches/dynload/kernel/arch/sparc64/src/sparc64.c
103,7 → 103,6
{
static thread_t *t = NULL;
 
 
if (!t) {
/*
* Create thread that polls keyboard.
/branches/dynload/kernel/arch/sparc64/src/trap/interrupt.c
86,7 → 86,7
/*
* The IRQ handler was found.
*/
irq->handler(irq, irq->arg);
irq->handler(irq);
/*
* See if there is a clear-interrupt-routine and call it.
*/
/branches/dynload/kernel/arch/sparc64/src/mm/frame.c
41,6 → 41,7
#include <macros.h>
 
uintptr_t last_frame = NULL;
uintptr_t end_frame = NULL;
 
/** Create memory zones according to information stored in bootinfo.
*
80,6 → 81,7
frame_mark_unavailable(ADDR2PFN(KA2PA(PFN2ADDR(0))), 1);
}
end_frame = last_frame;
}
 
/** @}
/branches/dynload/kernel/arch/sparc64/src/mm/page.c
147,7 → 147,7
physaddr + i * sizemap[order].increment,
sizemap[order].pagesize_code, true, false);
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
/*
* Second, save the information about the mapping for APs.
*/
164,6 → 164,11
return virtaddr;
}
 
void hw_area(uintptr_t *physaddr, pfn_t *frames)
{
*physaddr = end_frame;
*frames = ADDR2PFN(0x7ffffffffff - end_frame);
}
 
/** @}
*/
 
/branches/dynload/kernel/arch/sparc64/src/drivers/sgcn.c
161,19 → 161,10
chardev_t sgcn_io;
 
/**
* Registers the physical area of the SRAM so that the userspace SGCN
* driver can map it. Moreover, it sets some sysinfo values (SRAM address
* and SRAM size).
* Set some sysinfo values (SRAM address and SRAM size).
*/
static void register_sram_parea(uintptr_t sram_begin_physical)
static void register_sram(uintptr_t sram_begin_physical)
{
static parea_t sram_parea;
sram_parea.pbase = sram_begin_physical;
sram_parea.vbase = (uintptr_t) sram_begin;
sram_parea.frames = MAPPED_AREA_SIZE / FRAME_SIZE;
sram_parea.cacheable = false;
ddi_parea_register(&sram_parea);
sysinfo_set_item_val("sram.area.size", NULL, MAPPED_AREA_SIZE);
sysinfo_set_item_val("sram.address.physical", NULL,
sram_begin_physical);
211,7 → 202,7
+ *((uint32_t *) iosram_toc->value);
sram_begin = hw_map(sram_begin_physical, MAPPED_AREA_SIZE);
register_sram_parea(sram_begin_physical);
register_sram(sram_begin_physical);
}
 
/**
319,7 → 310,7
/**
* The driver works in polled mode, so no interrupt should be handled by it.
*/
static irq_ownership_t sgcn_claim(void)
static irq_ownership_t sgcn_claim(void *instance)
{
return IRQ_DECLINE;
}
327,7 → 318,7
/**
* The driver works in polled mode, so no interrupt should be handled by it.
*/
static void sgcn_irq_handler(irq_t *irq, void *arg, ...)
static void sgcn_irq_handler(irq_t *irq)
{
panic("Not yet implemented, SGCN works in polled mode.");
}