Merge branch 'master' of postpeta.pccluster.org:mckernel

This commit is contained in:
ubuntu12.10
2013-11-14 17:26:14 +09:00
40 changed files with 382 additions and 11 deletions

View File

@@ -1,3 +1,12 @@
/**
* \file elfboot.c
* License details are found in the file LICENSE.
* \brief
* Load an ELF image.
* \author Taku Shimosawa <shimosawa@is.s.u-tokyo.ac.jp> \par
* Copyright (C) 2011 - 2012 Taku Shimosawa
*/
#include <elf.h>
#include "test.h"

View File

@@ -1,3 +1,11 @@
/**
* \file head.S
* License details are found in the file LICENSE.
* \brief
* Entry point calling to elfboot_main.
* \author Taku Shimosawa <shimosawa@is.s.u-tokyo.ac.jp> \par
* Copyright (C) 2011 - 2012 Taku Shimosawa
*/
.text
.globl _start
_start:

View File

@@ -1,3 +1,11 @@
/**
* \file test.h
* License details are found in the file LICENSE.
* \brief
* Header file of test of loading an ELF image.
* \author Taku Shimosawa <shimosawa@is.s.u-tokyo.ac.jp> \par
* Copyright (C) 2011 - 2012 Taku Shimosawa
*/
#ifdef TEST
#include <stdio.h>
#include <stdlib.h>

View File

@@ -1,3 +1,11 @@
/**
* \file test_main.c
* License details are found in the file LICENSE.
* \brief
* Test of loading an ELF file.
* \author Taku Shimosawa <shimosawa@is.s.u-tokyo.ac.jp> \par
* Copyright (C) 2011 - 2012 Taku Shimosawa
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

View File

@@ -1,4 +1,13 @@
#define X86_CPU_LOCAL_OFFSET_TSS 128
/**
* \file context.S
* License details are found in the file LICENSE.
* \brief
* Save registers of old context and load registers of new context.
* \author Taku Shimosawa <shimosawa@is.s.u-tokyo.ac.jp> \par
* Copyright (C) 2011 - 2012 Taku Shimosawa
*/
#define X86_CPU_LOCAL_OFFSET_TSS 128
#define X86_TSS_OFFSET_SP0 4
#define X86_CPU_LOCAL_OFFSET_SP0 \
(X86_CPU_LOCAL_OFFSET_TSS + X86_TSS_OFFSET_SP0)

View File

@@ -1,3 +1,12 @@
/**
* \file cpu.c
* License details are found in the file LICENSE.
* \brief
* Control CPU.
* \author Taku Shimosawa <shimosawa@is.s.u-tokyo.ac.jp> \par
* Copyright (C) 2011 - 2012 Taku Shimosawa
*/
#include <ihk/cpu.h>
#include <ihk/debug.h>
#include <types.h>

View File

@@ -1,3 +1,12 @@
/**
* \file arch-memomry.h
* License details are found in the file LICENSE.
* \brief
* Define and declare memory management macros and functions
* \author Taku Shimosawa <shimosawa@is.s.u-tokyo.ac.jp> \par
* Copyright (C) 2011 - 2012 Taku Shimosawa
*/
#ifndef __HEADER_X86_COMMON_ARCH_MEMORY_H
#define __HEADER_X86_COMMON_ARCH_MEMORY_H

View File

@@ -1,3 +1,12 @@
/**
* \file bitops.h
* License details are found in the file LICENSE.
* \brief
* Find last set bit in word.
* \author Taku Shimosawa <shimosawa@is.s.u-tokyo.ac.jp> \par
* Copyright (C) 2011 - 2012 Taku Shimosawa
*/
#ifndef HEADER_X86_COMMON_BITOPS_H
#define HEADER_X86_COMMON_BITOPS_H

View File

@@ -1,3 +1,12 @@
/**
* \file cpulocal.h
* License details are found in the file LICENSE.
* \brief
* Declare information for individual CPUs.
* \author Taku Shimosawa <shimosawa@is.s.u-tokyo.ac.jp> \par
* Copyright (C) 2011 - 2012 Taku Shimosawa
*/
#ifndef HEADER_X86_COMMON_CPULOCAL_H
#define HEADER_X86_COMMON_CPULOCAL_H

View File

@@ -1,3 +1,12 @@
/**
* \file atomic.h
* License details are found in the file LICENSE.
* \brief
* Atomic memory operations.
* \author Taku Shimosawa <shimosawa@is.s.u-tokyo.ac.jp> \par
* Copyright (C) 2011 - 2012 Taku Shimosawa
*/
#ifndef HEADER_X86_COMMON_IHK_ATOMIC_H
#define HEADER_X86_COMMON_IHK_ATOMIC_H

View File

@@ -1,3 +1,13 @@
/**
* \file context.h
* License details are found in the file LICENSE.
* \brief
* Define types of registers belonging to context.
* Define macros to retrieve arguments of system call.
* \author Taku Shimosawa <shimosawa@is.s.u-tokyo.ac.jp> \par
* Copyright (C) 2011 - 2012 Taku Shimosawa
*/
#ifndef __HEADER_X86_COMMON_CONTEXT_H
#define __HEADER_X86_COMMON_CONTEXT_H

