Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
header.c File Reference
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../../util/header.h"

Go to the source code of this file.

Macros

#define __stringify_1(x)   #x
 
#define __stringify(x)   __stringify_1(x)
 
#define mfspr(rn)
 
#define SPRN_PVR   0x11F /* Processor Version Register */
 
#define PVR_VER(pvr)   (((pvr) >> 16) & 0xFFFF) /* Version field */
 
#define PVR_REV(pvr)   (((pvr) >> 0) & 0xFFFF) /* Revison field */
 

Functions

int get_cpuid (char *buffer, size_t sz)
 

Macro Definition Documentation

#define __stringify (   x)    __stringify_1(x)

Definition at line 10 of file header.c.

#define __stringify_1 (   x)    #x

Definition at line 9 of file header.c.

#define mfspr (   rn)
Value:
({unsigned long rval; \
asm volatile("mfspr %0," __stringify(rn) \
: "=r" (rval)); rval; })

Definition at line 12 of file header.c.

#define PVR_REV (   pvr)    (((pvr) >> 0) & 0xFFFF) /* Revison field */

Definition at line 18 of file header.c.

#define PVR_VER (   pvr)    (((pvr) >> 16) & 0xFFFF) /* Version field */

Definition at line 17 of file header.c.

#define SPRN_PVR   0x11F /* Processor Version Register */

Definition at line 16 of file header.c.

Function Documentation

int get_cpuid ( char buffer,
size_t  sz 
)

Definition at line 21 of file header.c.