Solved

Detecting size of L2 Cache,...

Posted on 1998-09-24
12
356 Views
Last Modified: 2010-04-06
kind of tag-RAM, type and acces rates of RAM.

purpose: determine if the current config makes sense (cacheable area...)

Windows 9x & Windows NT

can anybody help me with this?
0
Comment
Question by:BlackDeath
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 3
  • 2
12 Comments
 
LVL 1

Author Comment

by:BlackDeath
ID: 1340771
Edited text of question
0
 
LVL 5

Expert Comment

by:inter
ID: 1340772
I can not find any info but I know that on Pentium II systems the L2 cache is built into the processor assembly, and handles the cache function for up to 2GB of DRAM. So for only pentium II we may make sure that the current config makes sense.
regards, igor
0
 
LVL 1

Author Comment

by:BlackDeath
ID: 1340773
hi, igor.

yo (with pentium II).

you cannot find any info: at home or any url?
i dunno which keyword to use in order to retrieve senseful results.
when i'm looking for "+l2 +cache +detection" i get tons of crap but not what i'm looking for.
i'd be very thankful if you'd keep on looking & post it here when found anything...

thanxsofar & til l8r,

Black Death.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Expert Comment

by:inter
ID: 1340774
Hi again,
I mean there is no relevant info-I think I know what you want-. I found how to detect it on MAC but not on PC.(there is no registry entry on pc either rather than a Session Managers Memory Manager caching)...I am on the subject...
c.u. igor
0
 
LVL 1

Accepted Solution

by:
jecksom earned 100 total points
ID: 1340775
Hi , BlackDeath !

I didn't found standart function to determinate secondary cache size , it's vary
from one vender to other + you must also select Chipset , example :

Bitfields for Intel 82437/82439HX cache control register:
Bit(s)  Description    
 7-6    secondary cache size
        00 none
        01 256K
        10 512K
        11 reserved,

guess PII with 440LX , BX , NX , etc would be different also.

I can show you how to do this for VIA Technologies and Intel (different functions),
and selected chipset. O'coz , you can also check out "Interrupt list" yourself ,
(INT 1A,AX - B10A : PCI BIOS v2.0c+ - READ CONFIGURATION DWORD)

Best way , as far as i could see, would be checking data transfer time from
one point of memory to other with incremeting write/read block by 64KB.
In the point where transfer slow down more than 20% from previous same operation it
will be end of L2 cache.
if  previous_time/100*20+previous_time)/64KB_block_prev<current_time/64KB_block_cur
then L2_cache continue

Jecksom
0
 
LVL 1

Author Comment

by:BlackDeath
ID: 1340776
hoi, jecksom.

afa interrupts are concerned, i doubt it would work with nt.

regarding your 2nd suggestion (measure transfer times):
i think this can only work if there's more ram installed than cacheable.
if this is so, then how will you detect the slowing down of data transfer when it won't occur?

or didn't i dig your answer?


0
 
LVL 1

Expert Comment

by:jecksom
ID: 1340777
Hehe ,

Hm, no, PCI BIOS doesn't depend from NT , WIN9X , UNIX or whatever , o'coz if you
didn't reverse engeenered your Flashed ROM and cleared 1A BIOS interrupt support ;)

2nd : Well ,  as i remember WIN95 required 8 MB memory (!MB) minimal , and currently
x86 L2 caches have maximum 2MB (Klamath - 256 or 512KB) , so i sure it possible
allocate 2MB*2 to test on it ! (o'coz, if you talking about x86, not things like some models of SUN with have up to 2GB! caches already :) )

Jecksom

PS :By the way , looks like Linux using this (transfer time) metod to determinate L2 cache size.

0
 
LVL 1

Author Comment

by:BlackDeath
ID: 1340778
well, i'll give it a try. i'll be back soon. thanxsofar.


Black Death.
0
 
LVL 1

Author Comment

by:BlackDeath
ID: 1340779
hi, jecksom.

sorry i didn't reply for so long.
i couldn't get this (determining cache size by data transfer rate) to work. would you be so nice as to post a code example in form of a function returning a value indicating the size of l2 cache? if you do so and i get it to work i'll increase to 100 and rate a.

tia & sorry again.

Black Death.
0
 
LVL 1

Expert Comment

by:jecksom
ID: 1340780
hi BlackDeath!

Here is procedure :

procedure TForm1.Button1Click(Sender: TObject);
var L2_size:byte;L2_size_str:string;
begin
asm
mov eax,2
db  0fh, 0a2h //CPUID
mov L2_size,dl
end;
case L2_size of
$40:L2_size_str:='No L2 Cache';
$41:L2_size_str:=
    'Unified cache, 32 byte cache line, 4-way set associative, 128K';
$42:L2_size_str:=
    'Unified cache, 32 byte cache line, 4-way set associative, 256K';
$43:L2_size_str:=
    'Unified cache, 32 byte cache line, 4-way set associative, 512K';
$44:L2_size_str:=
    'Unified cache, 32 byte cache line, 4-way set associative, 1M';
$45:L2_size_str:=
    'Unified cache, 32 byte cache line, 4-way set associative, 2M';
end;
showmessage(l2_size_str);
end;

  I must give you appologizes , i've tryed my own ( :) memory transfer time) method and
failed , so i guess this solution could be more useful for ya . I also must warn you
to detect L2 cache size using this method (CPUID) on IDT , RISE , CYRIX , AMD CPUs,
they little bit different, if they ever exist .
  In this example i've showing only L2 cache size , i can give you all info that i found over
inet + books+PDFs , so you can detect some required conditions , ie :
CPUID opcodes  supported ? ,
CPU family,
L1 cache size,
preventing crashs on different x86 platforms,
etc;

Jecksom

PS: i also feel that you already known CPUID method :)  

0
 
LVL 1

Author Comment

by:BlackDeath
ID: 1340781
hi, jecksom.

i've tested this on my ppro 200 - it works on 95 and nt.
i've tested it on several other machines -
well, sometimes it works, sometimes not (External Exception) - all intel x86.

>>
  In this example i've showing only L2 cache size , i can give you all info that i found over
       inet + books+PDFs , so you can detect some required conditions , ie :
       CPUID opcodes  supported ? ,
       CPU family,
       L1 cache size,
       preventing crashs on different x86 platforms,
       etc;
<<

would you mail me these info, please?
andreas.naguschewski@vt.siemens.de

tia,

Black Death.
0
 
LVL 1

Author Comment

by:BlackDeath
ID: 1340782
thanxalot.

where did you get this pdf from?
is there more info like that?

thanx for your offer regarding your eMail.
i'll most porbably make use of it...

thanx again & have a nice day,

Black Death.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
drawing animated level bar based on numbers 3 121
Delphi Yen format 3 75
Convert MS Word document to a PDF file 9 137
Firemonkey Queue list 1 51
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question