View File

@@ -1,3 +1,12 @@
/**
* \file ikc.h
* License details are found in the file LICENSE.
* \brief
* Declare functions to initialize Inter-Kernel Communication
* \author Taku Shimosawa <shimosawa@is.s.u-tokyo.ac.jp> \par
* Copyright (C) 2011 - 2012 Taku Shimosawa
*/
#ifndef HEADER_X86_COMMON_IHK_IKC_H
#define HEADER_X86_COMMON_IHK_IKC_H

View File

@@ -1,3 +1,12 @@
/**
* \file types.h
* Licence details are found in the file LICENSE.
* \brief
* typedef stdint.h like integer types
* \author Taku Shimosawa <shimosawa@is.s.u-tokyo.ac.jp> \par
* Copyright (C) 2011 - 2012 Taku Shimosawa
*/
#ifndef X86_COMMON_TYPES_H
#define X86_COMMON_TYPES_H

View File

@@ -1,3 +1,13 @@
/**
* \file registers.h
* License details are found in the file LICENSE.
* \brief
* Declare macros and functions to manipulate
* Machine Specific Registers (MSR)
* \author Taku Shimosawa <shimosawa@is.s.u-tokyo.ac.jp> \par
* Copyright (C) 2011 - 2012 Taku Shimosawa
*/
#ifndef __HEADER_X86_COMMON_REGISTERS_H
#define __HEADER_X86_COMMON_REGISTERS_H

View File

@@ -1,4 +1,13 @@
#define X86_CPU_LOCAL_OFFSET_TSS 128
/**
* \file interrupt.S
* License details are found in the file LICENSE.
* \brief
* Interrupt handler entries.
* \author Taku Shimosawa <shimosawa@is.s.u-tokyo.ac.jp> \par
* Copyright (C) 2011 - 2012 Taku Shimosawa
*/
#define X86_CPU_LOCAL_OFFSET_TSS 128
#define X86_TSS_OFFSET_SP0 4
#define X86_CPU_LOCAL_OFFSET_SP0 \
(X86_CPU_LOCAL_OFFSET_TSS + X86_TSS_OFFSET_SP0)

View File

@@ -1,3 +1,13 @@
/**
* \file local.c
* License details are found in the file LICENSE.
* \brief
* Manipulate information for individual CPUs. These information
* resides in memory.
* \author Taku Shimosawa <shimosawa@is.s.u-tokyo.ac.jp> \par
* Copyright (C) 2011 - 2012 Taku Shimosawa
*/
#include <cpulocal.h>
#include <ihk/atomic.h>
#include <ihk/mm.h>

View File

@@ -1,3 +1,12 @@
/**
* \file lock.c
* License details are found in the file LICENSE.
* \brief
* Spin lock.
* \author Taku Shimosawa <shimosawa@is.s.u-tokyo.ac.jp> \par
* Copyright (C) 2011 - 2012 Taku Shimosawa
*/
#include <ihk/lock.h>
#if 0

View File

@@ -1,3 +1,12 @@
/**
* \file memory.c
* License details are found in the file LICENSE.
* \brief
* Acquire physical pages and manipulate page table entries.
* \author Taku Shimosawa <shimosawa@is.s.u-tokyo.ac.jp> \par
* Copyright (C) 2011 - 2012 Taku Shimosawa
*/
#include <ihk/cpu.h>
#include <ihk/debug.h>
#include <ihk/mm.h>

View File

@@ -1,3 +1,12 @@
/**
* \file mikc.c
* License details are found in the file LICENSE.
* \brief
* Initialize Inter-Kernel Communication (IKC)
* \author Taku Shimosawa <shimosawa@is.s.u-tokyo.ac.jp> \par
* Copyright (C) 2011 - 2012 Taku Shimosawa
*/
#include <ihk/ikc.h>
#include <ihk/lock.h>
#include <ikc/msg.h>

View File

@@ -1,3 +1,12 @@
/**
* \file perfctr.c
* License details are found in the file LICENSE.
* \brief
* Manipulate performance counter.
* \author Taku Shimosawa <shimosawa@is.s.u-tokyo.ac.jp> \par
* Copyright (C) 2011 - 2012 Taku Shimosawa
*/
#include <ihk/perfctr.h>
#include <march.h>
#include <errno.h>

View File

@@ -1,4 +1,14 @@
#define BOOT_CS 0x10
/**
* \file trampoline.c
* License details are found in the file LICENSE.
* \brief
* (1) Set-up page table address, (2) Transition to 64-bit and paging mode,
* (3) Jump to specified address
* \author Taku Shimosawa <shimosawa@is.s.u-tokyo.ac.jp> \par
* Copyright (C) 2011 - 2012 Taku Shimosawa
*/
#define BOOT_CS 0x10
#define BOOT_DS 0x18
#define BOOT_CS64 0x20