metalsvm/arch/x86/kernel/scc.c
stefan 440c9a31f7 - nicer output messages
git-svn-id: http://svn.lfbs.rwth-aachen.de/svn/scc/trunk/MetalSVM@74 315a16e6-25f9-4109-90ae-ca3045a26c18
2010-08-11 14:16:11 +00:00

52 lines
1.4 KiB
C

/*
* 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.
*/
#include <metalsvm/stdio.h>
#include <asm/scc.h>
#include <asm/io.h>
#ifdef CONFIG_ROCKCREEK
scc_info_t scc_info;
int scc_init(void)
{
int tmp, x, y, z;
kprintf("Initialize Rock Creek!\n");
tmp = *((int*) (CRB_OWN+MYTILEID));
x=(tmp>>3) & 0x0f; // bits 06:03
y=(tmp>>7) & 0x0f; // bits 10:07
z=(tmp ) & 0x07; // bits 02:00
scc_info.pid = PID(x, y, z);
kprintf("SCC Processor Id: %d (%d,%d,%d)\n", scc_info.pid, x, y, z);
/* default values for 16 GB system */
scc_info.private_mem[0].low = 0x00;
scc_info.private_mem[0].high = 0x13FFFFFF;
scc_info.private_mem[1].low = 0xFF000000;
scc_info.private_mem[1].high = 0xFFFFFFFF;
while(1);
return 0;
}
#endif