VirtualBox

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

最後變更 在這個檔案從26302是 11982,由 vboxsync 提交於 16 年 前

All: license header changes for 2.0 (OSE headers, add Sun GPL/LGPL disclaimer)

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

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