use TSC to minotoring the performance of LinuxBIOS

This commit is contained in:
Li-Ta Lo 2000-12-02 05:48:29 +00:00
commit d3e4c27442
3 changed files with 7 additions and 4 deletions

View file

@ -38,7 +38,7 @@ static char rcsid[] = "$Id$";
#include <cpu/p5/cpuid.h>
/* Include debugging code and outputs */
#define DEBUG
//#define DEBUG
#include <printk.h>
static int signal_l2(unsigned int address_high,

View file

@ -20,7 +20,7 @@ void printnibl(unsigned long nibl);
void printchar(unsigned char x);
void printint(unsigned long x);
void error(char errmsg[]);
void intel_post(char value);
void intel_post(unsigned char value);
void intel_conf_writeb(unsigned long port, unsigned char value);
unsigned char intel_conf_readb(unsigned long port);
void intel_cache_on(unsigned long base, unsigned long totalram);

View file

@ -112,11 +112,14 @@ void error(char errmsg[])
/*
* Write POST information
*/
void intel_post(char value)
void intel_post(unsigned char value)
{
unsigned long hi, lo;
outb(value, 0x80);
#ifdef SERIAL_POST
printk(KERN_INFO "POST: 0x%02x\n", value);
rdtsc(lo, hi);
printk(KERN_INFO "POST: 0x%02x, TSC Lo: %d, Hi: %d\n",
value, lo, hi);
#endif
}