/*
* Code to deal with the PReP residual data.
*
* Written by: Cort Dougan (cort@cs.nmt.edu)
* Improved _greatly_ and rewritten by Gabriel Paubert (paubert@iram.es)
*
* This file is based on the following documentation:
*
* IBM Power Personal Systems Architecture
* Residual Data
* Document Number: PPS-AR-FW0001
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file COPYING in the main directory of this archive
* for more details.
*
*/
#include <linux/string.h>
#include <asm/residual.h>
#include <asm/pnp.h>
#include <asm/byteorder.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/stddef.h>
#include <linux/unistd.h>
#include <linux/ptrace.h>
#include <linux/slab.h>
#include <linux/user.h>
#include <linux/a.out.h>
#include <linux/tty.h>
#include <linux/major.h>
#include <linux/interrupt.h>
#include <linux/reboot.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/pci.h>
#include <linux/ide.h>
#include <asm/sections.h>
#include <asm/mmu.h>
#include <asm/io.h>
#include <asm/pgtable.h>
#include <asm/ide.h>
unsigned char __res[sizeof(RESIDUAL)] = {0,};
RESIDUAL *res = (RESIDUAL *)&__res;
char * PnP_BASE_TYPES[] __initdata = {
"Reserved",
"MassStorageDevice",
"NetworkInterfaceController",
"DisplayController",
"MultimediaController",
"MemoryController",
"BridgeController",
"CommunicationsDevice",
"SystemPeripheral",
"InputDevice",
"ServiceProcessor"
};
/* Device Sub Type Codes */
unsigned char * PnP_SUB_TYPES[] __initdata = {
"\001\000SCSIController",
"\001\001IDEController",
"\001\002FloppyController",
"\001\003IPIController",
"\001\200OtherMassStorageController",
"\002\000EthernetController",
"\002\001TokenRingController",
"\002\002FDDIController",
"\002\0x80OtherNetworkController",
"\003\000VGAController",
"\003\001SVGAController",
"\003\002XGAController",
"\003\200OtherDisplayController",
"\004\000VideoController",
"\004\001AudioController",
"\004\200OtherMultimediaController",
"\005\000RAM",
"\005\001FLASH",
"\005\200OtherMemoryDevice",
"\006\000HostProcessorBridge",
"\006\001ISABridge",
"\006\002EISABridge",
"\006\003MicroChannelBridge",
"\006\004PCIBridge",
"\006\005PCMCIABridge",
"\006\006VMEBridge",
"\006\200OtherBridgeDevice",
"\007\000RS232Device",
"\007\001ATCompatibleParallelPort",
"\007\200OtherCommunicationsDevice",
"\010\000ProgrammableInterruptController",
"\010\001DMAController",
"\010\002SystemTimer",
"\010\003RealTimeClock",
"\010\004L2Cache",
"\010\005NVRAM",
"\010\006PowerManagement",
"\010\007CMOS",
"\010\010OperatorPanel",
"\010\011ServiceProcessorClass1",
"\010\012ServiceProcessorClass2",
"\010\013ServiceProcessorClass3",
"\010\014GraphicAssist",
"\010\017SystemPlanar",
"\010\200OtherSystemPeripheral",
"\011\000KeyboardController",
"\011\001Digitizer",
"\011\002MouseController",
"\011\003TabletController",
"\011\0x80OtherInputController",
"\012\000GeneralMemoryController",
NULL
};
/* Device Interface Type Codes */
unsigned char * PnP_INTERFACES[] __initdata = {
"\000\000\000General",
"\001\000\000GeneralSCSI",
"\001\001\000GeneralIDE",
"\001\001\001ATACompatible",
"\001\002\000GeneralFloppy",
"\001\002\001Compatible765",
"\001\002\002NS398_Floppy", /* NS Super I/O wired to use index
register at port 398 and data
register at port 399 */
"\001\002\003NS26E_Floppy", /* Ports 26E and 26F */
"\001\002\004NS15C_Floppy", /* Ports 15C and 15D */
"\001\002\005NS2E_Floppy", /* Ports 2E and 2F */
"\001\002\006CHRP_Floppy", /* CHRP Floppy in PR*P system */
"\001\003\000GeneralIPI",
"\002\000\000GeneralEther",
"\002\001\000GeneralToken",
"\002\002\000GeneralFDDI",
"\003\000\000GeneralVGA",
"\003\001\000GeneralSVGA",
"\003\002\000GeneralXGA",
"\004\000\000GeneralVideo",
"\004\001\000GeneralAudio",
"\004\001\001CS4232Audio", /* CS 4232 Plug 'n Play Configured */
"\005\000\000GeneralRAM",
/* This one is obviously wrong ! */
"\005\000\000PCIMemoryController", /* PCI Config Method */
"\005\000\001RS6KMemoryController", /* RS6K Config Method */
"\005\001\000GeneralFLASH",
"\006\000\000GeneralHostBridge",
"\006\001\000GeneralISABridge",
"\006\002\000GeneralEISABridge",
"\006\003\000GeneralMCABridge",
/* GeneralPCIBridge = 0, */
"\006\004\000PCIBridgeDirect",
"\006\004\001PCIBridgeIndirect",
"\006\004\002PCIBridgeRS6K",
"\006\005\000GeneralPCMCIABridge",
"\006\006\000GeneralVMEBridge",
"\007\000\000GeneralRS232",
"\007\000\001COMx",
"\007\000\002Compatible16450",
"\007\000\003