Document origin of the arch/x86/i8259.c file.
Drop unneeded comments. Cosmetic fixes. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@263 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
parent
08dc781513
commit
9963c4c616
2 changed files with 29 additions and 28 deletions
4
HACKING
4
HACKING
|
|
@ -69,3 +69,7 @@ Third-party Code and License Overview
|
|||
Source: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
|
||||
Current version we use: ?
|
||||
|
||||
* arch/x86/i8259.c: GPLv2
|
||||
Source: Linux kernel, arch/i386/boot/setup.S
|
||||
Current version we use: Linux 2.2.26
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,19 @@
|
|||
#include <arch/io.h>
|
||||
/* code taken from:
|
||||
!
|
||||
! setup.S Copyright (C) 1991, 1992 Linus Torvalds
|
||||
!
|
||||
! setup.s is responsible for getting the system data from the BIOS,
|
||||
! and putting them into the appropriate places in system memory.
|
||||
! both setup.s and system has been loaded by the bootblock.
|
||||
/*
|
||||
* This file is part of the LinuxBIOS project.
|
||||
*
|
||||
* It is based on the arch/i386/boot/setup.S file from the Linux kernel.
|
||||
*/
|
||||
/* we're getting screwed again and again by this problem of the 8259.
|
||||
* so we're going to leave this lying around for inclusion into
|
||||
* crt0.S on an as-needed basis.
|
||||
|
||||
/*
|
||||
! setup.S Copyright (C) 1991, 1992 Linus Torvalds
|
||||
!
|
||||
! some changes and additional features by Christoph Niemann,
|
||||
! March 1993/June 1994 (Christoph.Niemann@linux.org)
|
||||
*/
|
||||
|
||||
#include <arch/io.h>
|
||||
|
||||
/*
|
||||
! well, that went ok, I hope. Now we have to reprogram the interrupts :-(
|
||||
! we put them right after the intel-reserved hardware interrupts, at
|
||||
! int 0x20-0x2F. There they won't mess up anything. Sadly IBM really
|
||||
|
|
@ -18,24 +22,17 @@
|
|||
! which is used for the internal hardware interrupts as well. We just
|
||||
! have to reprogram the 8259's, and it isn't fun.
|
||||
*/
|
||||
|
||||
void setup_i8259(void)
|
||||
{
|
||||
outb(0x11, 0x20); /*! initialization sequence to 8259A-1*/
|
||||
outb(0x11, 0xA0); /*! and to 8259A-2*/
|
||||
outb(0x20, 0x21); /*! start of hardware int's (0x20)*/
|
||||
outb(0x28, 0xA1); /*! start of hardware int's 2 (0x28)*/
|
||||
outb(0x04, 0x21); /*! 8259-1 is master*/
|
||||
outb(0x02, 0xA1); /*! 8259-2 is slave*/
|
||||
outb(0x01, 0x21); /*! 8086 mode for both*/
|
||||
outb(0x01, 0xA1);
|
||||
outb(0xFF, 0xA1); /*! mask off all interrupts for now*/
|
||||
outb(0xFB, 0x21); /*! mask all irq's but irq2 which is cascaded*/
|
||||
outb(0x11, 0x20); /* Initialization sequence (8259A-1). */
|
||||
outb(0x11, 0xA0); /* Initialization sequence (8259A-2). */
|
||||
outb(0x20, 0x21); /* Start of hardware INTs (0x20). */
|
||||
outb(0x28, 0xA1); /* Start of hardware INTs 2 (0x28). */
|
||||
outb(0x04, 0x21); /* 8259-1 is master. */
|
||||
outb(0x02, 0xA1); /* 8259-2 is slave. */
|
||||
outb(0x01, 0x21); /* 8086 mode for both. */
|
||||
outb(0x01, 0xA1);
|
||||
outb(0xFF, 0xA1); /* Mask off all interrupts for now. */
|
||||
outb(0xFB, 0x21); /* Mask all IRQs but IRQ2 which is cascaded. */
|
||||
}
|
||||
|
||||
/*
|
||||
* I like the way Linus says it:
|
||||
! Well, that certainly wasn't fun :-(. Hopefully it works, and we don't
|
||||
! need no steenking BIOS anyway (except for the initial loading :-).
|
||||
*/
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue