From: forsyth@caldo.demon.co.uk forsyth@caldo.demon.co.uk
Subject: [9fans] AMD cpu detection
Date: Wed, 29 Apr 1998 06:29:19 +0100 [thread overview]
Message-ID: <19980429052919.YzSiTBbE4eYGzU_YXpjXjvIw_90-fP-8gLiGHDl9Ucg@z> (raw)
for a 233MHz AMD/K6, on a Micronics AT-03 Twister m/board, i now use:
{ 5, 6, 11, "AMD-K6", }, /* determined by trial and error */
which might imply this improved approximation for the other plain K6 entry:
{ 5, 7, 11, "AMD-K6", }, /* guesswork */
(but i haven't got that model here). i'll try it on a 200MHz K6 when i get to
the office.
on boot, i get
cpu0: 234MHz AuthenticAMD AMD-K6 (cpuid: AX 0x0562 DX: 0x8001BF)
reducing 11 to 10 aalcycles gave 214MHz, so i use 11.
further retrofitting changes required to get that far:
void
printcpufreq(void)
{
int i;
char buf[128];
i = sprint(buf, "cpu%d: %dMHz ", m->machno, cpumhz);
if(cpuidid[0])
i += sprint(buf+i, "%s ", cpuidid);
sprint(buf+i, "%s (cpuid: AX 0x%4.4luX DX 0x%4.4luX)\n",
cputype->name, cpuidax, cpuiddx);
print(buf);
}
ie: delete m-> from several names to refer to the newly added static variables.
add
#define X86STEPPING(x) ((x) & 0x0F)
#define X86MODEL(x) (((x)>>4) & 0x0F)
#define X86FAMILY(x) (((x)>>8) & 0x0F)
to the top of io.h
and put
#define CPUID BYTE $0x0F; BYTE $0xA2 /* CPUID, argument in AX */
after
#define NOP XCHGL AX,AX
in l.s
i think that's all i did to get it to work.
next reply other threads:[~1998-04-29 5:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-04-29 5:29 forsyth [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-02-22 0:01 arisawa
1998-04-29 14:45 jim
1998-04-29 2:56 jim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19980429052919.YzSiTBbE4eYGzU_YXpjXjvIw_90-fP-8gLiGHDl9Ucg@z \
--to=forsyth@caldo.demon.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).