VirtualBox

source: vbox/trunk/src/VBox/Devices/PC/Etherboot-src/include/isapnp.h@ 5574

Last change on this file since 5574 was 1, checked in by vboxsync, 55 years ago

import

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.0 KB
Line 
1/**************************************************************************
2*
3* isapnp.h -- Etherboot isapnp support for the 3Com 3c515
4* Written 2002-2003 by Timothy Legge <tlegge@rogers.com>
5*
6* This program is free software; you can redistribute it and/or modify
7* it under the terms of the GNU General Public License as published by
8* the Free Software Foundation; either version 2 of the License, or
9* (at your option) any later version.
10*
11* This program is distributed in the hope that it will be useful,
12* but WITHOUT ANY WARRANTY; without even the implied warranty of
13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14* GNU General Public License for more details.
15*
16* You should have received a copy of the GNU General Public License
17* along with this program; if not, write to the Free Software
18* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19*
20* Portions of this code:
21* Copyright (C) 2001 P.J.H.Fox (fox@roestock.demon.co.uk)
22*
23*
24*
25* REVISION HISTORY:
26* ================
27* Version 0.1 April 26, 2002 TJL
28* Version 0.2 01/08/2003 TJL Renamed from 3c515_isapnp.h
29*
30***************************************************************************/
31
32/*extern int read_port;*/
33/*#define DEBUG*/
34#define ADDRESS_ADDR 0x0279
35#define WRITEDATA_ADDR 0x0a79
36/* MIN and MAX READ_ADDR must have the bottom two bits set */
37#define MIN_READ_ADDR 0x0203
38#define START_READ_ADDR 0x203
39#define MAX_READ_ADDR 0x03ff
40/* READ_ADDR_STEP must be a multiple of 4 */
41#ifndef READ_ADDR_STEP
42#define READ_ADDR_STEP 8
43#endif
44
45#ifdef EDEBUG
46static int x;
47#define ADDRESS(x) (outb(x, ADDRESS_ADDR), printf("\nAddress: %hX", x))
48#define WRITE_DATA(x) (outb(x, WRITEDATA_ADDR), printf(" WR(%hX)", x & 0xff))
49#define READ_DATA (x = inb(read_port), printf(" RD(%hX)", x & 0xff), x)
50#define READ_IOPORT(p) (x = inb(p), printf(" [%hX](%hX)", p, x & 0xff), x)
51#else /* !DEBUG */
52#define ADDRESS(x) outb(x, ADDRESS_ADDR)
53#define WRITE_DATA(x) outb(x, WRITEDATA_ADDR)
54#define READ_DATA inb(read_port)
55#define READ_IOPORT(p) inb(p)
56#endif /* !DEBUG */
57
58
59
60#define INIT_LENGTH 32
61
62#define INITDATA { 0x6a, 0xb5, 0xda, 0xed, 0xf6, 0xfb, 0x7d, 0xbe,\
63 0xdf, 0x6f, 0x37, 0x1b, 0x0d, 0x86, 0xc3, 0x61,\
64 0xb0, 0x58, 0x2c, 0x16, 0x8b, 0x45, 0xa2, 0xd1,\
65 0xe8, 0x74, 0x3a, 0x9d, 0xce, 0xe7, 0x73, 0x39 }
66
67/* Registers */
68#define SetRdPort(x) (ADDRESS(0x00),WRITE_DATA((x)>>2),read_port=((x)|3))
69#define SERIALISOLATION ADDRESS(0x01)
70#define CONFIGCONTROL ADDRESS(0x02)
71#define Wake(x) (ADDRESS(0x03),WRITE_DATA(x))
72#define RESOURCEDATA (ADDRESS(0x04),READ_DATA)
73#define STATUS (ADDRESS(0x05),READ_DATA)
74#define CARDSELECTNUMBER ADDRESS(0x06)
75#define LOGICALDEVICENUMBER ADDRESS(0x07)
76#define ACTIVATE ADDRESS(0x30)
77#define IORANGECHECK ADDRESS(0x31)
78
79/* Bits */
80#define CONFIG_RESET 0x01
81#define CONFIG_WAIT_FOR_KEY 0x02
82#define CONFIG_RESET_CSN 0x04
83#define CONFIG_RESET_DRV 0x07
84
85/* Short Tags */
86#define PnPVerNo_TAG 0x01
87#define LogDevId_TAG 0x02
88#define CompatDevId_TAG 0x03
89#define IRQ_TAG 0x04
90#define DMA_TAG 0x05
91#define StartDep_TAG 0x06
92#define EndDep_TAG 0x07
93#define IOport_TAG 0x08
94#define FixedIO_TAG 0x09
95#define RsvdShortA_TAG 0x0A
96#define RsvdShortB_TAG 0x0B
97#define RsvdShortC_TAG 0x0C
98#define RsvdShortD_TAG 0x0D
99#define VendorShort_TAG 0x0E
100#define End_TAG 0x0F
101/* Long Tags */
102#define MemRange_TAG 0x81
103#define ANSIstr_TAG 0x82
104#define UNICODEstr_TAG 0x83
105#define VendorLong_TAG 0x84
106#define Mem32Range_TAG 0x85
107#define FixedMem32Range_TAG 0x86
108#define RsvdLong0_TAG 0xF0
109#define RsvdLong1_TAG 0xF1
110#define RsvdLong2_TAG 0xF2
111#define RsvdLong3_TAG 0xF3
112#define RsvdLong4_TAG 0xF4
113#define RsvdLong5_TAG 0xF5
114#define RsvdLong6_TAG 0xF6
115#define RsvdLong7_TAG 0xF7
116#define RsvdLong8_TAG 0xF8
117#define RsvdLong9_TAG 0xF9
118#define RsvdLongA_TAG 0xFA
119#define RsvdLongB_TAG 0xFB
120#define RsvdLongC_TAG 0xFC
121#define RsvdLongD_TAG 0xFD
122#define RsvdLongE_TAG 0xFE
123#define RsvdLongF_TAG 0xFF
124#define NewBoard_PSEUDOTAG 0x100
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette