[CSE]  Advanced Operating Systems 
 COMP9242 2003/S2 
UNSW

PRINTER Printer-Friendly Version
Administration               
- Notices
- Course Intro
- Consultations
- Survey Results
 
Work
- Lectures
- Selected Papers
- Milestone 0
- Project Spec
  (Milestones 1, 2, ...)
- Project FAQ
- Exam
 
Documentation
- ASysT Lab
- L4Ka::Pistachio FAQ
# L4 source browser
- Sulima ISA Simulator
R4x00 ISA Summary 
MIPS R4700 ReferenceMIPS R4000 User Manual 
- GT64111
# Network Driver
 
Related Info
- Aurema OS Prize
- OS Hall of Fame
 
History
- 2002
- 2000
- 1999
- 1998
 
Staff
- Gernot Heiser (LiC)
- Kevin Elphinstone
- Guest Lecturers (TBA)
 
Stureps
- Student Reps

 
Valid HTML 4.0!

GT PCI Library

The GT library provides access to the GT chip's PCI functionality. It allows you to access the configuration registers and also handles demultiplexing interrupts. You shouldn't need to directly use libgt, the provided code should take care of it.

gt_init

struct chipset * gt_init(host_handle_t host)

gt_init initalises the state of the gt driver and returns a handle to the driver. For your uses the host argument can be NULL.

Methods

For various reasons (this code is used in other projects), rather than directly calling GT functions, they should all be accessed through a function pointer table. This is like invoking methods on an object in object-oriented programming languages.

conf_write_<n>

void conf_write_<n>(void *pvt, int bus, int device, int function, int register_num, uint<n>);

There are versions of this function for n = 8, 16, or 32. This function will write a value to a specific PCI configuration register.

conf_read_<n>

void conf_read_<n>(void *pvt, int bus, int device, int function, int register_num, uint<n>);

There are versions of this function for n = 8, 16, or 32. This function will read a value to a specific PCI configuration register.

pci_iospace_map

bus_space_t pci_iospace_map(void *pvt, bus_addr_t addr, uintptr_t size, int flags);

This function will map a section of PCI memory into the address space and provide a handle to it.

pci_register_interrupt

int pci_register_interrupt(void *pvt, int irq, exec_handle_t handler);

This function registers a handler for a given PCI interrupt.


Last modified: 10 Sep 2003.