Subversion Repositories HelenOS

Rev

Rev 2071 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2071 Rev 2079
Line 35... Line 35...
35
#ifndef KERN_ppc32_CPUID_H_
35
#ifndef KERN_ppc32_CPUID_H_
36
#define KERN_ppc32_CPUID_H_
36
#define KERN_ppc32_CPUID_H_
37
 
37
 
38
#include <arch/types.h>
38
#include <arch/types.h>
39
 
39
 
40
struct cpu_info {
40
typedef struct {
41
    uint16_t version;
41
    uint16_t version;
42
    uint16_t revision;
42
    uint16_t revision;
43
} __attribute__ ((packed));
43
} __attribute__ ((packed)) cpu_info_t;
44
 
44
 
45
static inline void cpu_version(struct cpu_info *info)
45
static inline void cpu_version(cpu_info_t *info)
46
{
46
{
47
    asm volatile (
47
    asm volatile (
48
        "mfpvr %0\n"
48
        "mfpvr %0\n"
49
        : "=r" (*info)
49
        : "=r" (*info)
50
    );
50
    );