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

Go to the source code of this file.

Functions

static unsigned int read_io (void *addr, size_t sz)
 
static int write_io (void *addr, unsigned int value, size_t sz)
 
u32 pci_cfg_read (X86EMU_pioAddr addr, u8 size)
 
void pci_cfg_write (X86EMU_pioAddr addr, u32 val, u8 size)
 
u8 handle_port_61h (void)
 
u8 my_inb (X86EMU_pioAddr addr)
 
u16 my_inw (X86EMU_pioAddr addr)
 
u32 my_inl (X86EMU_pioAddr addr)
 
void my_outb (X86EMU_pioAddr addr, u8 val)
 
void my_outw (X86EMU_pioAddr addr, u16 val)
 
void my_outl (X86EMU_pioAddr addr, u32 val)
 

Function Documentation

◆ handle_port_61h()

u8 handle_port_61h ( void  )

Definition at line 533 of file io.c.

References bios_device, get_time(), biosemu_device_t::io_buffer, and tb_freq.

Here is the call graph for this function:

◆ my_inb()

◆ my_inl()

u32 my_inl ( X86EMU_pioAddr  addr)

Definition at line 247 of file io.c.

References addr, bios_device, biosemu_dev_translate_address(), DEBUG_PRINTF_IO, in32le(), biosemu_device_t::io_buffer, IORESOURCE_IO, pci_cfg_read(), and read_io().

Referenced by pci_cfg_read(), and pci_cfg_write().

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

◆ my_inw()

u16 my_inw ( X86EMU_pioAddr  addr)

Definition at line 202 of file io.c.

References addr, bios_device, biosemu_dev_translate_address(), DEBUG_PRINTF_IO, in16le(), biosemu_device_t::io_buffer, IORESOURCE_IO, pci_cfg_read(), and read_io().

Here is the call graph for this function:

◆ my_outb()

void my_outb ( X86EMU_pioAddr  addr,
u8  val 
)

Definition at line 293 of file io.c.

References addr, bios_device, biosemu_dev_translate_address(), DEBUG_PRINTF_IO, biosemu_device_t::io_buffer, IORESOURCE_IO, pci_cfg_write(), val, and write_io().

Here is the call graph for this function:

◆ my_outl()

void my_outl ( X86EMU_pioAddr  addr,
u32  val 
)

Definition at line 366 of file io.c.

References addr, bios_device, biosemu_dev_translate_address(), DEBUG_PRINTF_IO, in32le(), biosemu_device_t::io_buffer, IORESOURCE_IO, out32le(), pci_cfg_write(), val, and write_io().

Here is the call graph for this function:

◆ my_outw()

void my_outw ( X86EMU_pioAddr  addr,
u16  val 
)

Definition at line 325 of file io.c.

References addr, bios_device, biosemu_dev_translate_address(), DEBUG_PRINTF_IO, in16le(), biosemu_device_t::io_buffer, IORESOURCE_IO, out16le(), pci_cfg_write(), val, and write_io().

Here is the call graph for this function:

◆ pci_cfg_read()

u32 pci_cfg_read ( X86EMU_pioAddr  addr,
u8  size 
)

◆ pci_cfg_write()

void pci_cfg_write ( X86EMU_pioAddr  addr,
u32  val,
u8  size 
)

Definition at line 476 of file io.c.

References addr, bios_device, biosemu_device_t::bus, device::bus, CONFIG, DEBUG_PRINTF_IO, biosemu_device_t::dev, biosemu_device_t::devfn, HALT_SYS, my_inl(), NULL, pci_write_config16(), pci_write_config32(), pci_write_config8(), printf, biosemu_device_t::puid, rtas_pci_config_write(), and val.

Referenced by my_outb(), my_outl(), and my_outw().

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

◆ read_io()

static unsigned int read_io ( void addr,
size_t  sz 
)
static

Definition at line 102 of file io.c.

References addr, inb(), inl(), and inw().

Referenced by my_inb(), my_inl(), and my_inw().

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

◆ write_io()

static int write_io ( void addr,
unsigned int  value,
size_t  sz 
)
static

Definition at line 126 of file io.c.

References addr, outb(), outl(), outw(), and value.

Referenced by my_outb(), my_outl(), and my_outw().

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