sccedit
This commit is contained in:
parent
e9186206ef
commit
7e52c1a39e
2 changed files with 103 additions and 15 deletions
30
Makefile
30
Makefile
|
@ -6,18 +6,18 @@ DRIVERDIRS = drivers/net drivers/char
|
|||
KERNDIRS = libkern kernel mm fs arch/$(ARCH)/kernel arch/$(ARCH)/mm arch/$(ARCH)/scc $(LWIPDIRS) $(DRIVERDIRS)
|
||||
SUBDIRS = $(KERNDIRS)
|
||||
|
||||
CC_FOR_TARGET=gcc
|
||||
CXX_FOR_TARGET=g++
|
||||
GCC_FOR_TARGET=gcc
|
||||
AR_FOR_TARGET=ar
|
||||
AS_FOR_TARGET=as
|
||||
LD_FOR_TARGET=ld
|
||||
NM_FOR_TARGET=nm
|
||||
OBJDUMP_FOR_TARGET=objdump
|
||||
OBJCOPY_FOR_TARGET=objcopy
|
||||
RANLIB_FOR_TARGET=ranlib
|
||||
STRIP_FOR_TARGET=strip
|
||||
READELF_FOR_TARGET=readelf
|
||||
CC_FOR_TARGET=i386-unknown-linux-gnu-gcc
|
||||
CXX_FOR_TARGET=i386-unknown-linux-gnu-g++
|
||||
GCC_FOR_TARGET=i386-unknown-linux-gnu-gcc
|
||||
AR_FOR_TARGET=i386-unknown-linux-gnu-ar
|
||||
AS_FOR_TARGET=i386-unknown-linux-gnu-as
|
||||
LD_FOR_TARGET=i386-unknown-linux-gnu-ld
|
||||
NM_FOR_TARGET=i386-unknown-linux-gnu-nm
|
||||
OBJDUMP_FOR_TARGET=i386-unknown-linux-gnu-objdump
|
||||
OBJCOPY_FOR_TARGET=i386-unknown-linux-gnu-objcopy
|
||||
RANLIB_FOR_TARGET=i386-unknown-linux-gnu-ranlib
|
||||
STRIP_FOR_TARGET=i386-unknown-linux-gnu-strip
|
||||
READELF_FOR_TARGET=i386-unknown-linux-gnu-readelf
|
||||
NASM = nasm
|
||||
EMU=qemu
|
||||
GDB=gdb
|
||||
|
@ -26,9 +26,9 @@ MAKE = make
|
|||
NASMFLAGS = -felf32 -g
|
||||
INCLUDE = -I$(TOPDIR)/include -I$(TOPDIR)/arch/$(ARCH)/include -I$(TOPDIR)/lwip/src/include -I$(TOPDIR)/lwip/src/include/ipv4 -I$(TOPDIR)/drivers
|
||||
# Compiler options for final code
|
||||
CFLAGS = -g -m32 -march=i586 -Wall -O2 -fno-zero-initialized-in-bss -fno-builtin -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc $(INCLUDE) -fno-stack-protector
|
||||
CFLAGS = -g -m32 -march=i586 -Wall -O2 -fno-zero-initialized-in-bss -fno-builtin -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc $(INCLUDE)
|
||||
# Compiler options for debuuging
|
||||
#CFLAGS = -g -O -m32 -march=i586 -Wall -fno-zero-initialized-in-bss -fno-builtin -DWITH_FRAME_POINTER -nostdinc $(INCLUDE) -fno-stack-protector
|
||||
#CFLAGS = -g -O -m32 -march=i586 -Wall -fno-zero-initialized-in-bss -fno-builtin -DWITH_FRAME_POINTER -nostdinc $(INCLUDE)
|
||||
ARFLAGS = rsv
|
||||
RM = rm -rf
|
||||
LDFLAGS = -T link.ld -z max-page-size=4096 --defsym __BUILD_DATE=$(shell date +'%Y%m%d') --defsym __BUILD_TIME=$(shell date +'%H%M%S')
|
||||
|
@ -47,7 +47,7 @@ default: all
|
|||
all: newlib tools $(NAME).elf
|
||||
|
||||
newlib:
|
||||
$(MAKE) ARCH=$(ARCH) LDFLAGS="-m32" CFLAGS="-m32 -O2 -march=i586 -fno-stack-protector" NASMFLAGS="$(NASMFLAGS)" CC_FOR_TARGET=$(CC_FOR_TARGET) \
|
||||
$(MAKE) ARCH=$(ARCH) LDFLAGS="-m32" CFLAGS="-m32 -O2 -march=i586 " NASMFLAGS="$(NASMFLAGS)" CC_FOR_TARGET=$(CC_FOR_TARGET) \
|
||||
CXX_FOR_TARGET=$(CXX_FOR_TARGET) \
|
||||
GCC_FOR_TARGET=$(GCC_FOR_TARGET) \
|
||||
AR_FOR_TARGET=$(AR_FOR_TARGET) \
|
||||
|
|
88
include/metalsvm/config.h
Normal file
88
include/metalsvm/config.h
Normal file
|
@ -0,0 +1,88 @@
|
|||
/*
|
||||
* Copyright 2010 Stefan Lankes, Chair for Operating Systems,
|
||||
* RWTH Aachen University
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* This file is part of MetalSVM.
|
||||
*/
|
||||
|
||||
#ifndef __CONFIG_H__
|
||||
#define __CONFIG_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define METALSVM_VERSION "0.1"
|
||||
#define MAX_TASKS 16
|
||||
#define MAX_CORES 4
|
||||
#define MAX_FNAME 128
|
||||
#define DEFAULT_STACK_SIZE (32*1024)
|
||||
#define KERNEL_STACK_SIZE 8192
|
||||
#define KMSG_SIZE (128*1024)
|
||||
#define PAGE_SIZE 4096
|
||||
#define PAGE_SHIFT 12
|
||||
#define CACHE_LINE 64
|
||||
#define MAILBOX_SIZE 8
|
||||
#define TIMER_FREQ 100 /* in HZ */
|
||||
#define CLOCK_TICK_RATE 1193182 /* 8254 chip's internal oscillator frequency */
|
||||
#define INT_SYSCALL 0x80
|
||||
#define KERNEL_SPACE (1*1024*1024*1024)
|
||||
#define VIDEO_MEM_ADDR 0xB8000 // the video memora address
|
||||
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
||||
|
||||
/*
|
||||
* address space / (page_size * sizeof(uint8_t))
|
||||
* x86_32 => 4 GB / (4096 * 8)
|
||||
*/
|
||||
#define BITMAP_SIZE 1048576
|
||||
|
||||
//#define CONFIG_PCI
|
||||
#define CONFIG_LWIP
|
||||
//#define CONFIG_VGA
|
||||
//#define CONFIG_KEYBOARD
|
||||
//#define CONFIG_MULTIBOOT
|
||||
#define CONFIG_ROCKCREEK
|
||||
|
||||
// RCCE specific flags
|
||||
#define SCC
|
||||
#define MS_BAREMETAL
|
||||
//#define GORY
|
||||
#define SHMADD
|
||||
#define SHMDBG
|
||||
//#define SHMADD_CACHEABLE
|
||||
/* default values for 16 GB system */
|
||||
#define PRIVATE_MEM1_START 0x00000000
|
||||
#define PRIVATE_MEM1_END 0x13FFFFFF
|
||||
#define PRIVATE_MEM2_START 0xFF000000
|
||||
#define PRIVATE_MEM2_END 0xFFFFFFFF
|
||||
#define SCC_BOOTINFO 0x80000
|
||||
|
||||
#define BUILTIN_EXPECT(exp, b) __builtin_expect((exp), (b))
|
||||
//#define BUILTIN_EXPECT(exp, b) (exp)
|
||||
#define NORETURN __attribute__((noreturn))
|
||||
#define STDCALL __attribute__((stdcall))
|
||||
|
||||
#define HAVE_ARCH_MEMSET
|
||||
#define HAVE_ARCH_MEMCPY
|
||||
#define HAVE_ARCH_STRLEN
|
||||
#define HAVE_ARCH_STRCPY
|
||||
#define HAVE_ARCH_STRNCPY
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
Loading…
Add table
Reference in a new issue