Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 891 → Rev 892

/kernel/trunk/test/fault/fault1/test.c
0,0 → 1,46
/*
* Copyright (C) 2005 Jakub Vana
* Copyright (C) 2005 Jakub Jermar
* 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.
*/
 
#include <print.h>
#include <debug.h>
#include <panic.h>
 
#include <test.h>
#include <arch/atomic.h>
#include <proc/thread.h>
 
#include <arch.h>
 
 
void test(void)
{
 
((int *)(0))[1]=0;
 
}
/kernel/trunk/kernel.config
88,5 → 88,6
@ "mm/falloc2" Frame Allocation test 2
@ "mm/slab1" SLAB test1 - No CPU-cache
@ "mm/slab2" SLAB test2 - SMP CPU cache
@ "fault/fault1" Write to NULL (maybe page fault)
@ [ARCH=mips32] "debug/mips1" Mips breakpoint-debug test
! CONFIG_TEST (choice)
/kernel/trunk/arch/ia64/src/ski/ski.c
46,7 → 46,7
*/
void ski_putchar(chardev_t *d, const char ch)
{
__asm__ (
__asm__ volatile (
"mov r15=%0\n"
"mov r32=%1\n" /* r32 is in0 */
"break 0x80000\n" /* modifies r8 */
72,7 → 72,7
{
__u64 ch;
__asm__ (
__asm__ volatile (
"mov r15=%1\n"
"break 0x80000;;\n" /* modifies r8 */
"mov %0=r8;;\n"
85,6 → 85,19
return (__s32) ch;
}
 
/**
This is blocking wrap function of ski_getchar
It active waits ... for using with non-stable kernel
*/
static char ski_getchar_blocking(chardev_t *d)
{
volatile int ch;
while(!(ch=ski_getchar()));
if(ch == '\r') ch = '\n';
return (char) ch;
}
 
 
/** Ask keyboard if a key was pressed. */
void poll_keyboard(void)
{
116,7 → 129,8
static chardev_operations_t ski_ops = {
.resume = ski_kb_enable,
.suspend = ski_kb_disable,
.write = ski_putchar
.write = ski_putchar,
.read = ski_getchar_blocking
};
 
 
127,7 → 141,7
*/
void ski_init_console(void)
{
__asm__ (
__asm__ volatile (
"mov r15=%0\n"
"break 0x80000\n"
: