diff --git a/arch/x86/elfboot/elfboot.c b/arch/x86/elfboot/elfboot.c index 3dba9bdd..fe5facd9 100644 --- a/arch/x86/elfboot/elfboot.c +++ b/arch/x86/elfboot/elfboot.c @@ -1,3 +1,12 @@ +/** + * \file elfboot.c + * License details are found in the file LICENSE. + * \brief + * Load an ELF image. + * \author Taku Shimosawa \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ + #include #include "test.h" diff --git a/arch/x86/elfboot/head.S b/arch/x86/elfboot/head.S index d4315127..13ad7c5e 100644 --- a/arch/x86/elfboot/head.S +++ b/arch/x86/elfboot/head.S @@ -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 \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ .text .globl _start _start: diff --git a/arch/x86/elfboot/test.h b/arch/x86/elfboot/test.h index 5c3fd9c1..19894916 100644 --- a/arch/x86/elfboot/test.h +++ b/arch/x86/elfboot/test.h @@ -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 \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ #ifdef TEST #include #include diff --git a/arch/x86/elfboot/test_main.c b/arch/x86/elfboot/test_main.c index 474db271..7160e632 100644 --- a/arch/x86/elfboot/test_main.c +++ b/arch/x86/elfboot/test_main.c @@ -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 \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ #include #include #include diff --git a/arch/x86/kernel/context.S b/arch/x86/kernel/context.S index eb7cb728..9c0fe957 100644 --- a/arch/x86/kernel/context.S +++ b/arch/x86/kernel/context.S @@ -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 \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) diff --git a/arch/x86/kernel/cpu.c b/arch/x86/kernel/cpu.c index 4855b215..bd73f902 100644 --- a/arch/x86/kernel/cpu.c +++ b/arch/x86/kernel/cpu.c @@ -1,3 +1,12 @@ +/** + * \file cpu.c + * License details are found in the file LICENSE. + * \brief + * Control CPU. + * \author Taku Shimosawa \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ + #include #include #include diff --git a/arch/x86/kernel/include/arch-memory.h b/arch/x86/kernel/include/arch-memory.h index 24e8df6a..d63d9e95 100644 --- a/arch/x86/kernel/include/arch-memory.h +++ b/arch/x86/kernel/include/arch-memory.h @@ -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 \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ + #ifndef __HEADER_X86_COMMON_ARCH_MEMORY_H #define __HEADER_X86_COMMON_ARCH_MEMORY_H diff --git a/arch/x86/kernel/include/bitops.h b/arch/x86/kernel/include/bitops.h index a5ee1009..69b58ea9 100644 --- a/arch/x86/kernel/include/bitops.h +++ b/arch/x86/kernel/include/bitops.h @@ -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 \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ + #ifndef HEADER_X86_COMMON_BITOPS_H #define HEADER_X86_COMMON_BITOPS_H diff --git a/arch/x86/kernel/include/cpulocal.h b/arch/x86/kernel/include/cpulocal.h index dc4e6696..46ed009b 100644 --- a/arch/x86/kernel/include/cpulocal.h +++ b/arch/x86/kernel/include/cpulocal.h @@ -1,3 +1,12 @@ +/** + * \file cpulocal.h + * License details are found in the file LICENSE. + * \brief + * Declare information for individual CPUs. + * \author Taku Shimosawa \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ + #ifndef HEADER_X86_COMMON_CPULOCAL_H #define HEADER_X86_COMMON_CPULOCAL_H diff --git a/arch/x86/kernel/include/ihk/atomic.h b/arch/x86/kernel/include/ihk/atomic.h index 67d70bda..4c4cb089 100644 --- a/arch/x86/kernel/include/ihk/atomic.h +++ b/arch/x86/kernel/include/ihk/atomic.h @@ -1,3 +1,12 @@ +/** + * \file atomic.h + * License details are found in the file LICENSE. + * \brief + * Atomic memory operations. + * \author Taku Shimosawa \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ + #ifndef HEADER_X86_COMMON_IHK_ATOMIC_H #define HEADER_X86_COMMON_IHK_ATOMIC_H diff --git a/arch/x86/kernel/include/ihk/context.h b/arch/x86/kernel/include/ihk/context.h index 1802d32b..3c8a14ec 100644 --- a/arch/x86/kernel/include/ihk/context.h +++ b/arch/x86/kernel/include/ihk/context.h @@ -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 \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ + #ifndef __HEADER_X86_COMMON_CONTEXT_H #define __HEADER_X86_COMMON_CONTEXT_H diff --git a/arch/x86/kernel/include/ihk/ikc.h b/arch/x86/kernel/include/ihk/ikc.h index 01bacb21..030872cc 100644 --- a/arch/x86/kernel/include/ihk/ikc.h +++ b/arch/x86/kernel/include/ihk/ikc.h @@ -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 \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ + #ifndef HEADER_X86_COMMON_IHK_IKC_H #define HEADER_X86_COMMON_IHK_IKC_H diff --git a/arch/x86/kernel/include/ihk/types.h b/arch/x86/kernel/include/ihk/types.h index b4ed9d3f..d095b71d 100644 --- a/arch/x86/kernel/include/ihk/types.h +++ b/arch/x86/kernel/include/ihk/types.h @@ -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 \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ + #ifndef X86_COMMON_TYPES_H #define X86_COMMON_TYPES_H diff --git a/arch/x86/kernel/include/registers.h b/arch/x86/kernel/include/registers.h index d06e4bed..de10d895 100644 --- a/arch/x86/kernel/include/registers.h +++ b/arch/x86/kernel/include/registers.h @@ -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 \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ + #ifndef __HEADER_X86_COMMON_REGISTERS_H #define __HEADER_X86_COMMON_REGISTERS_H diff --git a/arch/x86/kernel/interrupt.S b/arch/x86/kernel/interrupt.S index 36683956..1ab8d51d 100644 --- a/arch/x86/kernel/interrupt.S +++ b/arch/x86/kernel/interrupt.S @@ -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 \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) diff --git a/arch/x86/kernel/local.c b/arch/x86/kernel/local.c index a88700d0..76b84202 100644 --- a/arch/x86/kernel/local.c +++ b/arch/x86/kernel/local.c @@ -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 \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ + #include #include #include diff --git a/arch/x86/kernel/lock.c b/arch/x86/kernel/lock.c index 00477a6b..750fc1fe 100644 --- a/arch/x86/kernel/lock.c +++ b/arch/x86/kernel/lock.c @@ -1,3 +1,12 @@ +/** + * \file lock.c + * License details are found in the file LICENSE. + * \brief + * Spin lock. + * \author Taku Shimosawa \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ + #include #if 0 diff --git a/arch/x86/kernel/memory.c b/arch/x86/kernel/memory.c index 065aeaf4..d1b4baeb 100644 --- a/arch/x86/kernel/memory.c +++ b/arch/x86/kernel/memory.c @@ -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 \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ + #include #include #include diff --git a/arch/x86/kernel/mikc.c b/arch/x86/kernel/mikc.c index 546e9719..df6ae324 100644 --- a/arch/x86/kernel/mikc.c +++ b/arch/x86/kernel/mikc.c @@ -1,3 +1,12 @@ +/** + * \file mikc.c + * License details are found in the file LICENSE. + * \brief + * Initialize Inter-Kernel Communication (IKC) + * \author Taku Shimosawa \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ + #include #include #include diff --git a/arch/x86/kernel/perfctr.c b/arch/x86/kernel/perfctr.c index 8d6ad333..ba8b18a5 100644 --- a/arch/x86/kernel/perfctr.c +++ b/arch/x86/kernel/perfctr.c @@ -1,3 +1,12 @@ +/** + * \file perfctr.c + * License details are found in the file LICENSE. + * \brief + * Manipulate performance counter. + * \author Taku Shimosawa \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ + #include #include #include diff --git a/arch/x86/kernel/trampoline.S b/arch/x86/kernel/trampoline.S index a9f7350f..d23ec350 100644 --- a/arch/x86/kernel/trampoline.S +++ b/arch/x86/kernel/trampoline.S @@ -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 \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ + + #define BOOT_CS 0x10 #define BOOT_DS 0x18 #define BOOT_CS64 0x20 diff --git a/lib/include/ihk/cpu.h b/lib/include/ihk/cpu.h index 309be623..25c983a0 100644 --- a/lib/include/ihk/cpu.h +++ b/lib/include/ihk/cpu.h @@ -1,3 +1,12 @@ +/** + * \file cpu.h + * License details are found in the file LICENSE. + * \brief + * Declare types and functions to control CPU. + * \author Taku Shimosawa \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ + #ifndef IHK_CPU_H #define IHK_CPU_H diff --git a/lib/include/ihk/debug.h b/lib/include/ihk/debug.h index 9e38ce99..56444bb3 100644 --- a/lib/include/ihk/debug.h +++ b/lib/include/ihk/debug.h @@ -1,3 +1,12 @@ +/** + * \file debug.h + * License details are found in the file LICENSE. + * \brief + * Declare types and functions to print debug message (kmsg). + * \author Taku Shimosawa \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ + #ifndef IHK_DEBUG_H #define IHK_DEBUG_H diff --git a/lib/include/ihk/dma.h b/lib/include/ihk/dma.h index 58893257..42f42fa4 100644 --- a/lib/include/ihk/dma.h +++ b/lib/include/ihk/dma.h @@ -1,3 +1,12 @@ +/** + * \file dma.h + * License details are found in the file LICENSE. + * \brief + * Declare types and functions for DMA. + * \author Taku Shimosawa \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ + #ifndef __HEADER_GENERIC_INCLUDE_DMA_H #define __HEADER_GENERIC_INCLUDE_DMA_H diff --git a/lib/include/ihk/lock.h b/lib/include/ihk/lock.h index 91d6d707..f85f5bac 100644 --- a/lib/include/ihk/lock.h +++ b/lib/include/ihk/lock.h @@ -1,3 +1,12 @@ +/** + * \file lock.h + * License details are found in the file LICENSE. + * \brief + * Declare functions implementing spin lock. + * \author Taku Shimosawa \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ + #ifndef __HEADER_GENERIC_IHK_LOCK #define __HEADER_GENERIC_IHK_LOCK diff --git a/lib/include/ihk/mm.h b/lib/include/ihk/mm.h index 1a099bc1..dcd5ffcd 100644 --- a/lib/include/ihk/mm.h +++ b/lib/include/ihk/mm.h @@ -1,3 +1,12 @@ +/** + * \file mm.h + * License details are found in the file LICENSE. + * \brief + * Declare types and funcions for memory management. + * \author Taku Shimosawa \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ + #ifndef __HEADER_GENERIC_IHK_MM_H #define __HEADER_GENERIC_IHK_MM_H diff --git a/lib/include/ihk/page_alloc.h b/lib/include/ihk/page_alloc.h index 4cc2d67c..db94e339 100644 --- a/lib/include/ihk/page_alloc.h +++ b/lib/include/ihk/page_alloc.h @@ -1,3 +1,13 @@ +/** + * \file page_alloc.h + * License details are found in the file LICENSE. + * \brief + * Declare functions acquire physical pages and assign virtual addresses + * to them. + * \author Taku Shimosawa \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ + #ifndef __HEADER_GENERIC_IHK_PAGE_ALLOC #define __HEADER_GENERIC_IHK_PAGE_ALLOC diff --git a/lib/include/ihk/perfctr.h b/lib/include/ihk/perfctr.h index 430c3966..8d9d6964 100644 --- a/lib/include/ihk/perfctr.h +++ b/lib/include/ihk/perfctr.h @@ -1,3 +1,12 @@ +/** + * \file perfctr.h + * License details are found in the file LICENSE. + * \brief + * Declare type and functions to manipulate performance counters. + * \author Taku Shimosawa \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ + #ifndef HEADER_GENERIC_IHK_PERFCTR_H #define HEADER_GENERIC_IHK_PERFCTR_H diff --git a/lib/include/limits.h b/lib/include/limits.h index f335b541..6f46281e 100644 --- a/lib/include/limits.h +++ b/lib/include/limits.h @@ -1,3 +1,12 @@ +/** + * \file limits.h + * License details are found in the file LICENSE. + * \brief + * Define max and min of 32-bit integer. + * \author Taku Shimosawa \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ + #ifndef __HEADER_LIMITS #define __HEADER_LIMITS diff --git a/lib/include/memory.h b/lib/include/memory.h index b1b24504..c09330b9 100644 --- a/lib/include/memory.h +++ b/lib/include/memory.h @@ -1,3 +1,12 @@ +/** + * \file memory.h + * License details are found in the file LICENSE. + * \brief + * Convert virtual address from/to physical address. + * \author Taku Shimosawa \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ + #ifndef __HEADER_GENERIC_MEMORY_H #define __HEADER_GENERIC_MEMORY_H diff --git a/lib/include/string.h b/lib/include/string.h index d0aadb5e..b050a0a5 100644 --- a/lib/include/string.h +++ b/lib/include/string.h @@ -1,3 +1,12 @@ +/** + * \file string.h + * License details are found in the file LICENSE. + * \brief + * Declare string manipulation functions. + * \author Taku Shimosawa \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ + #ifndef __STRING_H #define __STRING_H diff --git a/lib/include/types.h b/lib/include/types.h index 846fa036..d8be4936 100644 --- a/lib/include/types.h +++ b/lib/include/types.h @@ -1,3 +1,12 @@ +/** + * \file types.h + * License details are found in the file LICENSE. + * \brief + * typedef stdint.h like integer types + * \author Taku Shimosawa \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ + #ifndef TYPES_H #define TYPES_H diff --git a/lib/page_alloc.c b/lib/page_alloc.c index 8fec9cba..d5c7f904 100644 --- a/lib/page_alloc.c +++ b/lib/page_alloc.c @@ -1,6 +1,10 @@ -/* - * IHK - Generic page allocator (manycore version) - * (C) Copyright 2011 Taku Shimosawa. +/** + * \file page_alloc.c + * License details are found in the file LICENSE. + * \brief + * IHK - Generic page allocator (manycore version) + * \author Taku Shimosawa \par + * Copyright (C) 2011 - 2012 Taku Shimosawa */ #include #include diff --git a/lib/string.c b/lib/string.c index 9123f30a..e736a2bf 100644 --- a/lib/string.c +++ b/lib/string.c @@ -1,3 +1,12 @@ +/** + * \file page_alloc.c + * License details are found in the file LICENSE. + * \brief + * Manipulate strings. + * \author Taku Shimosawa \par + * Copyright (C) 2011 - 2012 Taku Shimosawa + */ + #include size_t strlen(const char *p)