source: rtems/c/src/lib/libbsp/i386/shared/pci/pcibios.h @ 819c7da8
Last change on this file since 819c7da8 was 0ebbf66, checked in by Joel Sherrill <joel.sherrill@…>, on 10/05/98 at 22:36:06

Large patch from Erik Ivanenko <erik.ivanenko@…> which
moves pieces of the pc386 bsp up to a shared level for all i386 BSPs
and modifies the i386ex BSP to use those shared pieces. Serial remote
debugging is included for both targets. Erik's notes:

There are several workarounds in it:

1) #define NEXT_GAS is hardcoded in pc386/start/start.s
2) #define NEXT_GAS is hardcoded in i386ex/start/start.s
3) #define NEW_GAS is hardcoded in pc386/start16.s
4) #undef assert and redeclare _assert hardcoded in console.c for

both pc386 and i386ex due to my egcs1.1b ~ newlib problem. Should have
modified t-rtems.cfg ( no time )

I've tested pc386 with both video and serial consoles and GDB remote.
All work fine, except that GDB acts weird. ( re: other posting)

I hope this will work for you. It took quite some time to locate the
autoconf error. The remainder was just grunt work.
Unfortunately, I think I've unwound the removal of the IBMPCInitVideo
stuff. Sorry. I REALLY can't spend more time... I've been at this
conversion to 4.0 locally and updating the release since Sept. 8th, and
have yet to compile my network driver.... This is as much as I can do
right now.

I look forward to the next patch to really test i368ex. I did make sure
that the sample tests worked for pc386.

  • Property mode set to 100644
File size: 1.6 KB
2 * This software is Copyright (C) 1998 by T.sqware - all rights limited
3 * It is provided in to the public domain "as is", can be freely modified
4 * as far as this copyight notice is kept unchanged, but does not imply
5 * an endorsement by T.sqware of the product in which it is included.
6 */
8#ifndef _PCIB_H
9#define _PCIB_H
11/* Error codes */
12#define PCIB_ERR_SUCCESS       (0)
13#define PCIB_ERR_UNINITIALIZED (-1)  /* PCI BIOS is not initilized */
14#define PCIB_ERR_NOTPRESENT    (-2)  /* PCI BIOS not present */
15#define PCIB_ERR_NOFUNC        (-3)  /* Function not supported */
16#define PCIB_ERR_BADVENDOR     (-4)  /* Bad Vendor ID */
17#define PCIB_ERR_DEVNOTFOUND   (-5)  /* Device not found */
18#define PCIB_ERR_BADREG        (-6)  /* Bad register number */   
21 * Make device signature from bus number, device numebr and function
22 * number
23 */
24#define PCIB_DEVSIG_MAKE(b,d,f) ((b<<8)|(d<<3)|(f))
27 * Extract valrous part from device signature
28 */
29#define PCIB_DEVSIG_BUS(x) (((x)>>8) &0xff)
30#define PCIB_DEVSIG_DEV(x) (((x)>>3) & 0x1f)
31#define PCIB_DEVSIG_FUNC(x) ((x) & 0x7)
33int pcib_init(void);
34int pcib_find_by_devid(int vendorId, int devId, int idx, int *sig);
35int pcib_find_by_class(int classCode, int idx, int *sig);
36int pcib_special_cycle(int busNo, int data);
37int pcib_conf_read8(int sig, int off, unsigned char *data);
38int pcib_conf_read16(int sig, int off, unsigned short *data);
39int pcib_conf_read32(int sig, int off, unsigned int *data);
40int pcib_conf_write8(int sig, int off, unsigned int data);
41int pcib_conf_write16(int sig, int off, unsigned int data);
42int pcib_conf_write32(int sig, int off, unsigned int data);
45#endif /* _PCIB_H */
Note: See TracBrowser for help on using the repository browser.