Search:

Type: Posts; User: pgzh

Search: Search took 0.00 seconds.

  1. Replies
    3
    Views
    1,635

    Own lil' "database" ?

    Hi,

    I'm looking for some kind of tutorial for writing a tool that does the following:
    It reads multiple values and compares them to a small database and then reads a string from the database...
  2. Thread: Get CPU info

    by pgzh
    Replies
    13
    Views
    12,306

    That's strange, because I did this after a tester...

    That's strange, because I did this after a tester of my tool reported the following error compiling my program:

    error: can't find a register in class ‘BREG’ while reloading ‘asm’

    With Google I...
  3. Thread: Get CPU info

    by pgzh
    Replies
    13
    Views
    12,306

    The inline assembly for the GCC can't work with...

    The inline assembly for the GCC can't work with variables directly, so you have to use %0 for the first variable you will be using, %1 for the second and so on.
    I guess that's what you already found...
  4. Thread: Reading PCI IDs ?

    by pgzh
    Replies
    2
    Views
    4,055

    Reading PCI IDs ?

    Hi,

    how can one read the PCI ID of the chipset built into a computer?
    I know lspci can do it with "-n" and the first line contains the PCI ID of the chipset:

    $ lspci -n
    00:00.0 0600:...
  5. Replies
    5
    Views
    6,148

    Fair enough, you really got a point here. So...

    Fair enough, you really got a point here.
    So I'll simply stick with the /dev/cpu/*/msr interface which is sufficient for my needs.

    Thanks for the info!

    Peter
  6. Replies
    5
    Views
    6,148

    This is definitely true for writing to a MSR, but...

    This is definitely true for writing to a MSR, but is there any point in making reading one a privileged operation here?

    Peter
  7. Replies
    5
    Views
    6,148

    RDMSR: Segmentation fault

    Hi,

    I was writing some code to read the internal temperature sensor of an Intel Core2 Duo processor which requires to read some MSRs.
    When I tried to read a MSR with inline assembly code I always...
  8. Replies
    3
    Views
    2,330

    Run code on specific CPU?

    Hi,

    is there a way to select the CPU on which a program will run from within this program?
    I'm looking for a way to run some test with the CPUID instruction on every logical CPU in the system,...
  9. Thread: Get CPU info

    by pgzh
    Replies
    13
    Views
    12,306

    A much better solution to this would be using the...

    A much better solution to this would be using the CPUID instruction. Almost every CPU since the 486 support it (so all Hyperthreading/Multi-core Intel or AMD cpus). The following solution will only...
  10. Thread: Get jiffies?

    by pgzh
    Replies
    6
    Views
    18,649

    gettimeofday won't do me any good because it will...

    gettimeofday won't do me any good because it will only tell me what time it is or with a delta how much time has passed - I need a timer that counts the ticks of the CPU as well to calculate the CPU...
  11. Thread: Get jiffies?

    by pgzh
    Replies
    6
    Views
    18,649

    Yes, I need a timer for CPU frequency calculation...

    Yes, I need a timer for CPU frequency calculation - in my first try I used the TSC which works quite good, but does not work if running on a tickless Linux kernel because the TSC becomes unstable...
  12. Thread: Get jiffies?

    by pgzh
    Replies
    6
    Views
    18,649

    Get jiffies?

    Hi,

    is it possible to get the current jiffies value with a program running in userspace?
    I found some source code on the net using "#include <linux/jiffies.h>", but I don't have a...
  13. Replies
    7
    Views
    22,111

    Where exactly in the Linux source code did you...

    Where exactly in the Linux source code did you look? Maybe I can look for the way this is handled in 2.6 myself.

    Peter
  14. Replies
    7
    Views
    22,111

    Are you sure Linux reads the TSC for frequency...

    Are you sure Linux reads the TSC for frequency calculation? The cpu mhz info in /proc/cpuinfo changes when using cpufreq with ondemand, but the TSC does not tick constant if tickless is enabled - and...
  15. Replies
    7
    Views
    22,111

    Determining CPU frequency

    Hi,

    is there any way one can determine the current CPU frequency?
    I was trying to figure out a way to do this but couldn't find a way that works. My approach was to use the TSC (Time Stamp...
Results 1 to 15 of 15