Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
rom.c File Reference
#include <linux/kernel.h>
#include <linux/export.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include "pci.h"

Go to the source code of this file.

Functions

int pci_enable_rom (struct pci_dev *pdev)
 
void pci_disable_rom (struct pci_dev *pdev)
 
size_t pci_get_rom_size (struct pci_dev *pdev, void __iomem *rom, size_t size)
 
void __iomempci_map_rom (struct pci_dev *pdev, size_t *size)
 
void pci_unmap_rom (struct pci_dev *pdev, void __iomem *rom)
 
void pci_cleanup_rom (struct pci_dev *pdev)
 
 EXPORT_SYMBOL (pci_map_rom)
 
 EXPORT_SYMBOL (pci_unmap_rom)
 
 EXPORT_SYMBOL_GPL (pci_enable_rom)
 
 EXPORT_SYMBOL_GPL (pci_disable_rom)
 

Function Documentation

EXPORT_SYMBOL ( pci_map_rom  )
EXPORT_SYMBOL ( pci_unmap_rom  )
EXPORT_SYMBOL_GPL ( pci_enable_rom  )
EXPORT_SYMBOL_GPL ( pci_disable_rom  )
void pci_cleanup_rom ( struct pci_dev pdev)

pci_cleanup_rom - free the ROM copy created by pci_map_rom_copy : pointer to pci device struct

Free the copied ROM if we allocated one.

Definition at line 197 of file rom.c.

void pci_disable_rom ( struct pci_dev pdev)

pci_disable_rom - disable ROM decoding for a PCI device : PCI device to disable

Disable ROM decoding on a PCI device by turning off the last bit in the ROM BAR.

Definition at line 49 of file rom.c.

int pci_enable_rom ( struct pci_dev pdev)

pci_enable_rom - enable ROM decoding for a PCI device : PCI device to enable

Enable ROM decoding on . This involves simply turning on the last bit of the PCI ROM BAR. Note that some cards may share address decoders between the ROM and other resources, so enabling it may disable access to MMIO registers or other card memory.

Definition at line 25 of file rom.c.

size_t pci_get_rom_size ( struct pci_dev pdev,
void __iomem rom,
size_t  size 
)

pci_get_rom_size - obtain the actual size of the ROM image : target PCI device : kernel virtual pointer to image of ROM : size of PCI window return: size of actual ROM image

Determine the actual length of the ROM image. The PCI window size could be much larger than the actual image size.

Definition at line 68 of file rom.c.

void __iomem* pci_map_rom ( struct pci_dev pdev,
size_t size 
)

pci_map_rom - map a PCI ROM to kernel space : pointer to pci device struct : pointer to receive size of pci window over ROM

Return: kernel virtual pointer to image of ROM

Map a PCI ROM into kernel space. If ROM is boot video ROM, the shadow BIOS copy will be returned instead of the actual ROM.

Definition at line 114 of file rom.c.

void pci_unmap_rom ( struct pci_dev pdev,
void __iomem rom 
)

pci_unmap_rom - unmap the ROM from kernel space : pointer to pci device struct : virtual address of the previous mapping

Remove a mapping of a previously mapped ROM

Definition at line 177 of file rom.c.