Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
intel-rng.c File Reference
#include <linux/hw_random.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/stop_machine.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <asm/io.h>

Go to the source code of this file.

Data Structures

struct  intel_rng_hw
 

Macros

#define PFX   KBUILD_MODNAME ": "
 
#define INTEL_RNG_HW_STATUS   0
 
#define INTEL_RNG_PRESENT   0x40
 
#define INTEL_RNG_ENABLED   0x01
 
#define INTEL_RNG_STATUS   1
 
#define INTEL_RNG_DATA_PRESENT   0x01
 
#define INTEL_RNG_DATA   2
 
#define INTEL_RNG_ADDR   0xFFBC015F
 
#define INTEL_RNG_ADDR_LEN   3
 
#define FWH_DEC_EN1_REG_OLD   0xe3
 
#define FWH_DEC_EN1_REG_NEW   0xd9 /* high byte of 16-bit register */
 
#define FWH_F8_EN_MASK   0x80
 
#define BIOS_CNTL_REG_OLD   0x4e
 
#define BIOS_CNTL_REG_NEW   0xdc
 
#define BIOS_CNTL_WRITE_ENABLE_MASK   0x01
 
#define BIOS_CNTL_LOCK_ENABLE_MASK   0x02
 
#define INTEL_FWH_ADDR   0xffff0000
 
#define INTEL_FWH_ADDR_LEN   2
 
#define INTEL_FWH_RESET_CMD   0xff /* aka READ_ARRAY */
 
#define INTEL_FWH_READ_ID_CMD   0x90
 
#define INTEL_FWH_MANUFACTURER_CODE_ADDRESS   0x000000
 
#define INTEL_FWH_DEVICE_CODE_ADDRESS   0x000001
 
#define INTEL_FWH_MANUFACTURER_CODE   0x89
 
#define INTEL_FWH_DEVICE_CODE_8M   0xac
 
#define INTEL_FWH_DEVICE_CODE_4M   0xad
 

Functions

 MODULE_DEVICE_TABLE (pci, pci_tbl)
 
 module_param (no_fwh_detect, int, 0)
 
 MODULE_PARM_DESC (no_fwh_detect,"Skip FWH detection:\n"" positive value - skip if FWH space locked read-only\n"" negative value - skip always")
 
 module_init (mod_init)
 
 module_exit (mod_exit)
 
 MODULE_DESCRIPTION ("H/W RNG driver for Intel chipsets")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define BIOS_CNTL_LOCK_ENABLE_MASK   0x02

Definition at line 65 of file intel-rng.c.

#define BIOS_CNTL_REG_NEW   0xdc

Definition at line 63 of file intel-rng.c.

#define BIOS_CNTL_REG_OLD   0x4e

Definition at line 62 of file intel-rng.c.

#define BIOS_CNTL_WRITE_ENABLE_MASK   0x01

Definition at line 64 of file intel-rng.c.

#define FWH_DEC_EN1_REG_NEW   0xd9 /* high byte of 16-bit register */

Definition at line 59 of file intel-rng.c.

#define FWH_DEC_EN1_REG_OLD   0xe3

Definition at line 58 of file intel-rng.c.

#define FWH_F8_EN_MASK   0x80

Definition at line 60 of file intel-rng.c.

#define INTEL_FWH_ADDR   0xffff0000

Definition at line 70 of file intel-rng.c.

#define INTEL_FWH_ADDR_LEN   2

Definition at line 71 of file intel-rng.c.

#define INTEL_FWH_DEVICE_CODE_4M   0xad

Definition at line 90 of file intel-rng.c.

#define INTEL_FWH_DEVICE_CODE_8M   0xac

Definition at line 89 of file intel-rng.c.

#define INTEL_FWH_DEVICE_CODE_ADDRESS   0x000001

Definition at line 83 of file intel-rng.c.

#define INTEL_FWH_MANUFACTURER_CODE   0x89

Definition at line 88 of file intel-rng.c.

#define INTEL_FWH_MANUFACTURER_CODE_ADDRESS   0x000000

Definition at line 82 of file intel-rng.c.

#define INTEL_FWH_READ_ID_CMD   0x90

Definition at line 77 of file intel-rng.c.

#define INTEL_FWH_RESET_CMD   0xff /* aka READ_ARRAY */

Definition at line 76 of file intel-rng.c.

#define INTEL_RNG_ADDR   0xFFBC015F

Definition at line 52 of file intel-rng.c.

#define INTEL_RNG_ADDR_LEN   3

Definition at line 53 of file intel-rng.c.

#define INTEL_RNG_DATA   2

Definition at line 47 of file intel-rng.c.

#define INTEL_RNG_DATA_PRESENT   0x01

Definition at line 46 of file intel-rng.c.

#define INTEL_RNG_ENABLED   0x01

Definition at line 44 of file intel-rng.c.

#define INTEL_RNG_HW_STATUS   0

Definition at line 42 of file intel-rng.c.

#define INTEL_RNG_PRESENT   0x40

Definition at line 43 of file intel-rng.c.

#define INTEL_RNG_STATUS   1

Definition at line 45 of file intel-rng.c.

#define PFX   KBUILD_MODNAME ": "

Definition at line 37 of file intel-rng.c.

Function Documentation

MODULE_DESCRIPTION ( "H/W RNG driver for Intel chipsets"  )
MODULE_DEVICE_TABLE ( pci  ,
pci_tbl   
)
module_exit ( mod_exit  )
module_init ( mod_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( no_fwh_detect  ,
int  ,
 
)
MODULE_PARM_DESC ( no_fwh_detect  ,
"Skip FWH detection:\n"" positive value - skip if FWH space locked read-only\n"" negative value - skip always"   
)