1 System Resources. 2 Interrupt Request (IRQ) Channels Interrupt Request (IRQ) Channels Direct Memory Access (DMA) Channels Direct Memory Access (DMA)

Post on 28-Dec-2015

226 Views

Category:

Documents

3 Downloads

Preview:

Click to see full reader

Transcript

1

System ResourcesSystem Resources

2

System ResourcesSystem Resources

Interrupt Request (IRQ) ChannelsInterrupt Request (IRQ) Channels

Direct Memory Access (DMA) ChannelsDirect Memory Access (DMA) Channels

I/O Port AddressesI/O Port Addresses

Memory AddressesMemory Addresses

3

Interrupt Requests (IRQs)Interrupt Requests (IRQs)

4

Interrupts (IRQs)Interrupts (IRQs)

Used to signal the processor that a hardware Used to signal the processor that a hardware device needs attention.device needs attention.

Used by keyboard, mouse, modem, floppy drive, Used by keyboard, mouse, modem, floppy drive, hard drive, sound card, network card, etc.hard drive, sound card, network card, etc.

Diverts the CPU to a software driver that Diverts the CPU to a software driver that services the device that generated the interrupt.services the device that generated the interrupt.

After servicing the interrupt, the CPU returns to After servicing the interrupt, the CPU returns to whatever it was doing at the time of the interrupt.whatever it was doing at the time of the interrupt.

Device needs attention.Device needs attention.

Interrupt Controller notifies the CPU.Interrupt Controller notifies the CPU.

The CPU stores its status in memory...The CPU stores its status in memory...

… and takes care of the Interrupt.… and takes care of the Interrupt.

It then retrieves its status from memoryand picks up where it left off.

It then retrieves its status from memoryand picks up where it left off.

11

8259APIC

To CPU

System Timer IRQ0

Keyboard Controller IRQ1

Available IRQ2

Serial Port 2 (COM2) IRQ3

Serial Port 1 (COM1) IRQ4

Hard Disk Controller IRQ5

Floppy Disk Controller IRQ6

Parallel Port 1 (LPT1) IRQ7

Hardware Interrupts for IBM PC/XTHardware Interrupts for IBM PC/XT

12

8259APIC

To CPU

System Timer IRQ0

Keyboard Controller IRQ1

Available IRQ2

Serial Port 2 (COM2) IRQ3

Serial Port 1 (COM1) IRQ4

Hard Disk Controller IRQ5

Floppy Disk Controller IRQ6

Parallel Port 1 (LPT1) IRQ7

Interrupt Priority for IBM PC/XTInterrupt Priority for IBM PC/XT

LowestPriority

LowestPriority

HighestPriority

HighestPriority

13

To CPU

8259APIC

IRQ0

IRQ1

IRQ2

IRQ3

IRQ4

IRQ5

IRQ6

IRQ7

Hardware Interrupts for IBM ATHardware Interrupts for IBM AT

8259APIC

IRQ8

IRQ9

IRQ10

IRQ11

IRQ12

IRQ13

IRQ14

IRQ15

14

Default Assignments (IRQs 0-7)Default Assignments (IRQs 0-7) IRQ0IRQ0 System TimerSystem Timer

IRQ1IRQ1 Keyboard ControllerKeyboard Controller

IRQ2IRQ2 Cascade to 2nd PICCascade to 2nd PIC

IRQ3IRQ3 Serial Port 2 (COM2)Serial Port 2 (COM2)

IRQ4IRQ4 Serial Port 1 (COM1)Serial Port 1 (COM1)

IRQ5IRQ5 Sound Card or Parallel Port 2 (LPT2)Sound Card or Parallel Port 2 (LPT2)

IRQ6IRQ6 Floppy Drive ControllerFloppy Drive Controller

IRQ7IRQ7 Parallel Port 1 (LPT1)Parallel Port 1 (LPT1)

15

Default Assignments (IRQs 8-15) Default Assignments (IRQs 8-15)

IRQ8IRQ8 Real Time ClockReal Time Clock

IRQ9IRQ9 AvailableAvailable

IRQ10IRQ10 AvailableAvailable

IRQ11IRQ11 AvailableAvailable

IRQ12IRQ12 PS/2 MousePS/2 Mouse

IRQ13IRQ13 Math CoprocessorMath Coprocessor

IRQ14IRQ14 Primary IDEPrimary IDE

IRQ15IRQ15 Secondary IDESecondary IDE

16

To CPU

8259APIC

IRQ0

IRQ1

IRQ2

IRQ3

IRQ4

IRQ5

IRQ6

IRQ7

Interrupt Priority for IBM ATInterrupt Priority for IBM AT

8259APIC

IRQ8

IRQ9

IRQ10

IRQ11

IRQ12

IRQ13

IRQ14

IRQ15

HighestPriority

HighestPriority

LowestPriority

LowestPriority

