Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2213 → Rev 2214

/branches/arm/kernel/arch/arm32/include/interrupt.h
1,5 → 1,5
/*
* Copyright (c) 2005 Jakub Jermar
* Copyright (c) 2007 Michal Kebrt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
39,6 → 39,8
#define IVT_ITEMS 0 /* TODO */
#define IVT_FIRST 0 /* TODO */
 
void interrupt_init(void);
 
#endif
 
/** @}
/branches/arm/kernel/arch/arm32/include/drivers/msim_gxemul.h
File deleted
/branches/arm/kernel/arch/arm32/include/drivers/gxemul.h
0,0 → 1,47
/*
* Copyright (c) 2007 Michal Kebrt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* - The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
/** @addtogroup arm32
* @{
*/
/** @file
*/
 
#ifndef KERN_arm32_MSIM_GXEMUL_H_
#define KERN_arm32_MSIM_GXEMUL_H_
 
#include <console/chardev.h>
 
void gxemul_console(devno_t devno);
void gxemul_kbd_release(void);
void gxemul_kbd_grab(void);
 
#endif
 
/** @}
*/
/branches/arm/kernel/arch/arm32/Makefile.inc
42,9 → 42,12
 
DEFS += -D__32_BITS__ -DMACHINE=$(MACHINE) -DKERNEL_LOAD_ADDRESS=$(KERNEL_LOAD_ADDRESS)
 
CONFIG_MSIM_GXEMUL = y
DEFS += -DCONFIG_MSIM_GXEMUL
CONFIG_GXEMUL = y
DEFS += -DCONFIG_GXEMUL
 
CONFIG_FB = y
DEFS += -DCONFIG_FB
 
## Compile with hierarchical page tables support.
#
 
78,7 → 81,7
arch/$(ARCH)/src/aux_print/printf.c \
arch/$(ARCH)/src/aux_print/io.c \
arch/$(ARCH)/src/console.c \
arch/$(ARCH)/src/drivers/msim_gxemul.c \
arch/$(ARCH)/src/drivers/gxemul.c \
arch/$(ARCH)/src/exception.c \
arch/$(ARCH)/src/mm/memory_init.c
/branches/arm/kernel/arch/arm32/src/console.c
34,11 → 34,11
 
#include <console/console.h>
#include <arch/console.h>
#include <arch/drivers/msim_gxemul.h>
#include <arch/drivers/gxemul.h>
 
void console_init(devno_t devno)
{
msim_gxemul_console(devno);
gxemul_console(devno);
}
 
/** Acquire console back for kernel
46,7 → 46,7
*/
void arch_grab_console(void)
{
msim_gxemul_kbd_grab();
gxemul_kbd_grab();
}
 
/** Return console to userspace
54,7 → 54,7
*/
void arch_release_console(void)
{
msim_gxemul_kbd_release();
gxemul_kbd_release();
}
 
/** @}
/branches/arm/kernel/arch/arm32/src/arm32.c
38,10 → 38,13
#include <config.h>
#include <arch/console.h>
#include <ddi/device.h>
 
#include "aux_print/printf.h"
#include <arch/interrupt.h>
#include <genarch/fb/fb.h>
#include <genarch/fb/visuals.h>
#include <print.h>
#include <config.h>
#include "aux_print/printf.h"
 
bootinfo_t bootinfo;
 
void arch_pre_main(void)
51,7 → 54,6
 
init.cnt = bootinfo.cnt;
 
printf("Used memmory\n");
for (i = 0; i < bootinfo.cnt; ++i) {
init.tasks[i].addr = bootinfo.tasks[i].addr;
init.tasks[i].size = bootinfo.tasks[i].size;
71,10 → 73,11
void arch_post_mm_init(void)
{
aux_printf("arch_post_mm_init\n");
// irq_init(8, 8); /// needs malloc ... so after mm init
// console_init(device_assign_devno()); // need hash table of irq ... so after irq_init
/* TODO */
 
interrupt_init();
console_init(device_assign_devno());
// fb_init(0x12000000, 640, 480, 1920, VISUAL_RGB_8_8_8);
 
}
 
void arch_post_cpu_init(void)
/branches/arm/kernel/arch/arm32/src/interrupt.c
1,5 → 1,5
/*
* Copyright (c) 2007 Petr Stepan
* Copyright (c) 2007 Petr Stepan, Michal Kebrt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
32,10 → 32,14
/** @file
*/
 
#include<arch/asm.h>
#include<arch/regutils.h>
#include <arch/asm.h>
#include <arch/regutils.h>
#include <interrupt.h>
 
 
#define IRQ_COUNT 8
 
 
/** Disable interrupts.
*
* @return Old interrupt priority level.
81,5 → 85,9
return current_status_reg_read();
}
 
void interrupt_init(void) {
irq_init(IRQ_COUNT, IRQ_COUNT);
}
 
/** @}
*/
/branches/arm/kernel/arch/arm32/src/drivers/msim_gxemul.c
File deleted