iPXE
Functions
pic8259.c File Reference

Minimal support for the 8259 Programmable Interrupt Controller. More...

#include <ipxe/io.h>
#include <pic8259.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER)
 
static void send_nonspecific_eoi (unsigned int irq)
 Send non-specific EOI(s) More...
 
static void send_specific_eoi (unsigned int irq)
 Send specific EOI(s) More...
 
void send_eoi (unsigned int irq)
 Send End-Of-Interrupt to the PIC. More...
 

Detailed Description

Minimal support for the 8259 Programmable Interrupt Controller.

Definition in file pic8259.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER  )

◆ send_nonspecific_eoi()

static void send_nonspecific_eoi ( unsigned int  irq)
inlinestatic

Send non-specific EOI(s)

Parameters
irqIRQ number

This seems to be inherently unsafe.

Definition at line 38 of file pic8259.c.

38  {
39  DBG ( "Sending non-specific EOI for IRQ %d\n", irq );
40  if ( irq >= IRQ_PIC_CUTOFF ) {
42  }
44 }
#define ICR_EOI_NON_SPECIFIC
Definition: pic8259.h:42
#define PIC2_ICR
Definition: pic8259.h:30
#define outb(data, io_addr)
Definition: io.h:309
#define IRQ_PIC_CUTOFF
Definition: pic8259.h:14
#define DBG(...)
Print a debugging message.
Definition: compiler.h:498
#define PIC1_ICR
Definition: pic8259.h:20

References DBG, ICR_EOI_NON_SPECIFIC, IRQ_PIC_CUTOFF, outb, PIC1_ICR, and PIC2_ICR.

◆ send_specific_eoi()

static void send_specific_eoi ( unsigned int  irq)
inlinestatic

Send specific EOI(s)

Parameters
irqIRQ number

Definition at line 51 of file pic8259.c.

51  {
52  DBG ( "Sending specific EOI for IRQ %d\n", irq );
53  if ( irq >= IRQ_PIC_CUTOFF ) {
55  ICR_REG ( CHAINED_IRQ ) );
56  }
57  outb ( ( ICR_EOI_SPECIFIC | ICR_VALUE ( irq ) ), ICR_REG ( irq ) );
58 }
#define ICR_VALUE(irq)
Definition: pic8259.h:56
#define ICR_REG(irq)
Definition: pic8259.h:55
#define outb(data, io_addr)
Definition: io.h:309
#define IRQ_PIC_CUTOFF
Definition: pic8259.h:14
#define DBG(...)
Print a debugging message.
Definition: compiler.h:498
#define CHAINED_IRQ
Definition: pic8259.h:57
#define ICR_EOI_SPECIFIC
Definition: pic8259.h:44

References CHAINED_IRQ, DBG, ICR_EOI_SPECIFIC, ICR_REG, ICR_VALUE, IRQ_PIC_CUTOFF, and outb.

Referenced by send_eoi().

◆ send_eoi()

void send_eoi ( unsigned int  irq)

Send End-Of-Interrupt to the PIC.

Parameters
irqIRQ number

Definition at line 65 of file pic8259.c.

65  {
66  send_specific_eoi ( irq );
67 }
static void send_specific_eoi(unsigned int irq)
Send specific EOI(s)
Definition: pic8259.c:51

References send_specific_eoi().

Referenced by undinet_open().