From 221838cc7eb178370ff62aa05920a582e12ac322 Mon Sep 17 00:00:00 2001 From: Jason Jin Date: Tue, 10 Jul 2007 09:03:22 +0800 Subject: Remove the bios emulator from MAI board. The bios emulator in the MAI board can not pass compile and have a lot of crap in it. remove it and will have a clean and small bios emulator in the drivers directory which can be uesed for every board. Signed-off-by: Jason Jin --- .../scitech/src/pm/rttarget/cpuinfo.c | 94 ---------------------- 1 file changed, 94 deletions(-) delete mode 100644 board/MAI/bios_emulator/scitech/src/pm/rttarget/cpuinfo.c (limited to 'board/MAI/bios_emulator/scitech/src/pm/rttarget/cpuinfo.c') diff --git a/board/MAI/bios_emulator/scitech/src/pm/rttarget/cpuinfo.c b/board/MAI/bios_emulator/scitech/src/pm/rttarget/cpuinfo.c deleted file mode 100644 index 4f32c3e887..0000000000 --- a/board/MAI/bios_emulator/scitech/src/pm/rttarget/cpuinfo.c +++ /dev/null @@ -1,94 +0,0 @@ -/**************************************************************************** -* -* Ultra Long Period Timer -* -* ======================================================================== -* -* The contents of this file are subject to the SciTech MGL Public -* License Version 1.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.scitechsoft.com/mgl-license.txt -* -* Software distributed under the License is distributed on an -* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or -* implied. See the License for the specific language governing -* rights and limitations under the License. -* -* The Original Code is Copyright (C) 1991-1998 SciTech Software, Inc. -* -* The Initial Developer of the Original Code is SciTech Software, Inc. -* All Rights Reserved. -* -* ======================================================================== -* -* Language: ANSI C -* Environment: RTTarget-32 -* -* Description: Module to implement OS specific services to measure the -* CPU frequency. -* -****************************************************************************/ - -/*---------------------------- Global variables ---------------------------*/ - -static ibool havePerformanceCounter; - -/*----------------------------- Implementation ----------------------------*/ - -/**************************************************************************** -REMARKS: -Increase the thread priority to maximum, if possible. -****************************************************************************/ -static int SetMaxThreadPriority(void) -{ - int oldPriority; - HANDLE hThread = GetCurrentThread(); - - oldPriority = GetThreadPriority(hThread); - if (oldPriority != THREAD_PRIORITY_ERROR_RETURN) - SetThreadPriority(hThread, THREAD_PRIORITY_TIME_CRITICAL); - return oldPriority; -} - -/**************************************************************************** -REMARKS: -Restore the original thread priority. -****************************************************************************/ -static void RestoreThreadPriority( - int oldPriority) -{ - HANDLE hThread = GetCurrentThread(); - - if (oldPriority != THREAD_PRIORITY_ERROR_RETURN) - SetThreadPriority(hThread, oldPriority); -} - -/**************************************************************************** -REMARKS: -Initialise the counter and return the frequency of the counter. -****************************************************************************/ -static void GetCounterFrequency( - CPU_largeInteger *freq) -{ - if (!QueryPerformanceFrequency((LARGE_INTEGER*)freq)) { - havePerformanceCounter = false; - freq->low = 100000; - freq->high = 0; - } - else - havePerformanceCounter = true; -} - -/**************************************************************************** -REMARKS: -Read the counter and return the counter value. -****************************************************************************/ -#define GetCounter(t) \ -{ \ - if (havePerformanceCounter) \ - QueryPerformanceCounter((LARGE_INTEGER*)t); \ - else { \ - (t)->low = timeGetTime() * 100; \ - (t)->high = 0; \ - } \ -} -- cgit v1.2.3