coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
device.c File Reference
#include "device.h"
#include "compat/rtas.h"
#include <string.h>
#include "debug.h"
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ops.h>
#include <device/resource.h>
Include dependency graph for device.c:

Go to the source code of this file.

Data Structures

struct  __packed
 

Functions

void translate_address_dev (u64 *, phandle_t)
 
u64 get_puid (phandle_t node)
 
void biosemu_dev_get_addr_info (void)
 
void biosemu_add_special_memory (u32 start, u32 size)
 
static void biosemu_dev_find_vmem_addr (void)
 
void biosemu_dev_get_puid (void)
 
static void biosemu_dev_get_device_vendor_id (void)
 
u8 biosemu_dev_check_exprom (unsigned long rom_base_addr)
 
u8 biosemu_dev_init (struct device *device)
 
u8 biosemu_dev_translate_address (int type, unsigned long *addr)
 

Variables

biosemu_device_t bios_device
 
translate_address_t translate_address_array [13]
 
u8 taa_last_entry
 

Function Documentation

◆ biosemu_add_special_memory()

void biosemu_add_special_memory ( u32  start,
u32  size 
)

Definition at line 235 of file device.c.

References IORESOURCE_FIXED, IORESOURCE_MEM, resource::size, taa_last_entry, and translate_address_array.

Referenced by biosemu().

Here is the caller graph for this function:

◆ biosemu_dev_check_exprom()

u8 biosemu_dev_check_exprom ( unsigned long  rom_base_addr)

Definition at line 331 of file device.c.

References bios_device, clr_ci(), DEBUG_PRINTF, dump, biosemu_device_t::img_addr, biosemu_device_t::img_size, in16le(), memcpy(), biosemu_device_t::pci_device_id, biosemu_device_t::pci_vendor_id, printf, set_ci(), strncmp(), taa_last_entry, and translate_address_array.

Referenced by biosemu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ biosemu_dev_find_vmem_addr()

static void biosemu_dev_find_vmem_addr ( void  )
static

Definition at line 254 of file device.c.

References bios_device, DEBUG_PRINTF, taa_last_entry, translate_address_array, biosemu_device_t::vmem_addr, and biosemu_device_t::vmem_size.

Referenced by biosemu_dev_init().

Here is the caller graph for this function:

◆ biosemu_dev_get_addr_info()

void biosemu_dev_get_addr_info ( void  )

Definition at line 155 of file device.c.

References bios_device, buf, biosemu_device_t::bus, DEBUG_PRINTF, biosemu_device_t::devfn, of_getprop(), biosemu_device_t::phandle, printf, resource::size, taa_last_entry, translate_address_array, and translate_address_dev().

Referenced by biosemu_dev_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ biosemu_dev_get_device_vendor_id()

static void biosemu_dev_get_device_vendor_id ( void  )
static

Definition at line 306 of file device.c.

References bios_device, biosemu_device_t::bus, DEBUG_PRINTF, biosemu_device_t::dev, biosemu_device_t::devfn, biosemu_device_t::pci_device_id, pci_read_config32(), biosemu_device_t::pci_vendor_id, biosemu_device_t::puid, and rtas_pci_config_read().

Referenced by biosemu_dev_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ biosemu_dev_get_puid()

void biosemu_dev_get_puid ( void  )

Definition at line 297 of file device.c.

References bios_device, DEBUG_PRINTF, get_puid(), biosemu_device_t::phandle, and biosemu_device_t::puid.

Referenced by biosemu_dev_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ biosemu_dev_init()

u8 biosemu_dev_init ( struct device device)

◆ biosemu_dev_translate_address()

u8 biosemu_dev_translate_address ( int  type,
unsigned long *  addr 
)

◆ get_puid()

u64 get_puid ( phandle_t  node)

Referenced by biosemu_dev_get_puid().

Here is the caller graph for this function:

◆ translate_address_dev()

void translate_address_dev ( u64 ,
phandle_t   
)

Referenced by biosemu_dev_get_addr_info().

Here is the caller graph for this function:

Variable Documentation

◆ bios_device

◆ taa_last_entry

◆ translate_address_array

translate_address_t translate_address_array[13]