17

Priority of InterruptsPriority of Interrupts

IRQ0IRQ0

IRQ1IRQ1

– IRQ8IRQ8

– IRQ9IRQ9

– IRQ10IRQ10

– IRQ11IRQ11

– IRQ12IRQ12

– IRQ13IRQ13

– IRQ14IRQ14

– IRQ15IRQ15

IRQ3IRQ3

IRQ4IRQ4

IRQ5IRQ5

IRQ6IRQ6

IRQ7IRQ7IRQ

2

18

What did you do with boards that What did you do with boards that required IRQ2?required IRQ2?

You used IRQ9 instead.You used IRQ9 instead.

Some boards still use the IRQ2 label.Some boards still use the IRQ2 label.

Others use a dual IRQ2/IRQ9 label.Others use a dual IRQ2/IRQ9 label.

19

IRQ ConflictsIRQ Conflicts

Occur when two devices try to use the same Occur when two devices try to use the same interrupt line.interrupt line.

Will cause one or both devices to Will cause one or both devices to malfunction or the system to hang.malfunction or the system to hang.

Are resolved by changing the IRQ Are resolved by changing the IRQ assignment of one of the devices.assignment of one of the devices.

20

Direct Memory Access (DMA) Direct Memory Access (DMA)

DMA allows the floppy controller to transfer data directly to memory.DMA allows the floppy controller to transfer data directly to memory.

Floppy Controller

Without DMA, the CPU grabs a couple of bytes...Without DMA, the CPU grabs a couple of bytes...

Floppy Controller Floppy Drive

… and stores them in memory… and stores them in memory

Floppy Controller Floppy Drive

DMA allows the floppy controller to transfer data directly to memory.DMA allows the floppy controller to transfer data directly to memory.

Floppy Controller Floppy Drive

25

ISA/PCI Default DMA-Channel ISA/PCI Default DMA-Channel AssignmentsAssignments

0 Available None1 Available 8-bit sound2 Floppy Drive Controller3 Available LPT1 in ECP Mode4 Cascade to first DMA Controller5 Available 16-bit Sound6 Available ISA SCSI Adapter7 Available

DMA Standard Function Recommended Use

26

DMA conflicts occur if two DMA conflicts occur if two devices try to use the same DMA devices try to use the same DMA

channel.channel.

27

I/O Port AddressesI/O Port Addresses

28

What are I/O port addresses?What are I/O port addresses?

It’s the way the CPU tells its peripherals apart.It’s the way the CPU tells its peripherals apart.

It can be thought of as hardware addresses.It can be thought of as hardware addresses.

These addresses are totally separate from memory These addresses are totally separate from memory addresses.addresses.

There are 64 K of I/O port addresses.There are 64 K of I/O port addresses.

In Hexadecimal, their addresses are 0000-FFFF.In Hexadecimal, their addresses are 0000-FFFF.

29

Some Common I/O Port Some Common I/O Port Addresses.Addresses.

0060-00640060-0064 KeyboardKeyboard

02F8-02FF02F8-02FF Serial Port 2 (COM2)Serial Port 2 (COM2)

0378-037F0378-037F Parallel Port 1 (LPT1)Parallel Port 1 (LPT1)

03F8-03FF03F8-03FF Serial Port 1 (COM1)Serial Port 1 (COM1)

30

Memory AddressesMemory Addresses

31

Memory AddressesMemory Addresses

ROM Addresses - Many boards include ROM Addresses - Many boards include some of their software in ROM.some of their software in ROM.

RAM Addresses - Many devices require a RAM Addresses - Many devices require a small buffer RAM to hold data temporarily.small buffer RAM to hold data temporarily.

32

What is a Resource Conflict?What is a Resource Conflict?

33

Resource conflicts occur when two Resource conflicts occur when two devices attempt to use the same:devices attempt to use the same:

IRQ lineIRQ line

DMA channelDMA channel

I/O port addressI/O port address

ROM addressROM address

RAM addressRAM address

34

What are the symptoms of a What are the symptoms of a resource conflict?resource conflict?

The system hangs.The system hangs.

A device (mouse, keyboard, printer, etc.) A device (mouse, keyboard, printer, etc.) doesn’t work.doesn’t work.

The monitor displays funny characters.The monitor displays funny characters.

The printer prints funny characters.The printer prints funny characters.

35

Resolving Resource ConflictsResolving Resource Conflicts Find out which devices are conflicting.Find out which devices are conflicting.

– Manual or Instruction SheetManual or Instruction Sheet

– Software DiagnosticsSoftware Diagnostics

Change the resources of one of the conflicting devices.Change the resources of one of the conflicting devices.

– JumpersJumpers

– SetupSetup

– Control Panel (Windows 3.11)Control Panel (Windows 3.11)

– Device Manager (Windows 95 or 98) Device Manager (Windows 95 or 98)

top related