VirtualBox

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

最後變更 在這個檔案從46910是 33656,由 vboxsync 提交於 14 年 前

*: rebrand Sun (L)GPL disclaimers

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 4.5 KB
 
1/**************************************************************************
2*
3* isapnp.h -- Etherboot isapnp support for the 3Com 3c515
4* Written 2002-2003 by Timothy Legge <[email protected]>
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 ([email protected])
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
33/*
34 * Oracle GPL Disclaimer: For the avoidance of doubt, except that if any license choice
35 * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
36 * the General Public License version 2 (GPLv2) at this time for any software where
37 * a choice of GPL license versions is made available with the language indicating
38 * that GPLv2 or any later version may be used, or where a choice of which version
39 * of the GPL is applied is otherwise unspecified.
40 */
41
42*
43***************************************************************************/
44
45/*extern int read_port;*/
46/*#define DEBUG*/
47#define ADDRESS_ADDR 0x0279
48#define WRITEDATA_ADDR 0x0a79
49/* MIN and MAX READ_ADDR must have the bottom two bits set */
50#define MIN_READ_ADDR 0x0203
51#define START_READ_ADDR 0x203
52#define MAX_READ_ADDR 0x03ff
53/* READ_ADDR_STEP must be a multiple of 4 */
54#ifndef READ_ADDR_STEP
55#define READ_ADDR_STEP 8
56#endif
57
58#ifdef EDEBUG
59static int x;
60#define ADDRESS(x) (outb(x, ADDRESS_ADDR), printf("\nAddress: %hX", x))
61#define WRITE_DATA(x) (outb(x, WRITEDATA_ADDR), printf(" WR(%hX)", x & 0xff))
62#define READ_DATA (x = inb(read_port), printf(" RD(%hX)", x & 0xff), x)
63#define READ_IOPORT(p) (x = inb(p), printf(" [%hX](%hX)", p, x & 0xff), x)
64#else /* !DEBUG */
65#define ADDRESS(x) outb(x, ADDRESS_ADDR)
66#define WRITE_DATA(x) outb(x, WRITEDATA_ADDR)
67#define READ_DATA inb(read_port)
68#define READ_IOPORT(p) inb(p)
69#endif /* !DEBUG */
70
71
72
73#define INIT_LENGTH 32
74
75#define INITDATA { 0x6a, 0xb5, 0xda, 0xed, 0xf6, 0xfb, 0x7d, 0xbe,\
76 0xdf, 0x6f, 0x37, 0x1b, 0x0d, 0x86, 0xc3, 0x61,\
77 0xb0, 0x58, 0x2c, 0x16, 0x8b, 0x45, 0xa2, 0xd1,\
78 0xe8, 0x74, 0x3a, 0x9d, 0xce, 0xe7, 0x73, 0x39 }
79
80/* Registers */
81#define SetRdPort(x) (ADDRESS(0x00),WRITE_DATA((x)>>2),read_port=((x)|3))
82#define SERIALISOLATION ADDRESS(0x01)
83#define CONFIGCONTROL ADDRESS(0x02)
84#define Wake(x) (ADDRESS(0x03),WRITE_DATA(x))
85#define RESOURCEDATA (ADDRESS(0x04),READ_DATA)
86#define STATUS (ADDRESS(0x05),READ_DATA)
87#define CARDSELECTNUMBER ADDRESS(0x06)
88#define LOGICALDEVICENUMBER ADDRESS(0x07)
89#define ACTIVATE ADDRESS(0x30)
90#define IORANGECHECK ADDRESS(0x31)
91
92/* Bits */
93#define CONFIG_RESET 0x01
94#define CONFIG_WAIT_FOR_KEY 0x02
95#define CONFIG_RESET_CSN 0x04
96#define CONFIG_RESET_DRV 0x07
97
98/* Short Tags */
99#define PnPVerNo_TAG 0x01
100#define LogDevId_TAG 0x02
101#define CompatDevId_TAG 0x03
102#define IRQ_TAG 0x04
103#define DMA_TAG 0x05
104#define StartDep_TAG 0x06
105#define EndDep_TAG 0x07
106#define IOport_TAG 0x08
107#define FixedIO_TAG 0x09
108#define RsvdShortA_TAG 0x0A
109#define RsvdShortB_TAG 0x0B
110#define RsvdShortC_TAG 0x0C
111#define RsvdShortD_TAG 0x0D
112#define VendorShort_TAG 0x0E
113#define End_TAG 0x0F
114/* Long Tags */
115#define MemRange_TAG 0x81
116#define ANSIstr_TAG 0x82
117#define UNICODEstr_TAG 0x83
118#define VendorLong_TAG 0x84
119#define Mem32Range_TAG 0x85
120#define FixedMem32Range_TAG 0x86
121#define RsvdLong0_TAG 0xF0
122#define RsvdLong1_TAG 0xF1
123#define RsvdLong2_TAG 0xF2
124#define RsvdLong3_TAG 0xF3
125#define RsvdLong4_TAG 0xF4
126#define RsvdLong5_TAG 0xF5
127#define RsvdLong6_TAG 0xF6
128#define RsvdLong7_TAG 0xF7
129#define RsvdLong8_TAG 0xF8
130#define RsvdLong9_TAG 0xF9
131#define RsvdLongA_TAG 0xFA
132#define RsvdLongB_TAG 0xFB
133#define RsvdLongC_TAG 0xFC
134#define RsvdLongD_TAG 0xFD
135#define RsvdLongE_TAG 0xFE
136#define RsvdLongF_TAG 0xFF
137#define NewBoard_PSEUDOTAG 0x100
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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