diff --git a/import/OpenXDK/include/glibc/ansidecl.h b/import/OpenXDK/include/glibc/ansidecl.h deleted file mode 100644 index 8528312ef..000000000 --- a/import/OpenXDK/include/glibc/ansidecl.h +++ /dev/null @@ -1,143 +0,0 @@ -#undef WIN32 -/* ANSI and traditional C compatability macros - Copyright 1991, 1992 Free Software Foundation, Inc. - This file is part of the GNU C Library. - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -/* ANSI and traditional C compatibility macros - - ANSI C is assumed if __STDC__ is #defined. - - Macro ANSI C definition Traditional C definition - ----- ---- - ---------- ----------- - ---------- - PTR `void *' `char *' - LONG_DOUBLE `long double' `double' - VOLATILE `volatile' `' - SIGNED `signed' `' - PTRCONST `void *const' `char *' - ANSI_PROTOTYPES 1 not defined - - CONST is also defined, but is obsolete. Just use const. - - DEFUN (name, arglist, args) - - Defines function NAME. - - ARGLIST lists the arguments, separated by commas and enclosed in - parentheses. ARGLIST becomes the argument list in traditional C. - - ARGS list the arguments with their types. It becomes a prototype in - ANSI C, and the type declarations in traditional C. Arguments should - be separated with `AND'. For functions with a variable number of - arguments, the last thing listed should be `DOTS'. - - DEFUN_VOID (name) - - Defines a function NAME, which takes no arguments. - - obsolete -- EXFUN (name, (prototype)) -- obsolete. - - Replaced by PARAMS. Do not use; will disappear someday soon. - Was used in external function declarations. - In ANSI C it is `NAME PROTOTYPE' (so PROTOTYPE should be enclosed in - parentheses). In traditional C it is `NAME()'. - For a function that takes no arguments, PROTOTYPE should be `(void)'. - - PARAMS ((args)) - - We could use the EXFUN macro to handle prototype declarations, but - the name is misleading and the result is ugly. So we just define a - simple macro to handle the parameter lists, as in: - - static int foo PARAMS ((int, char)); - - This produces: `static int foo();' or `static int foo (int, char);' - - EXFUN would have done it like this: - - static int EXFUN (foo, (int, char)); - - but the function is not external...and it's hard to visually parse - the function name out of the mess. EXFUN should be considered - obsolete; new code should be written to use PARAMS. - - For example: - extern int printf PARAMS ((CONST char *format DOTS)); - int DEFUN(fprintf, (stream, format), - FILE *stream AND CONST char *format DOTS) { ... } - void DEFUN_VOID(abort) { ... } -*/ - -#ifndef _ANSIDECL_H - -#define _ANSIDECL_H 1 - -#include - -/* Every source file includes this file, - so they will all get the switch for lint. */ -/* LINTLIBRARY */ - - -#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) -/* All known AIX compilers implement these things (but don't always - define __STDC__). The RISC/OS MIPS compiler defines these things - in SVR4 mode, but does not define __STDC__. */ - -#define PTR void * -#define PTRCONST void *CONST -#define LONG_DOUBLE long double - -#define AND , -#define NOARGS void -#define CONST const -#define VOLATILE volatile -#define SIGNED signed -#define DOTS , ... - -#define EXFUN(name, proto) name proto -#define DEFUN(name, arglist, args) name(args) -#define DEFUN_VOID(name) name(void) - -#define PROTO(type, name, arglist) type name arglist -#define PARAMS(paramlist) paramlist -#define ANSI_PROTOTYPES 1 - -#else /* Not ANSI C. */ - -#define PTR char * -#define PTRCONST PTR -#define LONG_DOUBLE double - -#define AND ; -#define NOARGS -#define CONST -#ifndef const /* some systems define it in header files for non-ansi mode */ -#define const -#endif -#define VOLATILE -#define SIGNED -#define DOTS - -#define EXFUN(name, proto) name() -#define DEFUN(name, arglist, args) name arglist args; -#define DEFUN_VOID(name) name() -#define PROTO(type, name, arglist) type name () -#define PARAMS(paramlist) () - -#endif /* ANSI C. */ - -#endif /* ansidecl.h */ diff --git a/import/OpenXDK/include/glibc/attic/stdio.h b/import/OpenXDK/include/glibc/attic/stdio.h deleted file mode 100644 index fdf9db135..000000000 --- a/import/OpenXDK/include/glibc/attic/stdio.h +++ /dev/null @@ -1,74 +0,0 @@ - - - - -#ifndef __STDIO_H__ -#define __STDIO_H__ - - -# ifdef __cplusplus -extern "C" { -# endif - -#include - - /* - -//int sprintf(char*, const char *format, ...); -int __cdecl sprintf(char *, const char *, ...); - -//#include -#include -#include - - -#define _O_RDONLY (0x00000001) -#define _O_WRONLY (0x00000002) -#define _O_RDWR (0x00000003) -#define _O_NBLOCK (0x00000010) -#define _O_APPEND (0x00000100) -#define _O_CREAT (0x00000200) -#define _O_TRUNC (0x00000400) -#define _O_EXCL (0x00000800) -#define _O_TEMPORARY (0x00001000) -#define _O_TEXT (0x00004000) -#define _O_BINARY (0x00008000) - -#define O_RDONLY _O_RDONLY -#define O_WRONLY _O_WRONLY -#define O_RDWR _O_RDWR -#define O_NBLOCK _O_NBLOCK -#define O_APPEND _O_APPEND -#define O_CREAT _O_CREAT -#define O_EXCL _O_EXCL -#define O_TRUNC _O_TRUNC -#define O_TEMPORARY _O_TEMPORARY -#define O_TEXT _O_TEXT -#define O_BINARY _O_BINARY - - -#define SEEK_SET 0 -#define SEEK_CUR 1 -#define SEEK_END 2 - -extern u32 LastErrorCode; - -int _open( char *filename, int oflag, int permission ); -int _read( int handle, void *buffer, unsigned int count ); -int _write( int handle, void* buffer, unsigned int count ); -int _close( int handle ); -int _lseek( int handle, u32 offset, int base ); - -int nprintf(const char *format, ...); -int printf(const char *format, ...); -//int sprintf(char*, const char *format, ...); -*/ - -# ifdef __cplusplus -} -# endif - -#endif // __STDIO_H__ - - - diff --git a/import/OpenXDK/include/glibc/bits/endian.h b/import/OpenXDK/include/glibc/bits/endian.h deleted file mode 100644 index de180a1a2..000000000 --- a/import/OpenXDK/include/glibc/bits/endian.h +++ /dev/null @@ -1,14 +0,0 @@ -/* This file should define __BYTE_ORDER as appropriate for the machine - in question. See string/endian.h for how to define it. - - If only the stub bits/endian.h applies to a particular configuration, - bytesex.h is generated by running a program on the host machine. - So if cross-compiling to a machine with a different byte order, - the bits/endian.h file for that machine must exist. */ - -#ifndef _ENDIAN_H -# error "Never use directly; include instead." -#endif - -#define __BYTE_ORDER __LITTLE_ENDIAN -//#error Machine byte order unknown. diff --git a/import/OpenXDK/include/glibc/bits/types.h b/import/OpenXDK/include/glibc/bits/types.h deleted file mode 100644 index 94985f842..000000000 --- a/import/OpenXDK/include/glibc/bits/types.h +++ /dev/null @@ -1,131 +0,0 @@ -/* Copyright (C) 1991,1992,94-1999,2000,2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* - * Never include this file directly; use instead. - */ - -#ifndef _BITS_TYPES_H -#define _BITS_TYPES_H 1 - -#include - -#define __need_size_t -#include - -/* Convenience types. */ -typedef unsigned char __u_char; -typedef unsigned short __u_short; -typedef unsigned int __u_int; -typedef unsigned long __u_long; -#ifdef __GNUC__ -typedef unsigned long long int __u_quad_t; -typedef long long int __quad_t; -#else -typedef struct -{ - long __val[2]; -} __quad_t; -typedef struct -{ - __u_long __val[2]; -} __u_quad_t; -#endif -typedef signed char __int8_t; -typedef unsigned char __uint8_t; -typedef signed short int __int16_t; -typedef unsigned short int __uint16_t; -typedef signed int __int32_t; -typedef unsigned int __uint32_t; -#ifdef __GNUC__ -typedef signed long long int __int64_t; -typedef unsigned long long int __uint64_t; -#endif -typedef __quad_t *__qaddr_t; - -typedef int __dev_t; /* Type of device numbers. */ -typedef unsigned int __uid_t; /* Type of user identifications. */ -typedef unsigned int __gid_t; /* Type of group identifications. */ -typedef unsigned int __ino_t; /* Type of file serial numbers. */ -typedef __quad_t __ino64_t; /* Type of file serial numbers (LFS). */ -typedef unsigned int __mode_t; /* Type of file attribute bitmasks. */ -typedef unsigned short int __nlink_t; /* Type of file link counts. */ -typedef long int __off_t; /* Type of file sizes and offsets. */ -typedef __quad_t __loff_t; /* Type of file sizes and offsets. */ -typedef __loff_t __off64_t; /* Type of file sizes and offsets (LFS). */ -typedef int __pid_t; /* Type of process identifications. */ -typedef int __ssize_t; /* Type of a byte count, or error. */ -typedef __u_quad_t __fsid_t; /* Type of file system IDs. */ -typedef long int __clock_t; /* Type of CPU usage counts. */ -typedef long int __rlim_t; /* Type for resource measurement. */ -typedef __quad_t __rlim64_t; /* Type for resource measurement (LFS). */ -typedef unsigned int __id_t; /* General type for IDs. */ - -/* Everythin' else. */ -typedef long int __daddr_t; /* The type of a disk address. */ -typedef char *__caddr_t; -typedef long int __time_t; -typedef unsigned int __useconds_t; -typedef long int __suseconds_t; -typedef long int __swblk_t; /* Type of a swap block maybe? */ -typedef long int __key_t; /* Type of an IPC key */ - - -/* Clock ID used in clock and timer functions. */ -typedef int __clockid_t; - -/* Timer ID returned by `timer_create'. */ -typedef int __timer_t; - - -/* Number of descriptors that can fit in an `fd_set'. */ -#define __FD_SETSIZE 256 - - -/* XXX Used in `struct shmid_ds'. */ -typedef unsigned short int __ipc_pid_t; - - -/* Type to represent block size. */ -typedef unsigned int __blksize_t; - -/* Types from the Large File Support interface. */ - -/* Type to count number os disk blocks. */ -typedef long int __blkcnt_t; -typedef __quad_t __blkcnt64_t; - -/* Type to count file system blocks. */ -typedef unsigned int __fsblkcnt_t; -typedef __u_quad_t __fsblkcnt64_t; - -/* Type to count file system inodes. */ -typedef unsigned long int __fsfilcnt_t; -typedef __u_quad_t __fsfilcnt64_t; - -/* Used in XTI. */ -typedef int __t_scalar_t; -typedef unsigned int __t_uscalar_t; - -/* Duplicates info from stdint.h but this is used in unistd.h. */ -typedef long int __intptr_t; - -/* Duplicate info from sys/socket.h. */ -typedef unsigned int __socklen_t; - -#endif /* bits/types.h */ diff --git a/import/OpenXDK/include/glibc/conio.h b/import/OpenXDK/include/glibc/conio.h deleted file mode 100644 index 53ff973f1..000000000 --- a/import/OpenXDK/include/glibc/conio.h +++ /dev/null @@ -1,23 +0,0 @@ -// ************************************************************************** -// -// CONIO.H : Standard Port IO routines -// -// ************************************************************************** -#ifndef __CONIO_H__ -#define __CONIO_H__ - - - - -void _outb( unsigned short port, unsigned char data ); -void _outw( unsigned short port, unsigned short data ); -void _outd( unsigned short port, unsigned int data ); -unsigned char _inb( unsigned short port ); -unsigned short _inw( unsigned short port ); -unsigned int _ind( unsigned short port ); - - - - - -#endif //__CONIO_H__ \ No newline at end of file diff --git a/import/OpenXDK/include/glibc/ctype.h b/import/OpenXDK/include/glibc/ctype.h deleted file mode 100644 index 4417780c4..000000000 --- a/import/OpenXDK/include/glibc/ctype.h +++ /dev/null @@ -1,278 +0,0 @@ -/* Copyright (C) 1991,92,93,95,96,97,98,99,2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* - * ISO C99 Standard 7.4: Character handling - */ - -#ifndef _CTYPE_H -#define _CTYPE_H 1 - -#include -#include - -__BEGIN_DECLS - -#ifndef _ISbit -/* These are all the characteristics of characters. - If there get to be more than 16 distinct characteristics, - many things must be changed that use `unsigned short int's. - - The characteristics are stored always in network byte order (big - endian). We define the bit value interpretations here dependent on the - machine's byte order. */ - -# include -# if __BYTE_ORDER == __BIG_ENDIAN -# define _ISbit(bit) (1 << (bit)) -# else /* __BYTE_ORDER == __LITTLE_ENDIAN */ -# define _ISbit(bit) ((bit) < 8 ? ((1 << (bit)) << 8) : ((1 << (bit)) >> 8)) -# endif - -enum -{ - _ISupper = _ISbit (0), /* UPPERCASE. */ - _ISlower = _ISbit (1), /* lowercase. */ - _ISalpha = _ISbit (2), /* Alphabetic. */ - _ISdigit = _ISbit (3), /* Numeric. */ - _ISxdigit = _ISbit (4), /* Hexadecimal numeric. */ - _ISspace = _ISbit (5), /* Whitespace. */ - _ISprint = _ISbit (6), /* Printing. */ - _ISgraph = _ISbit (7), /* Graphical. */ - _ISblank = _ISbit (8), /* Blank (usually SPC and TAB). */ - _IScntrl = _ISbit (9), /* Control character. */ - _ISpunct = _ISbit (10), /* Punctuation. */ - _ISalnum = _ISbit (11) /* Alphanumeric. */ -}; -#endif /* ! _ISbit */ - -/* These are defined in ctype-info.c. - The declarations here must match those in localeinfo.h. - - These point into arrays of 384, so they can be indexed by any `unsigned - char' value [0,255]; by EOF (-1); or by any `signed char' value - [-128,-1). ISO C requires that the ctype functions work for `unsigned - char' values and for EOF; we also support negative `signed char' values - for broken old programs. The case conversion arrays are of `int's - rather than `unsigned char's because tolower (EOF) must be EOF, which - doesn't fit into an `unsigned char'. But today more important is that - the arrays are also used for multi-byte character sets. */ -extern __const unsigned short int *__ctype_b; /* Characteristics. */ -extern __const __int32_t *__ctype_tolower; /* Case conversions. */ -extern __const __int32_t *__ctype_toupper; /* Case conversions. */ - -#define __isctype(c, type) \ - (__ctype_b[(int) (c)] & (unsigned short int) type) - -#define __isascii(c) (((c) & ~0x7f) == 0) /* If C is a 7 bit value. */ -#define __toascii(c) ((c) & 0x7f) /* Mask off high bits. */ - -#define __exctype(name) extern int name (int) __THROW - -/* The following names are all functions: - int isCHARACTERISTIC(int c); - which return nonzero iff C has CHARACTERISTIC. - For the meaning of the characteristic names, see the `enum' above. */ -__exctype (isalnum); -__exctype (isalpha); -__exctype (iscntrl); -__exctype (isdigit); -__exctype (islower); -__exctype (isgraph); -__exctype (isprint); -__exctype (ispunct); -__exctype (isspace); -__exctype (isupper); -__exctype (isxdigit); - -#ifdef __USE_ISOC99 -__exctype (isblank); -#endif - - -/* Return the lowercase version of C. */ -extern int tolower (int __c) __THROW; - -/* Return the uppercase version of C. */ -extern int toupper (int __c) __THROW; - - -#if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN - -/* Return nonzero iff C is in the ASCII set - (i.e., is no more than 7 bits wide). */ -extern int isascii (int __c) __THROW; - -/* Return the part of C that is in the ASCII set - (i.e., the low-order 7 bits of C). */ -extern int toascii (int __c) __THROW; - -/* These are the same as `toupper' and `tolower' except that they do not - check the argument for being in the range of a `char'. */ -__exctype (_toupper); -__exctype (_tolower); -#endif /* Use SVID or use misc. */ - -/* This code is needed for the optimized mapping functions. */ -#define __tobody(c, f, a, args) \ - (__extension__ \ - ({ int __res; \ - if (sizeof (c) > 1) \ - { \ - if (__builtin_constant_p (c)) \ - { \ - int __c = (c); \ - __res = __c < -128 || __c > 255 ? __c : a[__c]; \ - } \ - else \ - __res = f args; \ - } \ - else \ - __res = a[(int) (c)]; \ - __res; })) - -#ifndef __NO_CTYPE -# define isalnum(c) __isctype((c), _ISalnum) -# define isalpha(c) __isctype((c), _ISalpha) -# define iscntrl(c) __isctype((c), _IScntrl) -# define isdigit(c) __isctype((c), _ISdigit) -# define islower(c) __isctype((c), _ISlower) -# define isgraph(c) __isctype((c), _ISgraph) -# define isprint(c) __isctype((c), _ISprint) -# define ispunct(c) __isctype((c), _ISpunct) -# define isspace(c) __isctype((c), _ISspace) -# define isupper(c) __isctype((c), _ISupper) -# define isxdigit(c) __isctype((c), _ISxdigit) - -# ifdef __USE_ISOC99 -# define isblank(c) __isctype((c), _ISblank) -# endif - -# ifdef __USE_EXTERN_INLINES -extern __inline int -tolower (int __c) __THROW -{ - return __c >= -128 && __c < 256 ? __ctype_tolower[__c] : __c; -} - -extern __inline int -toupper (int __c) __THROW -{ - return __c >= -128 && __c < 256 ? __ctype_toupper[__c] : __c; -} -# endif - -# if __GNUC__ >= 2 && defined __OPTIMIZE__ && !defined __cplusplus -# define tolower(c) __tobody (c, tolower, __ctype_tolower, (c)) -# define toupper(c) __tobody (c, toupper, __ctype_toupper, (c)) -# endif /* Optimizing gcc */ - -# if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN -# define isascii(c) __isascii (c) -# define toascii(c) __toascii (c) - -# define _tolower(c) ((int) __ctype_tolower[(int) (c)]) -# define _toupper(c) ((int) __ctype_toupper[(int) (c)]) -# endif - -#endif /* Not __NO_CTYPE. */ - - -#ifdef __USE_GNU -/* The concept of one static locale per category is not very well - thought out. Many applications will need to process its data using - information from several different locales. Another application is - the implementation of the internationalization handling in the - upcoming ISO C++ standard library. To support this another set of - the functions using locale data exist which have an additional - argument. - - Attention: all these functions are *not* standardized in any form. - This is a proof-of-concept implementation. */ - -/* Structure for reentrant locale using functions. This is an - (almost) opaque type for the user level programs. */ -# include - -/* These definitions are similar to the ones above but all functions - take as an argument a handle for the locale which shall be used. */ -# define __isctype_l(c, type, locale) \ - ((locale)->__ctype_b[(int) (c)] & (unsigned short int) type) - -# define __exctype_l(name) extern int name (int, __locale_t) __THROW - -/* The following names are all functions: - int isCHARACTERISTIC(int c, locale_t *locale); - which return nonzero iff C has CHARACTERISTIC. - For the meaning of the characteristic names, see the `enum' above. */ -__exctype_l (__isalnum_l); -__exctype_l (__isalpha_l); -__exctype_l (__iscntrl_l); -__exctype_l (__isdigit_l); -__exctype_l (__islower_l); -__exctype_l (__isgraph_l); -__exctype_l (__isprint_l); -__exctype_l (__ispunct_l); -__exctype_l (__isspace_l); -__exctype_l (__isupper_l); -__exctype_l (__isxdigit_l); - -__exctype_l (__isblank_l); - - -/* Return the lowercase version of C in locale L. */ -extern int __tolower_l (int __c, __locale_t __l) __THROW; - -/* Return the uppercase version of C. */ -extern int __toupper_l (int __c, __locale_t __l) __THROW; - -# if __GNUC__ >= 2 && defined __OPTIMIZE__ && !defined __cplusplus -# define __tolower_l(c, locale) \ - __tobody (c, __tolower_l, (locale)->__ctype_tolower, (c, locale)) -# define __toupper_l(c, locale) \ - __tobody (c, __toupper_l, (locale)->__ctype_toupper, (c, locale)) -# endif /* Optimizing gcc */ - - -# ifndef __NO_CTYPE -# define __isalnum_l(c,l) __isctype_l((c), _ISalnum, (l)) -# define __isalpha_l(c,l) __isctype_l((c), _ISalpha, (l)) -# define __iscntrl_l(c,l) __isctype_l((c), _IScntrl, (l)) -# define __isdigit_l(c,l) __isctype_l((c), _ISdigit, (l)) -# define __islower_l(c,l) __isctype_l((c), _ISlower, (l)) -# define __isgraph_l(c,l) __isctype_l((c), _ISgraph, (l)) -# define __isprint_l(c,l) __isctype_l((c), _ISprint, (l)) -# define __ispunct_l(c,l) __isctype_l((c), _ISpunct, (l)) -# define __isspace_l(c,l) __isctype_l((c), _ISspace, (l)) -# define __isupper_l(c,l) __isctype_l((c), _ISupper, (l)) -# define __isxdigit_l(c,l) __isctype_l((c), _ISxdigit, (l)) - -# define __isblank_l(c,l) __isctype_l((c), _ISblank, (l)) - -# if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN -# define __isascii_l(c,l) __isascii(c) -# define __toascii_l(c,l) __toascii(c) -# endif - -# endif /* Not __NO_CTYPE. */ - -#endif /* Use GNU. */ - -__END_DECLS - -#endif /* ctype.h */ diff --git a/import/OpenXDK/include/glibc/defs.h b/import/OpenXDK/include/glibc/defs.h deleted file mode 100644 index d67bf4e1e..000000000 --- a/import/OpenXDK/include/glibc/defs.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef __DEFS__ -#define __DEFS__ - -typedef unsigned char byte; -typedef unsigned char u8; -typedef signed char s8; -typedef unsigned short u16; -typedef signed short s16; -typedef unsigned int u32; -typedef signed int s32; -typedef signed __int64 s64; -typedef unsigned __int64 u64; - - - -#ifndef NULL -#define NULL 0x00 -#endif - -// -// LIBC basics -// - -// GET rid of C4146 compiler warnings: unary minus operator applied to unsigned type, result still unsigned -#define NEGU32(a) ((u32) (-((s32)(a))) ) - -//typedef unsigned int size_t; -#define op_t unsigned long int -#define OPSIZ (sizeof(op_t)) - -/* -#define CONST const*/ -#define __CONSTVALUE -#define __alloca _alloca // MSDEV has a built in _alloca - - -int isascii(int c); - - -#endif //__DEFS__ diff --git a/import/OpenXDK/include/glibc/endian.h b/import/OpenXDK/include/glibc/endian.h deleted file mode 100644 index 7556f2916..000000000 --- a/import/OpenXDK/include/glibc/endian.h +++ /dev/null @@ -1,17 +0,0 @@ -#include - -#if defined _LIBC && !defined _ISOMAC -# if __FLOAT_WORD_ORDER == __BIG_ENDIAN -# define BIG_ENDI 1 -# undef LITTLE_ENDI -# define HIGH_HALF 0 -# define LOW_HALF 1 -# else -# if __FLOAT_WORD_ORDER == __LITTLE_ENDIAN -# undef BIG_ENDI -# define LITTLE_ENDI 1 -# define HIGH_HALF 1 -# define LOW_HALF 0 -# endif -# endif -#endif diff --git a/import/OpenXDK/include/glibc/errno.h b/import/OpenXDK/include/glibc/errno.h deleted file mode 100644 index 7cbeac2b3..000000000 --- a/import/OpenXDK/include/glibc/errno.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -/* - * ANSI Standard: 4.1.3 Errors - */ - -#ifndef _ERRNO_H - -#define _ERRNO_H 1 - -/* Get the error number constants. */ -#include - -/* Declare the `errno' variable. */ -extern int __errno; - -#define errno __errno - -#ifdef __USE_GNU -/* The full and simple forms of the name with which the program was - invoked. These variables are set up automatically at startup based on - the value of ARGV[0] (this works only if you use GNU ld). */ -extern char *program_invocation_name, *program_invocation_short_name; -#endif - -#endif /* errno.h */ -#define EINVAL -1 diff --git a/import/OpenXDK/include/glibc/errnos.h b/import/OpenXDK/include/glibc/errnos.h deleted file mode 100644 index 0132c2be0..000000000 --- a/import/OpenXDK/include/glibc/errnos.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifdef _ERRNO_H -#endif /* included. */ - -#if !defined(__Emath_defined) && (defined(_ERRNO_H) || defined(__need_Emath)) -#define EDOM 1 -#define ERANGE 2 -#else /* Emath not defined and included or need Emath. */ -#define ENOSYS 3 -#endif /* included. */ - -#undef __need_Emath -#ifndef __Emath_defined -#define __Emath_defined 1 -#endif diff --git a/import/OpenXDK/include/glibc/features.h b/import/OpenXDK/include/glibc/features.h deleted file mode 100644 index fb6285504..000000000 --- a/import/OpenXDK/include/glibc/features.h +++ /dev/null @@ -1,315 +0,0 @@ -/* Copyright (C) 1991-1993, 1995-2000, 2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _FEATURES_H -#define _FEATURES_H 1 - -/* These are defined by the user (or the compiler) - to specify the desired environment: - - __STRICT_ANSI__ ISO Standard C. - _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. - _POSIX_SOURCE IEEE Std 1003.1. - _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; - if >=199309L, add IEEE Std 1003.1b-1993; - if >=199506L, add IEEE Std 1003.1c-1995 - _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if - Single Unix conformance is wanted, to 600 for the - upcoming sixth revision. - _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. - _LARGEFILE_SOURCE Some more functions for correct standard I/O. - _LARGEFILE64_SOURCE Additional functionality from LFS for large files. - _FILE_OFFSET_BITS=N Select default filesystem interface. - _BSD_SOURCE ISO C, POSIX, and 4.3BSD things. - _SVID_SOURCE ISO C, POSIX, and SVID things. - _GNU_SOURCE All of the above, plus GNU extensions. - _REENTRANT Select additionally reentrant object. - _THREAD_SAFE Same as _REENTRANT, often used by other systems. - - The `-ansi' switch to the GNU C compiler defines __STRICT_ANSI__. - If none of these are defined, the default is to have _SVID_SOURCE, - _BSD_SOURCE, and _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to - 199506L. If more than one of these are defined, they accumulate. - For example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE - together give you ISO C, 1003.1, and 1003.2, but nothing else. - - These are defined by this file and are used by the - header files to decide what to declare or define: - - __USE_ISOC99 Define ISO C99 things. - __USE_POSIX Define IEEE Std 1003.1 things. - __USE_POSIX2 Define IEEE Std 1003.2 things. - __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. - __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. - __USE_XOPEN Define XPG things. - __USE_XOPEN_EXTENDED Define X/Open Unix things. - __USE_UNIX98 Define Single Unix V2 things. - __USE_XOPEN2K Define XPG6 things. - __USE_LARGEFILE Define correct standard I/O things. - __USE_LARGEFILE64 Define LFS things with separate names. - __USE_FILE_OFFSET64 Define 64bit interface as default. - __USE_BSD Define 4.3BSD things. - __USE_SVID Define SVID things. - __USE_MISC Define things common to BSD and System V Unix. - __USE_GNU Define GNU extensions. - __USE_REENTRANT Define reentrant/thread-safe *_r functions. - __FAVOR_BSD Favor 4.3BSD things in cases of conflict. - - The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are - defined by this file unconditionally. `__GNU_LIBRARY__' is provided - only for compatibility. All new code should use the other symbols - to test for features. - - All macros listed above as possibly being defined by this file are - explicitly undefined if they are not explicitly defined. - Feature-test macros that are not defined by the user or compiler - but are implied by the other feature-test macros defined (or by the - lack of any definitions) are defined by the file. */ - - -/* Undefine everything, so we get a clean slate. */ -#undef __USE_ISOC99 -#undef __USE_POSIX -#undef __USE_POSIX2 -#undef __USE_POSIX199309 -#undef __USE_POSIX199506 -#undef __USE_XOPEN -#undef __USE_XOPEN_EXTENDED -#undef __USE_UNIX98 -#undef __USE_XOPEN2K -#undef __USE_LARGEFILE -#undef __USE_LARGEFILE64 -#undef __USE_FILE_OFFSET64 -#undef __USE_BSD -#undef __USE_SVID -#undef __USE_MISC -#undef __USE_GNU -#undef __USE_REENTRANT -#undef __FAVOR_BSD -#undef __KERNEL_STRICT_NAMES - -/* Suppress kernel-name space pollution unless user expressedly asks - for it. */ -#ifndef _LOOSE_KERNEL_NAMES -# define __KERNEL_STRICT_NAMES -#endif - -/* Always use ISO C things. */ -#define __USE_ANSI 1 - - -/* If _BSD_SOURCE was defined by the user, favor BSD over POSIX. */ -#if defined _BSD_SOURCE && \ - !(defined _POSIX_SOURCE || defined _POSIX_C_SOURCE || \ - defined _XOPEN_SOURCE || defined _XOPEN_SOURCE_EXTENDED || \ - defined _GNU_SOURCE || defined _SVID_SOURCE) -# define __FAVOR_BSD 1 -#endif - -/* If _GNU_SOURCE was defined by the user, turn on all the other features. */ -#ifdef _GNU_SOURCE -# undef _ISOC99_SOURCE -# define _ISOC99_SOURCE 1 -# undef _POSIX_SOURCE -# define _POSIX_SOURCE 1 -# undef _POSIX_C_SOURCE -# define _POSIX_C_SOURCE 199506L -# undef _XOPEN_SOURCE -# define _XOPEN_SOURCE 600 -# undef _XOPEN_SOURCE_EXTENDED -# define _XOPEN_SOURCE_EXTENDED 1 -# undef _LARGEFILE64_SOURCE -# define _LARGEFILE64_SOURCE 1 -# undef _BSD_SOURCE -# define _BSD_SOURCE 1 -# undef _SVID_SOURCE -# define _SVID_SOURCE 1 -#endif - -/* If nothing (other than _GNU_SOURCE) is defined, - define _BSD_SOURCE and _SVID_SOURCE. */ -#if (!defined __STRICT_ANSI__ && !defined _ISOC99_SOURCE && \ - !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE && \ - !defined _XOPEN_SOURCE && !defined _XOPEN_SOURCE_EXTENDED && \ - !defined _BSD_SOURCE && !defined _SVID_SOURCE) -# define _BSD_SOURCE 1 -# define _SVID_SOURCE 1 -#endif - -/* This is to enable the ISO C99 extension. Also recognize the old macro - which was used prior to the standard acceptance. This macro will - eventually go away and the features enabled by default once the ISO C99 - standard is widely adopted. */ -#if (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE \ - || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) -# define __USE_ISOC99 1 -#endif - -/* If none of the ANSI/POSIX macros are defined, use POSIX.1 and POSIX.2 - (and IEEE Std 1003.1b-1993 unless _XOPEN_SOURCE is defined). */ -#if (!defined __STRICT_ANSI__ && !defined _POSIX_SOURCE && \ - !defined _POSIX_C_SOURCE) -# define _POSIX_SOURCE 1 -# if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 500 -# define _POSIX_C_SOURCE 2 -# else -# define _POSIX_C_SOURCE 199506L -# endif -#endif - -#if defined _POSIX_SOURCE || _POSIX_C_SOURCE >= 1 || defined _XOPEN_SOURCE -# define __USE_POSIX 1 -#endif - -#if defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 2 || defined _XOPEN_SOURCE -# define __USE_POSIX2 1 -#endif - -#if (_POSIX_C_SOURCE - 0) >= 199309L -# define __USE_POSIX199309 1 -#endif - -#if (_POSIX_C_SOURCE - 0) >= 199506L -# define __USE_POSIX199506 1 -#endif - -#ifdef _XOPEN_SOURCE -# define __USE_XOPEN 1 -# if (_XOPEN_SOURCE - 0) >= 500 -# define __USE_XOPEN_EXTENDED 1 -# define __USE_UNIX98 1 -# undef _LARGEFILE_SOURCE -# define _LARGEFILE_SOURCE 1 -# if (_XOPEN_SOURCE - 0) >= 600 -# define __USE_XOPEN2K 1 -# undef __USE_ISOC99 -# define __USE_ISOC99 1 -# endif -# else -# ifdef _XOPEN_SOURCE_EXTENDED -# define __USE_XOPEN_EXTENDED 1 -# endif -# endif -#endif - -#ifdef _LARGEFILE_SOURCE -# define __USE_LARGEFILE 1 -#endif - -#ifdef _LARGEFILE64_SOURCE -# define __USE_LARGEFILE64 1 -#endif - -#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64 -# define __USE_FILE_OFFSET64 1 -#endif - -#if defined _BSD_SOURCE || defined _SVID_SOURCE -# define __USE_MISC 1 -#endif - -#ifdef _BSD_SOURCE -# define __USE_BSD 1 -#endif - -#ifdef _SVID_SOURCE -# define __USE_SVID 1 -#endif - -#ifdef _GNU_SOURCE -# define __USE_GNU 1 -#endif - -#if defined _REENTRANT || defined _THREAD_SAFE -# define __USE_REENTRANT 1 -#endif - -/* We do support the IEC 559 math functionality, real and complex. */ -#define __STDC_IEC_559__ 1 -#define __STDC_IEC_559_COMPLEX__ 1 - -/* wchar_t uses ISO 10646-1 (2nd ed., published 2000-09-15) / Unicode 3.1. */ -#define __STDC_ISO_10646__ 200009L - -/* This macro indicates that the installed library is the GNU C Library. - For historic reasons the value now is 6 and this will stay from now - on. The use of this variable is deprecated. Use __GLIBC__ and - __GLIBC_MINOR__ now (see below) when you want to test for a specific - GNU C library version and use the values in to get - the sonames of the shared libraries. */ -#undef __GNU_LIBRARY__ -#define __GNU_LIBRARY__ 6 - -/* Major and minor version number of the GNU C library package. Use - these macros to test for features in specific releases. */ -#define __GLIBC__ 2 -#define __GLIBC_MINOR__ 2 - -/* Convenience macros to test the versions of glibc and gcc. - Use them like this: - #if __GNUC_PREREQ (2,8) - ... code requiring gcc 2.8 or later ... - #endif - Note - they won't work for gcc1 or glibc1, since the _MINOR macros - were not defined then. */ -#if defined __GNUC__ && defined __GNUC_MINOR__ -# define __GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -# define __GNUC_PREREQ(maj, min) 0 -#endif - -#define __GLIBC_PREREQ(maj, min) \ - ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)) - -/* This is here only because every header file already includes this one. */ -#ifndef __ASSEMBLER__ -# ifndef _SYS_CDEFS_H -# include -# endif - -/* If we don't have __REDIRECT, prototypes will be missing if - __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. */ -# if defined __USE_FILE_OFFSET64 && !defined __REDIRECT -# define __USE_LARGEFILE 1 -# define __USE_LARGEFILE64 1 -# endif - -#endif /* !ASSEMBLER */ - -/* Decide whether we can define 'extern inline' functions in headers. */ -#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \ - && !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__ -# define __USE_EXTERN_INLINES 1 -#endif - -/* This is here only because every header file already includes this one. */ -#ifndef _LIBC -/* Get the definitions of all the appropriate `__stub_FUNCTION' symbols. - contains `#define __stub_FUNCTION' when FUNCTION is a stub - which will always return failure (and set errno to ENOSYS). - - We avoid including when compiling the C library itself to - avoid a dependency loop. stubs.h depends on every object file. If - this #include were done for the library source code, then every object - file would depend on stubs.h. */ - -//# include -#endif - -#endif /* features.h */ diff --git a/import/OpenXDK/include/glibc/features_old.h b/import/OpenXDK/include/glibc/features_old.h deleted file mode 100644 index 0ecb9641c..000000000 --- a/import/OpenXDK/include/glibc/features_old.h +++ /dev/null @@ -1,4 +0,0 @@ -#define __USE_MISC 1 -#define __USE_GNU 1 -#define __P(arg) arg -#define __ptr_t void * diff --git a/import/OpenXDK/include/glibc/float.h b/import/OpenXDK/include/glibc/float.h deleted file mode 100644 index cd6fb846c..000000000 --- a/import/OpenXDK/include/glibc/float.h +++ /dev/null @@ -1,306 +0,0 @@ -#ifndef _FLOAT_ -#define _FLOAT_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include - - -#ifndef _CRTIMP -#define _CRTIMP -#endif - -extern u8 _Nan[8]; -extern u8 _Inf[8]; - -//#define NAN ((unsigned __int64)0xfff8000000000000) - -#define NAN *((double*)(&_Nan[0])) // instead of using __int64, store a NAN somwhere in memory (misc_vars.c) -#define INF *((double*)(&_Inf[0])) // Constant INF - -#define DBL_DIG 15 // # of decimal digits of precision -#define DBL_EPSILON 2.2204460492503131e-016 // smallest such that 1.0+DBL_EPSILON != 1.0 -#define DBL_MANT_DIG 53 // # of bits in mantissa -#define DBL_MAX 1.7976931348623158e+308 // max value -#define DBL_MAX_10_EXP 308 // max decimal exponent -#define DBL_MAX_EXP 1024 // max binary exponent -#define DBL_MIN 2.2250738585072014e-308 // min positive value -#define DBL_MIN_10_EXP (-307) // min decimal exponent -#define DBL_MIN_EXP (-1021) // min binary exponent -#define _DBL_RADIX 2 // exponent radix -#define _DBL_ROUNDS 1 // addition rounding: near - -#define FLT_DIG 6 // # of decimal digits of precision -#define FLT_EPSILON 1.192092896e-07F // smallest such that 1.0+FLT_EPSILON != 1.0 -#define FLT_GUARD 0 -#define FLT_MANT_DIG 24 // # of bits in mantissa -#define FLT_MAX 3.402823466e+38F // max value -#define FLT_MAX_10_EXP 38 // max decimal exponent -#define FLT_MAX_EXP 128 // max binary exponent -#define FLT_MIN 1.175494351e-38F // min positive value -#define FLT_MIN_10_EXP (-37) // min decimal exponent -#define FLT_MIN_EXP (-125) // min binary exponent -#define FLT_NORMALIZE 0 -#define FLT_RADIX 2 // exponent radix -#define FLT_ROUNDS 1 // addition rounding: near - -#ifndef _M_M68K -#define LDBL_DIG DBL_DIG // # of decimal digits of precision -#define LDBL_EPSILON DBL_EPSILON // smallest such that 1.0+LDBL_EPSILON != 1.0 -#define LDBL_MANT_DIG DBL_MANT_DIG // # of bits in mantissa -#define LDBL_MAX DBL_MAX // max value -#define LDBL_MAX_10_EXP DBL_MAX_10_EXP // max decimal exponent -#define LDBL_MAX_EXP DBL_MAX_EXP // max binary exponent -#define LDBL_MIN DBL_MIN // min positive value -#define LDBL_MIN_10_EXP DBL_MIN_10_EXP // min decimal exponent -#define LDBL_MIN_EXP DBL_MIN_EXP // min binary exponent -#define _LDBL_RADIX DBL_RADIX // exponent radix -#define _LDBL_ROUNDS DBL_ROUNDS // addition rounding: near -#else -#define LDBL_DIG 18 // # of decimal digits of precision -#define LDBL_EPSILON 1.08420217248550443412e-019L // smallest such that 1.0+LDBL_EPSILON != 1.0 -#define LDBL_MANT_DIG 64 // # of bits in mantissa -#define LDBL_MAX 1.189731495357231765e+4932L // max value -#define LDBL_MAX_10_EXP 4932 // max decimal exponent -#define LDBL_MAX_EXP 16384 // max binary exponent -#define LDBL_MIN 3.3621031431120935063e-4932L // min positive value -#define LDBL_MIN_10_EXP (-4931) // min decimal exponent -#define LDBL_MIN_EXP (-16381) // min binary exponent -#define _LDBL_RADIX 2 // exponent radix -#define _LDBL_ROUNDS 1 // addition rounding: near -#endif - -// Function prototypes - -_CRTIMP unsigned int __cdecl _clearfp(void); -_CRTIMP unsigned int __cdecl _controlfp(unsigned int,unsigned int); -_CRTIMP unsigned int __cdecl _statusfp(void); -_CRTIMP void __cdecl _fpreset(void); - -#ifndef _MAC -#define _clear87 _clearfp -#define _status87 _statusfp -#endif // _MAC - -// -// Abstract User Control Word Mask and bit definitions -// - -#ifndef _MAC -#define _MCW_EM 0x0008001f // interrupt Exception Masks -#else -#define _MCW_EM 0x0000001f // interrupt Exception Masks -#endif -#define _EM_INEXACT 0x00000001 // inexact (precision) -#define _EM_UNDERFLOW 0x00000002 // underflow -#define _EM_OVERFLOW 0x00000004 // overflow -#define _EM_ZERODIVIDE 0x00000008 // zero divide -#define _EM_INVALID 0x00000010 // invalid - -#define _MCW_RC 0x00000300 // Rounding Control -#define _RC_NEAR 0x00000000 // near -#define _RC_DOWN 0x00000100 // down -#define _RC_UP 0x00000200 // up -#define _RC_CHOP 0x00000300 // chop - -// -// Abstract User Status Word bit definitions - - -#define _SW_INEXACT 0x00000001 // inexact (precision) -#define _SW_UNDERFLOW 0x00000002 // underflow -#define _SW_OVERFLOW 0x00000004 // overflow -#define _SW_ZERODIVIDE 0x00000008 // zero divide -#define _SW_INVALID 0x00000010 // invalid - - -// -// i386 specific definitions - -#define _MCW_PC 0x00030000 // Precision Control -#ifdef _M_MPPC -// - * PowerMac specific definitions(no precision control) - -#define _PC_64 0x00000000 // 64 bits -#define _PC_53 0x00000000 // 53 bits -#define _PC_24 0x00000000 // 24 bits -#else -#define _PC_64 0x00000000 // 64 bits -#define _PC_53 0x00010000 // 53 bits -#define _PC_24 0x00020000 // 24 bits -#endif - -#define _MCW_IC 0x00040000 // Infinity Control -#define _IC_AFFINE 0x00040000 // affine -#define _IC_PROJECTIVE 0x00000000 // projective - -#define _EM_DENORMAL 0x00080000 // denormal exception mask (_control87 only) - -#define _SW_DENORMAL 0x00080000 // denormal status bit - - -_CRTIMP unsigned int __cdecl _control87(unsigned int,unsigned int); - - -// -// RISC specific definitions - - -#define _MCW_DN 0x03000000 // Denormal Control -#define _DN_SAVE 0x00000000 // save denormal results and operands -#define _DN_FLUSH 0x01000000 // flush denormal results and operands to zero -#define _DN_FLUSH_OPERANDS_SAVE_RESULTS 0x02000000 // flush operands to zero and save results -#define _DN_SAVE_OPERANDS_FLUSH_RESULTS 0x03000000 // save operands and flush results to zero - - -// initial Control Word value - -#if defined(_M_IX86) - -#define _CW_DEFAULT ( _RC_NEAR + _PC_53 + _EM_INVALID + _EM_ZERODIVIDE + _EM_OVERFLOW + _EM_UNDERFLOW + _EM_INEXACT + _EM_DENORMAL) - -#elif defined(_MAC) - -#define _CW_DEFAULT ( _RC_NEAR + _PC_64 + _EM_INVALID + _EM_ZERODIVIDE + _EM_OVERFLOW + _EM_UNDERFLOW + _EM_INEXACT ) - -#elif defined(_M_MRX000) || defined (_M_ALPHA) || defined(_M_PPC) - -#define _CW_DEFAULT ( _RC_NEAR + _DN_FLUSH + _EM_INVALID + _EM_ZERODIVIDE + _EM_OVERFLOW + _EM_UNDERFLOW + _EM_INEXACT ) - -#endif - -// Global variable holding floating point error code - -#if defined(_MT) || defined(_DLL) -_CRTIMP extern int * __cdecl __fpecode(void); -#define _fpecode (*__fpecode()) -#else // ndef _MT && ndef _DLL -extern int _fpecode; -#endif // _MT || _DLL - -// invalid subconditions (_SW_INVALID also set) - -#define _SW_UNEMULATED 0x0040 // unemulated instruction -#define _SW_SQRTNEG 0x0080 // square root of a neg number -#define _SW_STACKOVERFLOW 0x0200 // FP stack overflow -#define _SW_STACKUNDERFLOW 0x0400 // FP stack underflow - -// Floating point error signals and return codes - -#define _FPE_INVALID 0x81 -#define _FPE_DENORMAL 0x82 -#define _FPE_ZERODIVIDE 0x83 -#define _FPE_OVERFLOW 0x84 -#define _FPE_UNDERFLOW 0x85 -#define _FPE_INEXACT 0x86 - -#define _FPE_UNEMULATED 0x87 -#define _FPE_SQRTNEG 0x88 -#define _FPE_STACKOVERFLOW 0x8a -#define _FPE_STACKUNDERFLOW 0x8b - -#define _FPE_EXPLICITGEN 0x8c // raise( SIGFPE ); - - -// IEEE recommended functions - -_CRTIMP double __cdecl _copysign (double, double); -_CRTIMP double __cdecl _chgsign (double); -_CRTIMP double __cdecl _scalb(double, long); -_CRTIMP double __cdecl _logb(double); -_CRTIMP double __cdecl _nextafter(double, double); -_CRTIMP int __cdecl _finite(double); -_CRTIMP int __cdecl _isnan(double); -_CRTIMP int __cdecl _fpclass(double); - -#define _FPCLASS_SNAN 0x0001 // signaling NaN -#define _FPCLASS_QNAN 0x0002 // quiet NaN -#define _FPCLASS_NINF 0x0004 // negative infinity -#define _FPCLASS_NN 0x0008 // negative normal -#define _FPCLASS_ND 0x0010 // negative denormal -#define _FPCLASS_NZ 0x0020 // -0 -#define _FPCLASS_PZ 0x0040 // +0 -#define _FPCLASS_PD 0x0080 // positive denormal -#define _FPCLASS_PN 0x0100 // positive normal -#define _FPCLASS_PINF 0x0200 // positive infinity - - -#if !__STDC__ - -// Non-ANSI names for compatibility - -#ifndef _MAC -#define clear87 _clear87 -#define status87 _status87 -#define control87 _control87 -#endif // _MAC - -_CRTIMP void __cdecl fpreset(void); - -#define DBL_RADIX _DBL_RADIX -#define DBL_ROUNDS _DBL_ROUNDS - -#define LDBL_RADIX _LDBL_RADIX -#define LDBL_ROUNDS _LDBL_ROUNDS - -#define MCW_EM _MCW_EM -#define EM_INVALID _EM_INVALID -#define EM_DENORMAL _EM_DENORMAL -#define EM_ZERODIVIDE _EM_ZERODIVIDE -#define EM_OVERFLOW _EM_OVERFLOW -#define EM_UNDERFLOW _EM_UNDERFLOW -#define EM_INEXACT _EM_INEXACT - -#define MCW_IC _MCW_IC -#define IC_AFFINE _IC_AFFINE -#define IC_PROJECTIVE _IC_PROJECTIVE - -#define MCW_RC _MCW_RC -#define RC_CHOP _RC_CHOP -#define RC_UP _RC_UP -#define RC_DOWN _RC_DOWN -#define RC_NEAR _RC_NEAR - -#define MCW_PC _MCW_PC -#define PC_24 _PC_24 -#define PC_53 _PC_53 -#define PC_64 _PC_64 - -#define CW_DEFAULT _CW_DEFAULT - -#define SW_INVALID _SW_INVALID -#define SW_DENORMAL _SW_DENORMAL -#define SW_ZERODIVIDE _SW_ZERODIVIDE -#define SW_OVERFLOW _SW_OVERFLOW -#define SW_UNDERFLOW _SW_UNDERFLOW -#define SW_INEXACT _SW_INEXACT - -#define SW_UNEMULATED _SW_UNEMULATED -#define SW_SQRTNEG _SW_SQRTNEG -#define SW_STACKOVERFLOW _SW_STACKOVERFLOW -#define SW_STACKUNDERFLOW _SW_STACKUNDERFLOW - -#define FPE_INVALID _FPE_INVALID -#define FPE_DENORMAL _FPE_DENORMAL -#define FPE_ZERODIVIDE _FPE_ZERODIVIDE -#define FPE_OVERFLOW _FPE_OVERFLOW -#define FPE_UNDERFLOW _FPE_UNDERFLOW -#define FPE_INEXACT _FPE_INEXACT - -#define FPE_UNEMULATED _FPE_UNEMULATED -#define FPE_SQRTNEG _FPE_SQRTNEG -#define FPE_STACKOVERFLOW _FPE_STACKOVERFLOW -#define FPE_STACKUNDERFLOW _FPE_STACKUNDERFLOW - -#define FPE_EXPLICITGEN _FPE_EXPLICITGEN - -#endif - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/import/OpenXDK/include/glibc/gnu-stabs.h b/import/OpenXDK/include/glibc/gnu-stabs.h deleted file mode 100644 index 548fc533f..000000000 --- a/import/OpenXDK/include/glibc/gnu-stabs.h +++ /dev/null @@ -1,80 +0,0 @@ -/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#ifndef __GNU_STABS_H - -#define __GNU_STABS_H 1 - -//#ifdef HAVE_GNU_LD - -// -// -// GNU-STABS for rand.c stuff -// -/* Alias a function: - function_alias(creat, _creat, int, (file, mode), - DEFUN(creat, (file, mode), - CONST char *file AND int mode)) - Yes, this is very repetitive. Nothing you can do about it, so shut up. */ -#define function_alias(name, _name, type, args, defun) \ - symbol_alias (_name, name); - -#define function_alias_void(name, _name, args, defun) \ - symbol_alias (_name, name); - - -#ifdef NO_UNDERSCORES -#define __SYMBOL_PREFIX -#else -#define __SYMBOL_PREFIX "_" -#endif - -// Make references to ALIAS refer to SYMBOL. -/* -#define symbol_alias(symbol, alias) \ - asm(".stabs \"" __SYMBOL_PREFIX #alias "\",11,0,0,0\n"\ - ".stabs \"" __SYMBOL_PREFIX #symbol "\",1,0,0,0") - -// Issue a warning message from the linker whenever SYMBOL is referenced. -#define warn_references(symbol, msg) \ - asm(".stabs \"" msg "\",30,0,0,0\n" \ - ".stabs \"" __SYMBOL_PREFIX #symbol "\",1,0,0,0") - -#define stub_warning(name) \ - warn_references(name, \ - "warning: " #name " is not implemented and will always fail") - -#define text_set_element(set, symbol) \ - asm(".stabs \"" __SYMBOL_PREFIX #set "\",23,0,0," __SYMBOL_PREFIX #symbol) -#define data_set_element(set, symbol) \ - asm(".stabs \"" __SYMBOL_PREFIX #set "\",25,0,0," __SYMBOL_PREFIX #symbol) -#define bss_set_element(set, symbol) \ - asm(".stabs \"" __SYMBOL_PREFIX #set "\",27,0,0," __SYMBOL_PREFIX #symbol) - -#else // No GNU stabs. - -#define function_alias(name, _name, type, args, defun) \ - type defun { return _name args; } - -#define function_alias_void(name, _name, args, defun) \ - void defun { _name args; } - - */ -//#endif // GNU stabs. - -#endif // gnu-stabs.h diff --git a/import/OpenXDK/include/glibc/huge_val.h b/import/OpenXDK/include/glibc/huge_val.h deleted file mode 100644 index 2f77519b5..000000000 --- a/import/OpenXDK/include/glibc/huge_val.h +++ /dev/null @@ -1,47 +0,0 @@ -/* `HUGE_VAL' constant for IEEE 754 machines (where it is infinity). - Used by and functions for overflow. - -Copyright (C) 1992 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#ifndef _HUGE_VAL_H -#define _HUGE_VAL_H 1 - -#include -#include - -/* IEEE positive infinity. */ - -#if __BYTE_ORDER == __BIG_ENDIAN -#define __huge_val_bytes { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } -#endif -#if __BYTE_ORDER == __LITTLE_ENDIAN -#define __huge_val_bytes { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } -#endif - -#ifdef __GNUC__ -#define HUGE_VAL \ - (__extension__ ((union { unsigned char __c[8]; \ - double __d; }) \ - { __huge_val_bytes }).__d) -#else /* Not GCC. */ -static __const unsigned char __huge_val[8] = __huge_val_bytes; -#define HUGE_VAL (*(__const double *) __huge_val) -#endif /* GCC. */ - -#endif /* huge_val.h */ diff --git a/import/OpenXDK/include/glibc/limits.h b/import/OpenXDK/include/glibc/limits.h deleted file mode 100644 index 4ee059aa7..000000000 --- a/import/OpenXDK/include/glibc/limits.h +++ /dev/null @@ -1,12 +0,0 @@ - -#ifndef _LIMITS -#define _LIMITS - - - -#define LONG_MIN (-2147483647-1) -#define LONG_MAX (2147483647) -#define ULONG_MAX (0xffffffff) - - -#endif // _LIMITS diff --git a/import/OpenXDK/include/glibc/malloc.h b/import/OpenXDK/include/glibc/malloc.h deleted file mode 100644 index d1978da83..000000000 --- a/import/OpenXDK/include/glibc/malloc.h +++ /dev/null @@ -1,282 +0,0 @@ -/* Declarations for `malloc' and friends. - Copyright 1990, 1991, 1992, 1993 Free Software Foundation, Inc. - Written May 1989 by Mike Haertel. - -This library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with this library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. - - The author may be reached (Email) at the address mike@ai.mit.edu, - or (US mail) as Mike Haertel c/o Free Software Foundation. */ - -#ifndef _MALLOC_H - -#define _MALLOC_H 1 - -#ifdef _MALLOC_INTERNAL - -#ifdef HAVE_CONFIG_H -#include -#endif - -#if defined(_LIBC) || defined(STDC_HEADERS) || defined(USG) -#include -#else -#ifndef memset -#define memset(s, zero, n) bzero ((s), (n)) -#endif -#ifndef memcpy -#define memcpy(d, s, n) bcopy ((s), (d), (n)) -#endif -#endif - -#if defined (__GNU_LIBRARY__) || (defined (__STDC__) && __STDC__) -#include -#else -#ifndef CHAR_BIT -#define CHAR_BIT 8 -#endif -#endif - -#ifdef HAVE_UNISTD_H -#include -#endif - -#endif /* _MALLOC_INTERNAL. */ - - -#ifdef __cplusplus -extern "C" -{ -#endif - -#if defined (__cplusplus) || (defined (__STDC__) && __STDC__) -#undef __P -#define __P(args) args -#undef __ptr_t -#define __ptr_t void * -#else /* Not C++ or ANSI C. */ -#undef __P -#define __P(args) () -#undef const -#define const -#undef __ptr_t -#define __ptr_t char * -#endif /* C++ or ANSI C. */ - -#if defined (__STDC__) && __STDC__ -#include -#define __malloc_size_t size_t -#else -#define __malloc_size_t unsigned int -#endif - -#ifndef NULL -#define NULL 0 -#endif - - -/* Allocate SIZE bytes of memory. */ -extern __ptr_t malloc __P ((size_t __size)); -/* Re-allocate the previously allocated block - in __ptr_t, making the new block SIZE bytes long. */ -extern __ptr_t realloc __P ((__ptr_t __ptr, size_t __size)); -/* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */ -extern __ptr_t calloc __P ((size_t __nmemb, size_t __size)); -/* Free a block allocated by `malloc', `realloc' or `calloc'. */ -extern void free __P ((__ptr_t __ptr)); - -/* Allocate SIZE bytes allocated to ALIGNMENT bytes. */ -extern __ptr_t memalign __P ((size_t __alignment, size_t __size)); - -/* Allocate SIZE bytes on a page boundary. */ -extern __ptr_t valloc __P ((size_t __size)); - - -#ifdef _MALLOC_INTERNAL - -/* The allocator divides the heap into blocks of fixed size; large - requests receive one or more whole blocks, and small requests - receive a fragment of a block. Fragment sizes are powers of two, - and all fragments of a block are the same size. When all the - fragments in a block have been freed, the block itself is freed. */ -#define INT_BIT (CHAR_BIT * sizeof(int)) -#define BLOCKLOG (INT_BIT > 16 ? 12 : 9) -#define BLOCKSIZE (1 << BLOCKLOG) -#define BLOCKIFY(SIZE) (((SIZE) + BLOCKSIZE - 1) / BLOCKSIZE) - -/* Determine the amount of memory spanned by the initial heap table - (not an absolute limit). */ -#define HEAP (INT_BIT > 16 ? 4194304 : 65536) - -/* Number of contiguous free blocks allowed to build up at the end of - memory before they will be returned to the system. */ -#define FINAL_FREE_BLOCKS 8 - -/* Data structure giving per-block information. */ -typedef union - { - /* Heap information for a busy block. */ - struct - { - /* Zero for a large block, or positive giving the - logarithm to the base two of the fragment size. */ - int type; - union - { - struct - { - __malloc_size_t nfree; /* Free frags in a fragmented block. */ - __malloc_size_t first; /* First free fragment of the block. */ - } frag; - /* Size (in blocks) of a large cluster. */ - __malloc_size_t size; - } info; - } busy; - /* Heap information for a free block - (that may be the first of a free cluster). */ - struct - { - __malloc_size_t size; /* Size (in blocks) of a free cluster. */ - __malloc_size_t next; /* Index of next free cluster. */ - __malloc_size_t prev; /* Index of previous free cluster. */ - } free; - } malloc_info; - -/* Pointer to first block of the heap. */ -extern char *_heapbase; - -/* Table indexed by block number giving per-block information. */ -extern malloc_info *_heapinfo; - -/* Address to block number and vice versa. */ -#define BLOCK(A) (((char *) (A) - _heapbase) / BLOCKSIZE + 1) -#define ADDRESS(B) ((__ptr_t) (((B) - 1) * BLOCKSIZE + _heapbase)) - -/* Current search index for the heap table. */ -extern __malloc_size_t _heapindex; - -/* Limit of valid info table indices. */ -extern __malloc_size_t _heaplimit; - -/* Doubly linked lists of free fragments. */ -struct list - { - struct list *next; - struct list *prev; - }; - -/* Free list headers for each fragment size. */ -extern struct list _fraghead[]; - -/* List of blocks allocated with `memalign' (or `valloc'). */ -struct alignlist - { - struct alignlist *next; - __ptr_t aligned; /* The address that memaligned returned. */ - __ptr_t exact; /* The address that malloc returned. */ - }; -extern struct alignlist *_aligned_blocks; - -/* Instrumentation. */ -extern __malloc_size_t _chunks_used; -extern __malloc_size_t _bytes_used; -extern __malloc_size_t _chunks_free; -extern __malloc_size_t _bytes_free; - -/* Internal version of `free' used in `morecore' (malloc.c). */ -extern void _free_internal __P ((__ptr_t __ptr)); - -#endif /* _MALLOC_INTERNAL. */ - -/* Underlying allocation function; successive calls should - return contiguous pieces of memory. */ -extern __ptr_t (*__morecore) __P ((ptrdiff_t __size)); - -/* Default value of `__morecore'. */ -extern __ptr_t __default_morecore __P ((ptrdiff_t __size)); - -/* If not NULL, this function is called after each time - `__morecore' is called to increase the data size. */ -extern void (*__after_morecore_hook) __P ((void)); - -/* Nonzero if `malloc' has been called and done its initialization. */ -extern int __malloc_initialized; - -/* Hooks for debugging versions. */ -extern void (*__free_hook) __P ((__ptr_t __ptr)); -extern __ptr_t (*__malloc_hook) __P ((size_t __size)); -extern __ptr_t (*__realloc_hook) __P ((__ptr_t __ptr, size_t __size)); - -/* Return values for `mprobe': these are the kinds of inconsistencies that - `mcheck' enables detection of. */ -enum mcheck_status - { - MCHECK_DISABLED = -1, /* Consistency checking is not turned on. */ - MCHECK_OK, /* Block is fine. */ - MCHECK_FREE, /* Block freed twice. */ - MCHECK_HEAD, /* Memory before the block was clobbered. */ - MCHECK_TAIL /* Memory after the block was clobbered. */ - }; - -/* Activate a standard collection of debugging hooks. This must be called - before `malloc' is ever called. ABORTFUNC is called with an error code - (see enum above) when an inconsistency is detected. If ABORTFUNC is - null, the standard function prints on stderr and then calls `abort'. */ -extern int mcheck __P ((void (*__abortfunc) __P ((enum mcheck_status)))); - -/* Check for aberrations in a particular malloc'd block. You must have - called `mcheck' already. These are the same checks that `mcheck' does - when you free or reallocate a block. */ -extern enum mcheck_status mprobe __P ((__ptr_t __ptr)); - -/* Activate a standard collection of tracing hooks. */ -extern void mtrace __P ((void)); -extern void muntrace __P ((void)); - -/* Statistics available to the user. */ -struct mstats - { - __malloc_size_t bytes_total; /* Total size of the heap. */ - __malloc_size_t chunks_used; /* Chunks allocated by the user. */ - __malloc_size_t bytes_used; /* Byte total of user-allocated chunks. */ - __malloc_size_t chunks_free; /* Chunks in the free list. */ - __malloc_size_t bytes_free; /* Byte total of chunks in the free list. */ - }; - -/* Pick up the current statistics. */ -extern struct mstats mstats __P ((void)); - -/* Call WARNFUN with a warning message when memory usage is high. */ -extern void memory_warnings __P ((__ptr_t __start, - void (*__warnfun) __P ((const char *)))); - - -/* Relocating allocator. */ - -/* Allocate SIZE bytes, and store the address in *HANDLEPTR. */ -extern __ptr_t r_alloc __P ((__ptr_t *__handleptr, size_t __size)); - -/* Free the storage allocated in HANDLEPTR. */ -extern void r_alloc_free __P ((__ptr_t *__handleptr)); - -/* Adjust the block at HANDLEPTR to be SIZE bytes long. */ -extern __ptr_t r_re_alloc __P ((__ptr_t *__handleptr, size_t __size)); - - -#ifdef __cplusplus -} -#endif - -#endif /* malloc.h */ diff --git a/import/OpenXDK/include/glibc/math.h b/import/OpenXDK/include/glibc/math.h deleted file mode 100644 index 15c5fb6fc..000000000 --- a/import/OpenXDK/include/glibc/math.h +++ /dev/null @@ -1,285 +0,0 @@ -/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -/* - * ANSI Standard: 4.5 MATHEMATICS - */ - -#ifndef _MATH_H -#define _MATH_H 1 - -# ifdef __cplusplus -extern "C" { -# endif - - -#include -#include - -#define __need_Emath -#include - -/* Get machine-dependent HUGE_VAL value (returned on overflow). */ -#include - -/* Get machine-dependent NAN value (returned for some domain errors). */ -#ifdef __USE_GNU -#include -#endif - - -/* Trigonometric functions. */ - -/* Arc cosine of X. */ -extern __CONSTVALUE double acos __P ((double __x)); -/* Arc sine of X. */ -extern __CONSTVALUE double asin __P ((double __x)); -/* Arc tangent of X. */ -extern __CONSTVALUE double atan __P ((double __x)); -/* Arc tangent of Y/X. */ -extern __CONSTVALUE double atan2 __P ((double __y, double __x)); - -/* Cosine of X. */ -extern __CONSTVALUE double cos __P ((double __x)); -/* Sine of X. */ -extern __CONSTVALUE double sin __P ((double __x)); -extern __CONSTVALUE double _sin __P ((double __x)); -/* Tangent of X. */ -extern __CONSTVALUE double tan __P ((double __x)); - - -/* Hyperbolic functions. */ - -/* Hyperbolic cosine of X. */ -extern __CONSTVALUE double cosh __P ((double __x)); -/* Hyperbolic sine of X. */ -extern __CONSTVALUE double sinh __P ((double __x)); -/* Hyperbolic tangent of X. */ -extern __CONSTVALUE double tanh __P ((double __x)); - -#ifdef __USE_MISC -/* Hyperbolic arc cosine of X. */ -extern __CONSTVALUE double acosh __P ((double __x)); -/* Hyperbolic arc sine of X. */ -extern __CONSTVALUE double asinh __P ((double __x)); -/* Hyperbolic arc tangent of X. */ -extern __CONSTVALUE double atanh __P ((double __x)); -#endif - -/* Exponential and logarithmic functions. */ - -/* Exponentional function of X. */ -extern __CONSTVALUE double exp __P ((double __x)); - -/* Break VALUE into a normalized fraction and an integral power of 2. */ -extern double frexp __P ((double __value, int *__exp)); - -/* X times (two to the EXP power). */ -extern __CONSTVALUE double ldexp __P ((double __x, int __exp)); - -/* Natural logarithm of X. */ -extern __CONSTVALUE double log __P ((double __x)); - -/* Base-ten logarithm of X. */ -extern __CONSTVALUE double log10 __P ((double __x)); - -#ifdef __USE_MISC -/* Return exp(X) - 1. */ -extern __CONSTVALUE double __expm1 __P ((double __x)); -extern __CONSTVALUE double expm1 __P ((double __x)); - -/* Return log(1 + X). */ -extern __CONSTVALUE double log1p __P ((double __x)); -#endif - -/* Break VALUE into integral and fractional parts. */ -extern double modf __P ((double __value, double *__iptr)); - - -/* Power functions. */ - -/* Return X to the Y power. */ -extern __CONSTVALUE double pow __P ((double __x, double __y)); - -/* Return the square root of X. */ -extern __CONSTVALUE double sqrt __P ((double __x)); - -#ifdef __USE_MISC -/* Return the cube root of X. */ -extern __CONSTVALUE double cbrt __P ((double __x)); -#endif - - -/* Nearest integer, absolute value, and remainder functions. */ - -/* Smallest integral value not less than X. */ -extern __CONSTVALUE double ceil __P ((double __x)); - -/* Absolute value of X. */ -extern __CONSTVALUE double fabs __P ((double __x)); - -/* Largest integer not greater than X. */ -extern __CONSTVALUE double floor __P ((double __x)); - -/* Floating-point modulo remainder of X/Y. */ -extern __CONSTVALUE double fmod __P ((double __x, double __y)); - - -/* Return 0 if VALUE is finite or NaN, +1 if it - is +Infinity, -1 if it is -Infinity. */ -extern __CONSTVALUE int __isinf __P ((double __value)); - -/* Return nonzero if VALUE is not a number. */ -extern __CONSTVALUE int __isnan __P ((double __value)); - -/* Return nonzero if VALUE is finite and not NaN. */ -extern __CONSTVALUE int __finite __P ((double __value)); -#ifdef __OPTIMIZE__ -#define __finite(value) (!__isinf(value)) -#endif - -/* Deal with an infinite or NaN result. - If ERROR is ERANGE, result is +Inf; - if ERROR is - ERANGE, result is -Inf; - otherwise result is NaN. - This will set `errno' to either ERANGE or EDOM, - and may return an infinity or NaN, or may do something else. */ -extern double __infnan __P ((int __error)); - -/* Return X with its signed changed to Y's. */ -extern __CONSTVALUE double __copysign __P ((double __x, double __y)); - -/* Return X times (2 to the Nth power). */ -extern __CONSTVALUE double __scalb __P ((double __x, int __n)); - -#ifdef __OPTIMIZE__ -#define __scalb(x, n) ldexp ((x), (n)) -#endif - -/* Return the remainder of X/Y. */ -extern __CONSTVALUE double __drem __P ((double __x, double __y)); - -/* Return the base 2 signed integral exponent of X. */ -extern __CONSTVALUE double __logb __P ((double __x)); - -#ifdef __USE_MISC - -/* Return the integer nearest X in the direction of the - prevailing rounding mode. */ -extern __CONSTVALUE double __rint __P ((double __x)); -extern __CONSTVALUE double rint __P ((double __x)); - -/* Return `sqrt(X*X + Y*Y)'. */ -extern __CONSTVALUE double hypot __P ((double __x, double __y)); - -struct __cabs_complex -{ - double __x, __y; -}; - -/* Return `sqrt(X*X + Y*Y)'. */ -extern __CONSTVALUE double cabs __P ((struct __cabs_complex)); - -extern __CONSTVALUE int isinf __P ((double __value)); -extern __CONSTVALUE int isnan __P ((double __value)); -extern __CONSTVALUE int finite __P ((double __value)); -extern __CONSTVALUE double infnan __P ((int __error)); -extern __CONSTVALUE double copysign __P ((double __x, double __y)); -extern __CONSTVALUE double scalb __P ((double __x, int __n)); -extern __CONSTVALUE double drem __P ((double __x, double __y)); -extern __CONSTVALUE double logb __P ((double __x)); - -#ifdef __OPTIMIZE__ -#define isinf(value) __isinf(value) -#define isnan(value) __isnan(value) -#define infnan(error) __infnan(error) -#define finite(value) __finite(value) -#define copysign(x, y) __copysign((x), (y)) -#define scalb(x, n) __scalb((x), (n)) -#define drem(x, y) __drem((x), (y)) -#define logb(x) __logb(x) -#endif /* Optimizing. */ - -#endif /* Use misc. */ - - -#if 0 -/* The "Future Library Directions" section of the - ANSI Standard reserves these as `float' and - `long double' versions of the above functions. */ - -extern __CONSTVALUE float acosf __P ((float __x)); -extern __CONSTVALUE float asinf __P ((float __x)); -extern __CONSTVALUE float atanf __P ((float __x)); -extern __CONSTVALUE float atan2f __P ((float __y, float __x)); -extern __CONSTVALUE float cosf __P ((float __x)); -extern __CONSTVALUE float sinf __P ((float __x)); -extern __CONSTVALUE float tanf __P ((float __x)); -extern __CONSTVALUE float coshf __P ((float __x)); -extern __CONSTVALUE float sinhf __P ((float __x)); -extern __CONSTVALUE float tanhf __P ((float __x)); -extern __CONSTVALUE float expf __P ((float __x)); -extern float frexpf __P ((float __value, int *__exp)); -extern __CONSTVALUE float ldexpf __P ((float __x, int __exp)); -extern __CONSTVALUE float logf __P ((float __x)); -extern __CONSTVALUE float log10f __P ((float __x)); -extern float modff __P ((float __value, float *__iptr)); -extern __CONSTVALUE float powf __P ((float __x, float __y)); -extern __CONSTVALUE float sqrtf __P ((float __x)); -extern __CONSTVALUE float ceilf __P ((float __x)); -extern __CONSTVALUE float fabsf __P ((float __x)); -extern __CONSTVALUE float floorf __P ((float __x)); -extern __CONSTVALUE float fmodf __P ((float __x, float __y)); - -extern __CONSTVALUE __long_double_t acosl __P ((__long_double_t __x)); -extern __CONSTVALUE __long_double_t asinl __P ((__long_double_t __x)); -extern __CONSTVALUE __long_double_t atanl __P ((__long_double_t __x)); -extern __CONSTVALUE __long_double_t atan2l __P ((__long_double_t __y, __long_double_t __x)); -extern __CONSTVALUE __long_double_t cosl __P ((__long_double_t __x)); -extern __CONSTVALUE __long_double_t sinl __P ((__long_double_t __x)); -extern __CONSTVALUE __long_double_t tanl __P ((__long_double_t __x)); -extern __CONSTVALUE __long_double_t coshl __P ((__long_double_t __x)); -extern __CONSTVALUE __long_double_t sinhl __P ((__long_double_t __x)); -extern __CONSTVALUE __long_double_t tanhl __P ((__long_double_t __x)); -extern __CONSTVALUE __long_double_t expl __P ((__long_double_t __x)); -extern __long_double_t frexpl __P ((__long_double_t __value, int *__exp)); -extern __CONSTVALUE __long_double_t ldexpl __P ((__long_double_t __x, int __exp)); -extern __CONSTVALUE __long_double_t logl __P ((__long_double_t __x)); -extern __CONSTVALUE __long_double_t log10l __P ((__long_double_t __x)); -extern __long_double_t modfl __P ((__long_double_t __value, __long_double_t * __ip)); -extern __CONSTVALUE __long_double_t powl __P ((__long_double_t __x, __long_double_t __y)); -extern __CONSTVALUE __long_double_t sqrtl __P ((__long_double_t __x)); -extern __CONSTVALUE __long_double_t ceill __P ((__long_double_t __x)); -extern __CONSTVALUE __long_double_t fabsl __P ((__long_double_t __x)); -extern __CONSTVALUE __long_double_t floorl __P ((__long_double_t __x)); -extern __CONSTVALUE __long_double_t fmodl __P ((__long_double_t __x, __long_double_t __y)); -#endif /* 0 */ - -/* Get machine-dependent inline versions (if there are any). */ -/* -#include <__math.h> -*/ - - - -# ifdef __cplusplus -} -# endif - - -#endif /* math.h */ diff --git a/import/OpenXDK/include/glibc/memcopy.h b/import/OpenXDK/include/glibc/memcopy.h deleted file mode 100644 index 83ccb6046..000000000 --- a/import/OpenXDK/include/glibc/memcopy.h +++ /dev/null @@ -1,165 +0,0 @@ -/* memcopy.h -- definitions for memory copy functions. Generic C version. - Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. - Contributed by Torbjorn Granlund (tege@sics.se). - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -/* The strategy of the memory functions is: - - 1. Copy bytes until the destination pointer is aligned. - - 2. Copy words in unrolled loops. If the source and destination - are not aligned in the same way, use word memory operations, - but shift and merge two read words before writing. - - 3. Copy the few remaining bytes. - - This is fast on processors that have at least 10 registers for - allocation by GCC, and that can access memory at reg+const in one - instruction. - - I made an "exhaustive" test of this memmove when I wrote it, - exhaustive in the sense that I tried all alignment and length - combinations, with and without overlap. */ - -#ifndef _MEMCPY_H_ -#define _MEMCPY_H_ - -#include -#include - -/* The macros defined in this file are: - - BYTE_COPY_FWD(dst_beg_ptr, src_beg_ptr, nbytes_to_copy) - - BYTE_COPY_BWD(dst_end_ptr, src_end_ptr, nbytes_to_copy) - - WORD_COPY_FWD(dst_beg_ptr, src_beg_ptr, nbytes_remaining, nbytes_to_copy) - - WORD_COPY_BWD(dst_end_ptr, src_end_ptr, nbytes_remaining, nbytes_to_copy) - - MERGE(old_word, sh_1, new_word, sh_2) - [I fail to understand. I feel stupid. --roland] -*/ - -/* Type to use for aligned memory operations. - This should normally be the biggest type supported by a single load - and store. */ -#define op_t unsigned long int -#define OPSIZ (sizeof(op_t)) - - -/* Type to use for unaligned operations. */ -typedef unsigned char byte; - -/* Optimal type for storing bytes in registers. */ -#define reg_char char - -#undef TESTME - -#ifndef MERGE -#if __BYTE_ORDER == __LITTLE_ENDIAN -#define __BYTE_ORDER __LITTLE_ENDIAN -//#define TESTME -#define MERGE(w0, sh_1, w1, sh_2) (((w0) >> (sh_1)) | ((w1) << (sh_2))) -#endif - -#if __BYTE_ORDER == __BIG_ENDIAN -#ifndef TESTME -#define MERGE(w0, sh_1, w1, sh_2) (((w0) << (sh_1)) | ((w1) >> (sh_2))) -#endif -#endif -#endif //MERGE - - -/* Copy exactly NBYTES bytes from SRC_BP to DST_BP, - without any assumptions about alignment of the pointers. */ -#define BYTE_COPY_FWD(dst_bp, src_bp, nbytes) \ - do \ - { \ - size_t __nbytes = (nbytes); \ - while (__nbytes > 0) \ - { \ - byte __x = ((byte *) src_bp)[0]; \ - src_bp += 1; \ - __nbytes -= 1; \ - ((byte *) dst_bp)[0] = __x; \ - dst_bp += 1; \ - } \ - } while (0) - -/* Copy exactly NBYTES_TO_COPY bytes from SRC_END_PTR to DST_END_PTR, - beginning at the bytes right before the pointers and continuing towards - smaller addresses. Don't assume anything about alignment of the - pointers. */ -#define BYTE_COPY_BWD(dst_ep, src_ep, nbytes) \ - do \ - { \ - size_t __nbytes = (nbytes); \ - while (__nbytes > 0) \ - { \ - byte __x; \ - src_ep -= 1; \ - __x = ((byte *) src_ep)[0]; \ - dst_ep -= 1; \ - __nbytes -= 1; \ - ((byte *) dst_ep)[0] = __x; \ - } \ - } while (0) - -/* Copy *up to* NBYTES bytes from SRC_BP to DST_BP, with - the assumption that DST_BP is aligned on an OPSIZ multiple. If - not all bytes could be easily copied, store remaining number of bytes - in NBYTES_LEFT, otherwise store 0. */ -extern void _wordcopy_fwd_aligned __P ((long int, long int, size_t)); -extern void _wordcopy_fwd_dest_aligned __P ((long int, long int, size_t)); -#define WORD_COPY_FWD(dst_bp, src_bp, nbytes_left, nbytes) \ - do \ - { \ - if (src_bp % OPSIZ == 0) \ - _wordcopy_fwd_aligned (dst_bp, src_bp, (nbytes) / OPSIZ); \ - else \ - _wordcopy_fwd_dest_aligned (dst_bp, src_bp, (nbytes) / OPSIZ); \ - src_bp += (nbytes) & NEGU32(OPSIZ); \ - dst_bp += (nbytes) & NEGU32(OPSIZ); \ - (nbytes_left) = (nbytes) % OPSIZ; \ - } while (0) - -/* Copy *up to* NBYTES_TO_COPY bytes from SRC_END_PTR to DST_END_PTR, - beginning at the words (of type op_t) right before the pointers and - continuing towards smaller addresses. May take advantage of that - DST_END_PTR is aligned on an OPSIZ multiple. If not all bytes could be - easily copied, store remaining number of bytes in NBYTES_REMAINING, - otherwise store 0. */ -extern void _wordcopy_bwd_aligned __P ((long int, long int, size_t)); -extern void _wordcopy_bwd_dest_aligned __P ((long int, long int, size_t)); -#define WORD_COPY_BWD(dst_ep, src_ep, nbytes_left, nbytes) \ - do \ - { \ - if (src_ep % OPSIZ == 0) \ - _wordcopy_bwd_aligned (dst_ep, src_ep, (nbytes) / OPSIZ); \ - else \ - _wordcopy_bwd_dest_aligned (dst_ep, src_ep, (nbytes) / OPSIZ); \ - src_ep -= (nbytes) & NEGU32(OPSIZ); \ - dst_ep -= (nbytes) & NEGU32(OPSIZ); \ - (nbytes_left) = (nbytes) % OPSIZ; \ - } while (0) - - -/* Threshold value for when to enter the unrolled loops. */ -#define OP_T_THRES 16 - -#endif //_MEMCPY_H_ diff --git a/import/OpenXDK/include/glibc/misc/sys/cdefs.h b/import/OpenXDK/include/glibc/misc/sys/cdefs.h deleted file mode 100644 index 5c82168c5..000000000 --- a/import/OpenXDK/include/glibc/misc/sys/cdefs.h +++ /dev/null @@ -1,226 +0,0 @@ -/* Copyright (C) 1992,93,94,95,96,97,98,99,2000,2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_CDEFS_H -#define _SYS_CDEFS_H 1 - -/* We are almost always included from features.h. */ -#ifndef _FEATURES_H -# include -#endif - -/* The GNU libc does not support any K&R compilers or the traditional mode - of ISO C compilers anymore. Check for some of the combinations not - anymore supported. */ -#if defined __GNUC__ && !defined __STDC__ -# error "You need a ISO C conforming compiler to use the glibc headers" -#endif - -/* Some user header file might have defined this before. */ -#undef __P -#undef __PMT - -#ifdef __GNUC__ - -/* GCC can always grok prototypes. For C++ programs we add throw() - to help it optimize the function calls. But this works only with - gcc 2.8.x and egcs. */ -# if defined __cplusplus && __GNUC_PREREQ (2,8) -# define __THROW throw () -# else -# define __THROW -# endif -# define __P(args) args __THROW -/* This macro will be used for functions which might take C++ callback - functions. */ -# define __PMT(args) args - -#else /* Not GCC. */ - -# define __inline /* No inline functions. */ - -# define __THROW -# define __P(args) args -# define __PMT(args) args - -# define __const const -# define __signed signed -# define __volatile volatile - -#endif /* GCC. */ - -/* For these things, GCC behaves the ANSI way normally, - and the non-ANSI way under -traditional. */ - -#define __CONCAT(x,y) x ## y -#define __STRING(x) #x - -/* This is not a typedef so `const __ptr_t' does the right thing. */ -#define __ptr_t void * -#define __long_double_t long double - - -/* C++ needs to know that types and declarations are C, not C++. */ -#ifdef __cplusplus -# define __BEGIN_DECLS extern "C" { -# define __END_DECLS } -#else -# define __BEGIN_DECLS -# define __END_DECLS -#endif - - -/* Support for bounded pointers. */ -#ifndef __BOUNDED_POINTERS__ -# define __bounded /* nothing */ -# define __unbounded /* nothing */ -# define __ptrvalue /* nothing */ -#endif - - -/* Support for flexible arrays. */ -#if __GNUC_PREREQ (2,97) -/* GCC 2.97 supports C99 flexible array members. */ -# define __flexarr [] -#else -# ifdef __GNUC__ -# define __flexarr [0] -# else -# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L -# define __flexarr [] -# else -/* Some other non-C99 compiler. Approximate with [1]. */ -# define __flexarr [1] -# endif -# endif -#endif - - -/* __asm__ ("xyz") is used throughout the headers to rename functions - at the assembly language level. This is wrapped by the __REDIRECT - macro, in order to support compilers that can do this some other - way. When compilers don't support asm-names at all, we have to do - preprocessor tricks instead (which don't have exactly the right - semantics, but it's the best we can do). - - Example: - int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */ - -#if defined __GNUC__ && __GNUC__ >= 2 - -# define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias)) -# define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname) -# define __ASMNAME2(prefix, cname) __STRING (prefix) cname - -/* -#elif __SOME_OTHER_COMPILER__ - -# define __REDIRECT(name, proto, alias) name proto; \ - _Pragma("let " #name " = " #alias) -*/ -#endif - -/* GCC has various useful declarations that can be made with the - `__attribute__' syntax. All of the ways we use this do fine if - they are omitted for compilers that don't understand it. */ -#if !defined __GNUC__ || __GNUC__ < 2 -# define __attribute__(xyz) /* Ignore */ -#endif - -/* At some point during the gcc 2.96 development the `malloc' attribute - for functions was introduced. We don't want to use it unconditionally - (although this would be possible) since it generates warnings. */ -#if __GNUC_PREREQ (2,96) -# define __attribute_malloc__ __attribute__ ((__malloc__)) -#else -# define __attribute_malloc__ /* Ignore */ -#endif - -/* At some point during the gcc 2.96 development the `pure' attribute - for functions was introduced. We don't want to use it unconditionally - (although this would be possible) since it generates warnings. */ -#if __GNUC_PREREQ (2,96) -# define __attribute_pure__ __attribute__ ((__pure__)) -#else -# define __attribute_pure__ /* Ignore */ -#endif - -/* At some point during the gcc 3.1 development the `used' attribute - for functions was introduced. We don't want to use it unconditionally - (although this would be possible) since it generates warnings. */ -#if __GNUC_PREREQ (3,1) -# define __attribute_used__ __attribute__ ((__used__)) -#else -# define __attribute_used__ __attribute__ ((__unused__)) -#endif - -/* At some point during the gcc 2.8 development the `format_arg' attribute - for functions was introduced. We don't want to use it unconditionally - (although this would be possible) since it generates warnings. - If several `format_arg' attributes are given for the same function, in - gcc-3.0 and older, all but the last one are ignored. In newer gccs, - all designated arguments are considered. */ -#if __GNUC_PREREQ (2,8) -# define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x))) -#else -# define __attribute_format_arg__(x) /* Ignore */ -#endif - -/* At some point during the gcc 2.97 development the `strfmon' format - attribute for functions was introduced. We don't want to use it - unconditionally (although this would be possible) since it - generates warnings. */ -#if __GNUC_PREREQ (2,97) -# define __attribute_format_strfmon__(a,b) \ - __attribute__ ((__format__ (__strfmon__, a, b))) -#else -# define __attribute_format_strfmon__(a,b) /* Ignore */ -#endif - -/* It is possible to compile containing GCC extensions even if GCC is - run in pedantic mode if the uses are carefully marked using the - `__extension__' keyword. But this is not generally available before - version 2.8. */ -#if !__GNUC_PREREQ (2,8) -# define __extension__ /* Ignore */ -#endif - -/* __restrict is known in EGCS 1.2 and above. */ -#if !__GNUC_PREREQ (2,92) -# define __restrict /* Ignore */ -#endif - -/* ISO C99 also allows to declare arrays as non-overlapping. The syntax is - array_name[restrict] - GCC 3.1 supports this. */ -#if __GNUC_PREREQ (3,1) && !defined __GNUG__ -# define __restrict_arr __restrict -#else -# ifdef __GNUC__ -# define __restrict_arr /* Not supported in old GCC. */ -# else -# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L -# define __restrict_arr restrict -# else -/* Some other non-C99 compiler. */ -# define __restrict_arr /* Not supported. */ -# endif -# endif -#endif - -#endif /* sys/cdefs.h */ diff --git a/import/OpenXDK/include/glibc/stdarg.h b/import/OpenXDK/include/glibc/stdarg.h deleted file mode 100644 index 54755d171..000000000 --- a/import/OpenXDK/include/glibc/stdarg.h +++ /dev/null @@ -1,88 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -#ifndef __dj_include_stdarg_h_ -#define __dj_include_stdarg_h_ - -#ifdef __cplusplus -extern "C" { -#endif - - - -#ifdef _MSC_VER -#pragma pack(push,8) -#endif - - - -#ifndef _VA_LIST_DEFINED -#ifdef _M_ALPHA -typedef struct { - char *a0; /* pointer to first homed integer argument */ - int offset; /* byte offset of next parameter */ -} va_list; -#else -typedef char * va_list; -#endif -#define _VA_LIST_DEFINED -#endif - - - - -#define _INTSIZEOF(n) ( (sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1) ) - -#define va_start(ap,v) ( ap = (va_list)&v + _INTSIZEOF(v) ) -#define va_arg(ap,t) ( *(t *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) ) -#define va_end(ap) ( ap = (va_list)0 ) - - -/* - - -#ifndef __dj_ENFORCE_ANSI_FREESTANDING - -#ifdef __dj_include_varargs_h_ -#error stdarg.h and varargs.h are mutually exclusive -#endif - -#include - -__DJ_va_list -#undef __DJ_va_list -#define __DJ_va_list - -#define __dj_va_rounded_size(T) \ - (((sizeof (T) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) - -#define va_arg(ap, T) \ - (ap = (va_list) ((char *) (ap) + __dj_va_rounded_size (T)), \ - *((T *) (void *) ((char *) (ap) - __dj_va_rounded_size (T)))) - -#define va_end(ap) - -#define va_start(ap, last_arg) \ - (ap = ((va_list) __builtin_next_arg (last_arg))) - -#ifndef __STRICT_ANSI__ - -#ifndef _POSIX_SOURCE - -#endif // !_POSIX_SOURCE -#endif // !__STRICT_ANSI__ -#endif // !__dj_ENFORCE_ANSI_FREESTANDING - -#ifndef __dj_ENFORCE_FUNCTION_CALLS -#endif //!__dj_ENFORCE_FUNCTION_CALLS - -*/ - -#ifdef _MSC_VER -#pragma pack(pop) -#endif /* _MSC_VER */ - - -#ifdef __cplusplus -} -#endif - -#endif /* !__dj_include_stdarg_h_ */ diff --git a/import/OpenXDK/include/glibc/stddef.h b/import/OpenXDK/include/glibc/stddef.h deleted file mode 100644 index b287843d2..000000000 --- a/import/OpenXDK/include/glibc/stddef.h +++ /dev/null @@ -1,330 +0,0 @@ -#if (!defined(_STDDEF_H) && !defined(_STDDEF_H_) && !defined(_ANSI_STDDEF_H) \ - && !defined(__STDDEF_H__)) \ - || defined(__need_wchar_t) || defined(__need_size_t) \ - || defined(__need_ptrdiff_t) || defined(__need_NULL) \ - || defined(__need_wint_t) - -/* Any one of these symbols __need_* means that GNU libc - wants us just to define one data type. So don't define - the symbols that indicate this file's entire job has been done. */ -#if (!defined(__need_wchar_t) && !defined(__need_size_t) \ - && !defined(__need_ptrdiff_t) && !defined(__need_NULL) \ - && !defined(__need_wint_t)) -#define _STDDEF_H -#define _STDDEF_H_ -/* snaroff@next.com says the NeXT needs this. */ -#define _ANSI_STDDEF_H -/* Irix 5.1 needs this. */ -#define __STDDEF_H__ -#endif - -#ifndef __sys_stdtypes_h -/* This avoids lossage on SunOS but only if stdtypes.h comes first. - There's no way to win with the other order! Sun lossage. */ - -/* On 4.3bsd-net2, make sure ansi.h is included, so we have - one less case to deal with in the following. */ -#if defined (__BSD_NET2__) || defined (____386BSD____) || defined (__FreeBSD__) || defined(__NetBSD__) -#include -#endif - -/* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are - defined if the corresponding type is *not* defined. - FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_ */ -#if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) -#if !defined(_SIZE_T_) && !defined(_BSD_SIZE_T_) -#define _SIZE_T_ -#endif -#if !defined(_PTRDIFF_T_) && !defined(_BSD_PTRDIFF_T_) -#define _PTRDIFF_T_ -#endif -/* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_ - instead of _WCHAR_T_. */ -#if !defined(_WCHAR_T_) && !defined(_BSD_WCHAR_T_) -#ifndef _BSD_WCHAR_T_ -#define _WCHAR_T -#endif -#endif -/* Undef _FOO_T_ if we are supposed to define foo_t. */ -#if defined (__need_ptrdiff_t) || defined (_STDDEF_H_) -#undef _PTRDIFF_T_ -#undef _BSD_PTRDIFF_T_ -#endif -#if defined (__need_size_t) || defined (_STDDEF_H_) -#undef _SIZE_T_ -#undef _BSD_SIZE_T_ -#endif -#if defined (__need_wchar_t) || defined (_STDDEF_H_) -#undef _WCHAR_T_ -#undef _BSD_WCHAR_T_ -#endif -#endif /* defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) */ - -/* Sequent's header files use _PTRDIFF_T_ in some conflicting way. - Just ignore it. */ -#if defined (__sequent__) && defined (_PTRDIFF_T_) -#undef _PTRDIFF_T_ -#endif - -/* On VxWorks, may have defined macros like - _TYPE_size_t which will typedef size_t. fixincludes patched the - vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is - not defined, and so that defining this macro defines _GCC_SIZE_T. - If we find that the macros are still defined at this point, we must - invoke them so that the type is defined as expected. */ -#if defined (_TYPE_ptrdiff_t) && (defined (__need_ptrdiff_t) || defined (_STDDEF_H_)) -_TYPE_ptrdiff_t; -#undef _TYPE_ptrdiff_t -#endif -#if defined (_TYPE_size_t) && (defined (__need_size_t) || defined (_STDDEF_H_)) -_TYPE_size_t; -#undef _TYPE_size_t -#endif -#if defined (_TYPE_wchar_t) && (defined (__need_wchar_t) || defined (_STDDEF_H_)) -_TYPE_wchar_t; -#undef _TYPE_wchar_t -#endif - -/* In case nobody has defined these types, but we aren't running under - GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE__TYPE__, and - __WCHAR_TYPE__ have reasonable values. This can happen if the - parts of GCC is compiled by an older compiler, that actually - include gstddef.h, such as collect2. */ - -/* Signed type of difference of two pointers. */ - -/* Define this type if we are doing the whole job, - or if we want this type in particular. */ -#if defined (_STDDEF_H) || defined (__need_ptrdiff_t) -#ifndef _PTRDIFF_T /* in case has defined it. */ -#ifndef _T_PTRDIFF_ -#ifndef _T_PTRDIFF -#ifndef __PTRDIFF_T -#ifndef _PTRDIFF_T_ -#ifndef _BSD_PTRDIFF_T_ -#ifndef ___int_ptrdiff_t_h -#ifndef _GCC_PTRDIFF_T -#define _PTRDIFF_T -#define _T_PTRDIFF_ -#define _T_PTRDIFF -#define __PTRDIFF_T -#define _PTRDIFF_T_ -#define _BSD_PTRDIFF_T_ -#define ___int_ptrdiff_t_h -#define _GCC_PTRDIFF_T -#ifndef __PTRDIFF_TYPE__ -#define __PTRDIFF_TYPE__ long int -#endif -typedef __PTRDIFF_TYPE__ ptrdiff_t; -#endif /* _GCC_PTRDIFF_T */ -#endif /* ___int_ptrdiff_t_h */ -#endif /* _BSD_PTRDIFF_T_ */ -#endif /* _PTRDIFF_T_ */ -#endif /* __PTRDIFF_T */ -#endif /* _T_PTRDIFF */ -#endif /* _T_PTRDIFF_ */ -#endif /* _PTRDIFF_T */ - -/* If this symbol has done its job, get rid of it. */ -#undef __need_ptrdiff_t - -#endif /* _STDDEF_H or __need_ptrdiff_t. */ - -/* Unsigned type of `sizeof' something. */ - -/* Define this type if we are doing the whole job, - or if we want this type in particular. */ -#if defined (_STDDEF_H) || defined (__need_size_t) -#ifndef _SIZE_T /* in case has defined it. */ -#ifndef _SYS_SIZE_T_H -#ifndef _T_SIZE_ -#ifndef _T_SIZE -#ifndef __SIZE_T_ -#ifndef _SIZE_T_ -#ifndef _BSD_SIZE_T_ -#ifndef _SIZE_T_DEFINED_ -#ifndef _SIZE_T_DEFINED -#ifndef ___int_size_t_h -#ifndef _GCC_SIZE_T -#ifndef _SIZET_ -#ifndef __size_t -#define _SIZE_T -#define _SYS_SIZE_T_H -#define _T_SIZE_ -#define _T_SIZE -#define __SIZE_T_ -#define _SIZE_T_ -#define _BSD_SIZE_T_ -#define _SIZE_T_DEFINED_ -#define _SIZE_T_DEFINED -#define ___int_size_t_h -#define _GCC_SIZE_T -#define _SIZET_ -#define __size_t -#ifndef __SIZE_TYPE__ -#define __SIZE_TYPE__ unsigned int -#endif -#if !(defined (__GNUG__) && defined (size_t)) -#ifndef _DONESIZET -typedef __SIZE_TYPE__ size_t; -#define _DONESIZET -#endif -#endif /* !(defined (__GNUG__) && defined (size_t)) */ -#endif /* __size_t */ -#endif /* _SIZET_ */ -#endif /* _GCC_SIZE_T */ -#endif /* ___int_size_t_h */ -#endif /* _SIZE_T_DEFINED */ -#endif /* _SIZE_T_DEFINED_ */ -#endif /* _BSD_SIZE_T_ */ -#endif /* _SIZE_T_ */ -#endif /* __SIZE_T */ -#endif /* _T_SIZE */ -#endif /* _T_SIZE_ */ -#endif /* _SYS_SIZE_T_H */ -#endif /* _SIZE_T */ -#undef __need_size_t -#endif /* _STDDEF_H or __need_size_t. */ - - -/* Wide character type. - Locale-writers should change this as necessary to - be big enough to hold unique values not between 0 and 127, - and not (wchar_t) -1, for each defined multibyte character. */ - -/* Define this type if we are doing the whole job, - or if we want this type in particular. */ -#if defined (_STDDEF_H) || defined (__need_wchar_t) -#ifndef _WCHAR_T -#ifndef _T_WCHAR_ -#ifndef _T_WCHAR -#ifndef __WCHAR_T -#ifndef _WCHAR_T_ -#ifndef _BSD_WCHAR_T_ -#ifndef _WCHAR_T_DEFINED_ -#ifndef _WCHAR_T_DEFINED -#ifndef _WCHAR_T_H -#ifndef ___int_wchar_t_h -#ifndef __INT_WCHAR_T_H -#ifndef _GCC_WCHAR_T -#define _WCHAR_T -#define _T_WCHAR_ -#define _T_WCHAR -#define __WCHAR_T -#define _WCHAR_T_ -#define _BSD_WCHAR_T_ -#define _WCHAR_T_DEFINED_ -#define _WCHAR_T_DEFINED -#define _WCHAR_T_H -#define ___int_wchar_t_h -#define __INT_WCHAR_T_H -#define _GCC_WCHAR_T - -/* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_ - instead of _WCHAR_T_, and _BSD_RUNE_T_ (which, unlike the other - symbols in the _FOO_T_ family, stays defined even after its - corresponding type is defined). If we define wchar_t, then we - must undef _WCHAR_T_; for BSD/386 1.1 (and perhaps others), if - we undef _WCHAR_T_, then we must also define rune_t, since - headers like runetype.h assume that if machine/ansi.h is included, - and _BSD_WCHAR_T_ is not defined, then rune_t is available. - machine/ansi.h says, "Note that _WCHAR_T_ and _RUNE_T_ must be of - the same type." */ -#ifdef _BSD_WCHAR_T_ -#undef _BSD_WCHAR_T_ -#ifdef _BSD_RUNE_T_ -#if !defined (_ANSI_SOURCE) && !defined (_POSIX_SOURCE) -typedef _BSD_RUNE_T_ rune_t; -#endif -#endif -#endif - -#ifndef __WCHAR_TYPE__ -#define __WCHAR_TYPE__ int -#endif -#ifndef __cplusplus -typedef __WCHAR_TYPE__ wchar_t; -#endif -#endif -#endif -#endif -#endif -#endif -#endif -#endif -#endif -#endif -#endif -#endif -#endif -#undef __need_wchar_t -#endif /* _STDDEF_H or __need_wchar_t. */ - -#if defined (_STDDEF_H) || defined (__need_wint_t) -#ifndef _WINT_T -#define _WINT_T - -#ifndef __WINT_TYPE__ -#define __WINT_TYPE__ unsigned int -#endif -typedef __WINT_TYPE__ wint_t; -#endif -#undef __need_wint_t -#endif - -/* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. - are already defined. */ -#ifdef _ANSI_H_ -/* The references to _GCC_PTRDIFF_T_, _GCC_SIZE_T_, and _GCC_WCHAR_T_ - are probably typos and should be removed before 2.8 is released. */ -#ifdef _GCC_PTRDIFF_T_ -#undef _PTRDIFF_T_ -#undef _BSD_PTRDIFF_T_ -#endif -#ifdef _GCC_SIZE_T_ -#undef _SIZE_T_ -#undef _BSD_SIZE_T_ -#endif -#ifdef _GCC_WCHAR_T_ -#undef _WCHAR_T_ -#undef _BSD_WCHAR_T_ -#endif -/* The following ones are the real ones. */ -#ifdef _GCC_PTRDIFF_T -#undef _PTRDIFF_T_ -#undef _BSD_PTRDIFF_T_ -#endif -#ifdef _GCC_SIZE_T -#undef _SIZE_T_ -#undef _BSD_SIZE_T_ -#endif -#ifdef _GCC_WCHAR_T -#undef _WCHAR_T_ -#undef _BSD_WCHAR_T_ -#endif -#endif /* _ANSI_H_ */ - -#endif /* __sys_stdtypes_h */ - -/* A null pointer constant. */ - -#if defined (_STDDEF_H) || defined (__need_NULL) -#undef NULL /* in case has defined it. */ -#ifdef __GNUG__ -#define NULL (__null) -#else /* G++ */ -#define NULL (0) -#endif /* G++ */ -#endif /* NULL not defined and or need NULL. */ -#undef __need_NULL - -#ifdef _STDDEF_H - -/* Offset of member MEMBER in a struct of type TYPE. */ - -#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) - -#endif /* _STDDEF_H was defined this time */ - -#endif /* !_STDDEF_H && !_STDDEF_H_ && !_ANSI_STDDEF_H && !__STDDEF_H__ - || __need_XXX was not defined before */ diff --git a/import/OpenXDK/include/glibc/stdio.h b/import/OpenXDK/include/glibc/stdio.h deleted file mode 100644 index a7fde5d14..000000000 --- a/import/OpenXDK/include/glibc/stdio.h +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef __STDIO_H__ -#define __STDIO_H__ 1 - - -# ifdef __cplusplus -extern "C" { -# endif - -#include - -//int sprintf(char*, const char *format, ...); -int __cdecl sprintf(char *, const char *, ...); - -//#include -#include -#include - - -#define _O_RDONLY (0x00000001) -#define _O_WRONLY (0x00000002) -#define _O_RDWR (0x00000003) -#define _O_NBLOCK (0x00000010) -#define _O_APPEND (0x00000100) -#define _O_CREAT (0x00000200) -#define _O_TRUNC (0x00000400) -#define _O_EXCL (0x00000800) -#define _O_TEMPORARY (0x00001000) -#define _O_TEXT (0x00004000) -#define _O_BINARY (0x00008000) - -#define O_RDONLY _O_RDONLY -#define O_WRONLY _O_WRONLY -#define O_RDWR _O_RDWR -#define O_NBLOCK _O_NBLOCK -#define O_APPEND _O_APPEND -#define O_CREAT _O_CREAT -#define O_EXCL _O_EXCL -#define O_TRUNC _O_TRUNC -#define O_TEMPORARY _O_TEMPORARY -#define O_TEXT _O_TEXT -#define O_BINARY _O_BINARY - - -#define SEEK_SET 0 -#define SEEK_CUR 1 -#define SEEK_END 2 - -extern u32 LastErrorCode; - -int _open( char *filename, int oflag, int permission ); -int _read( int handle, void *buffer, unsigned int count ); -int _write( int handle, void* buffer, unsigned int count ); -int _close( int handle ); -int _lseek( int handle, u32 offset, int base ); - -int nprintf(const char *format, ...); -int printf(const char *format, ...); -//int sprintf(char*, const char *format, ...); - - -# ifdef __cplusplus -} -# endif - -#endif // __STDIO_H__ - - - diff --git a/import/OpenXDK/include/glibc/stdlib.h b/import/OpenXDK/include/glibc/stdlib.h deleted file mode 100644 index a45d988ca..000000000 --- a/import/OpenXDK/include/glibc/stdlib.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * - * ANSI-C Standard Library definitions - */ -#define __IEEE_FLOAT 1 // BIGBOY - - -#ifndef _STDLIB_H -#define _STDLIB_H -# ifdef __cplusplus -extern "C" { -# endif - /* note: no !defined(__STDC__) handling, deliberately */ -#include - -#ifndef _STDDEF_H -#include /* get size_t, NULL */ -#endif - - -char *itoa(int i, char* string, int radix); - -/* - These exit macro values work with either exit() or return from main(), - and avoid unnecessary warnings from the DCL command intrepretor. They - don't match VAX C's , which has 0 and 2 respectively. Using 0 - for success works with VAXCRTL's exit() but requires additional compiler - support in main() (which VAX C neglects to provide). 2 always provokes - "%NONAME-E-NOMSG, Message number 00000002"; similarly for unfixed 0. - */ -#define EXIT_SUCCESS 1 /* SS$_NORMAL, STS$K_SUCCESS */ -#define EXIT_FAILURE 0x10000002 /* (STS$K_ERROR | STS$M_INHIB_MSG) */ - -#define RAND_MAX 2147483647 /* 0x7FFFFFFF */ -#define lrand48() rand() - -#if (__GNUC__ == 2 && !__STRICT_ANSI__) -#if (__GNUC_MINOR__ >= 5) -void abort(void) __asm ("decc$abort") __attribute__((noreturn)); -void exit(int) __asm ("decc$exit") __attribute__((noreturn)); -void _exit(int) __attribute__((noreturn)); -#else -volatile void abort(void) __asm ("decc$abort"); -volatile void exit(int) __asm ("decc$exit"); -volatile void _exit(int); -#endif -#else -void abort(void); -void exit(int i); -void _exit(int i); -#endif -int atexit(void (*)(void)); - -void *bsearch(const void *,const void *,size_t,size_t, - int (*)(const void *,const void *)); - -void qsort(void *,size_t,size_t,int (*)(const void *,const void *)); // __asm ("decc$qsort"); - -int rand(void); -int srand(int); /* routine to initialize rand() */ - -/* These are the functions that actually do things. The `random', `srandom', - `initstate' and `setstate' functions are those from BSD Unices. - The `rand' and `srand' functions are required by the ANSI standard. - We provide both interfaces to the same random number generator. */ -/* Return a random long integer between 0 and RAND_MAX inclusive. */ -extern long int __random (void); -/* Seed the random number generator with the given number. */ -extern void __srandom (unsigned int __seed); - - -char *getenv(const char *); // __asm ("decc$getenv"); -int system(const char *); - -/* math related routines */ -#ifndef _DIV_T -#define _DIV_T -typedef struct DIV_T { int quot, rem; } div_t; -#endif -#ifndef _LDIV_T -#define _LDIV_T -typedef struct LDIV_T { long quot, rem; } ldiv_t; -#endif - -# define ___fdecl(_func,_arglist) -#if __IEEE_FLOAT -# define ___gdecl(_func, _arglist) _func _arglist { __asm{ nop } } -#elif __G_FLOAT -# define ___gdecl(_func, _arglist) _func _arglist __asm("decc$g" #_func) -#else -# error "No floating format defined" -#endif - -int abs(int); -int atoi (const char *i); -long atol(const char * i); -double atof(const char * i); -div_t div(int i,int i2); -long labs(long); -ldiv_t ldiv(long,long); -double strtod(const char *i,char **i2); -long strtol(const char *i,char **i2,int i3); -unsigned long strtoul(const char *i,char **i2,int i3); - -/* memory manipulation routines; note: cfree() is gone; see also */ -void* malloc (size_t i); -void* calloc (size_t i, size_t i2); -void* realloc (void *i, size_t i2); -void free (void * i); - -#undef ___gdecl -#undef ___fdecl - -# ifdef __cplusplus -} -# endif -#endif /*_STDLIB_H*/ diff --git a/import/OpenXDK/include/glibc/string.h b/import/OpenXDK/include/glibc/string.h deleted file mode 100644 index 718c690e3..000000000 --- a/import/OpenXDK/include/glibc/string.h +++ /dev/null @@ -1,193 +0,0 @@ -/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -/* - * ANSI Standard: 4.11 STRING HANDLING - */ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#ifndef _STRING_H - -#define _STRING_H 1 -#include - -/* Get size_t and NULL from . */ -#define __need_ptrdiff_t -#define __need_size_t -#define __need_NULL -#include - - -/* Copy N bytes of SRC to DEST. */ -extern __ptr_t memcpy __P ((__ptr_t __dest, __const __ptr_t __src, - size_t __n)); -/* Copy N bytes of SRC to DEST, guaranteeing - correct behavior for overlapping strings. */ -extern __ptr_t memmove __P ((__ptr_t __dest, __const __ptr_t __src, - size_t __n)); - -/* Copy no more than N bytes of SRC to DEST, stopping when C is found. - Return the position in DEST one byte past where C was copied, - or NULL if C was not found in the first N bytes of SRC. */ -extern __ptr_t __memccpy __P ((__ptr_t __dest, __const __ptr_t __src, - int __c, size_t __n)); -#if defined (__USE_SVID) || defined (__USE_BSD) -extern __ptr_t memccpy __P ((__ptr_t __dest, __const __ptr_t __src, - int __c, size_t __n)); -#ifdef __OPTIMIZE__ -#define memccpy(dest, src, c, n) __memccpy((dest), (src), (c), (n)) -#endif /* Optimizing. */ -#endif /* SVID. */ - - -/* Set N bytes of S to C. */ -extern __ptr_t memset __P ((__ptr_t __s, int __c, size_t __n)); - -/* Compare N bytes of S1 and S2. */ -extern int memcmp __P ((__const __ptr_t __s1, __const __ptr_t __s2, - size_t __n)); - -/* Search N bytes of S for C. */ -extern __ptr_t memchr __P ((__const __ptr_t __s, int __c, size_t __n)); - - -/* Copy SRC to DEST. */ -extern char *strcpy __P ((char *__dest, __const char *__src)); -/* Copy no more than N characters of SRC to DEST. */ -extern char *strncpy __P ((char *__dest, __const char *__src, size_t __n)); - -/* Append SRC onto DEST. */ -extern char *strcat __P ((char *__dest, __const char *__src)); -/* Append no more than N characters from SRC onto DEST. */ -extern char *strncat __P ((char *__dest, __const char *__src, size_t __n)); - -/* Compare S1 and S2. */ -extern int strcmp __P ((__const char *__s1, __const char *__s2)); -/* Compare N characters of S1 and S2. */ -extern int strncmp __P ((__const char *__s1, __const char *__s2, size_t __n)); - -/* Compare the collated forms of S1 and S2. */ -extern int strcoll __P ((__const char *__s1, __const char *__s2)); -/* Put a transformation of SRC into no more than N bytes of DEST. */ -extern size_t strxfrm __P ((char *__dest, __const char *__src, size_t __n)); - -#if defined (__USE_SVID) || defined (__USE_BSD) -/* Duplicate S, returning an identical malloc'd string. */ -extern char *strdup __P ((__const char *__s)); -#endif - -/* Find the first occurrence of C in S. */ -extern char *strchr __P ((__const char *__s, int __c)); -/* Find the last occurrence of C in S. */ -extern char *strrchr __P ((__const char *__s, int __c)); - -/* Return the length of the initial segment of S which - consists entirely of characters not in REJECT. */ -extern size_t strcspn __P ((__const char *__s, __const char *__reject)); -/* Return the length of the initial segment of S which - consists entirely of characters in ACCEPT. */ -extern size_t strspn __P ((__const char *__s, __const char *__accept)); -/* Find the first occurence in S of any character in ACCEPT. */ -extern char *strpbrk __P ((__const char *__s, __const char *__accept)); -/* Find the first occurence of NEEDLE in HAYSTACK. */ -extern char *strstr __P ((__const char *__haystack, __const char *__needle)); - -/* Divide S into tokens separated by characters in DELIM. */ -extern char *strtok __P ((char *__s, __const char *__delim)); - -#ifdef __USE_GNU -/* Find the first occurence of NEEDLE in HAYSTACK. - NEEDLE is NEEDLELEN bytes long; - HAYSTACK is HAYSTACKLEN bytes long. */ -extern __ptr_t memmem __P ((__const __ptr_t __haystack, size_t __haystacklen, - __const __ptr_t __needle, size_t __needlelen)); -#endif - -/* Return the length of S. */ -extern size_t strlen __P ((__const char *__s)); - -/* Return a string describing the meaning of the errno code in ERRNUM. */ -extern char *strerror __P ((int __errnum)); - -#ifdef __USE_BSD -/* Find the first occurrence of C in S (same as strchr). */ -extern char *index __P ((__const char *__s, int __c)); - -/* Find the last occurrence of C in S (same as strrchr). */ -extern char *rindex __P ((__const char *__s, int __c)); - -/* Copy N bytes of SRC to DEST (like memmove, but args reversed). */ -extern void bcopy __P ((__const __ptr_t __src, __ptr_t __dest, size_t __n)); - -/* Set N bytes of S to 0. */ -extern void bzero __P ((__ptr_t __s, size_t __n)); - -/* Compare N bytes of S1 and S2 (same as memcmp). */ -extern int bcmp __P ((__const __ptr_t __s1, __const __ptr_t __s2, size_t __n)); - -/* Return the position of the first bit set in I, or 0 if none are set. - The least-significant bit is position 1, the most-significant 32. */ -extern int ffs __P ((int __i)); - -/* Compare S1 and S2, ignoring case. */ -extern int strcasecmp __P ((__const char *__s1, __const char *__s2)); - -/* Return the next DELIM-delimited token from *STRINGP, - terminating it with a '\0', and update *STRINGP to point past it. */ -extern char *strsep __P ((char **__stringp, __const char *__delim)); -#endif - -/* Copy no more than N characters of SRC to DEST, returning the address of - the last character written into DEST. */ -extern char *__stpncpy __P ((char *__dest, __const char *__src, size_t __n)); - -#ifdef __USE_GNU -/* Compare no more than N chars of S1 and S2, ignoring case. */ -extern int strncasecmp __P ((__const char *__s1, __const char *__s2, - size_t __n)); - -/* Return a string describing the meaning of the signal number in SIG. */ -extern char *strsignal __P ((int __sig)); - -/* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */ -extern char *stpcpy __P ((char *__dest, __const char *__src)); - -/* Copy no more than N characters of SRC to DEST, returning the address of - the last character written into DEST. */ -extern char *stpncpy __P ((char *__dest, __const char *__src, size_t __n)); - -#ifdef __OPTIMIZE__ -#define stpncpy(dest, src, n) __stpncpy ((dest), (src), (n)) -#endif - -/* Sautee STRING briskly. */ -extern char *strfry __P ((char *__string)); - -/* Frobnicate N bytes of S. */ -extern __ptr_t memfrob __P ((__ptr_t __s, size_t __n)); -#endif - - -#endif /* string.h */ -#ifdef __cplusplus -}; -#endif diff --git a/import/OpenXDK/include/glibc/string/endian.h b/import/OpenXDK/include/glibc/string/endian.h deleted file mode 100644 index 9491952e7..000000000 --- a/import/OpenXDK/include/glibc/string/endian.h +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright (C) 1992, 1996, 1997, 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _ENDIAN_H -#define _ENDIAN_H 1 - -#include - -/* Definitions for byte order, according to significance of bytes, - from low addresses to high addresses. The value is what you get by - putting '4' in the most significant byte, '3' in the second most - significant byte, '2' in the second least significant byte, and '1' - in the least significant byte, and then writing down one digit for - each byte, starting with the byte at the lowest address at the left, - and proceeding to the byte with the highest address at the right. */ - -#define __LITTLE_ENDIAN 1234 -#define __BIG_ENDIAN 4321 -#define __PDP_ENDIAN 3412 - -/* This file defines `__BYTE_ORDER' for the particular machine. */ -#include - -/* Some machines may need to use a different endianness for floating point - values. */ -#ifndef __FLOAT_WORD_ORDER -# define __FLOAT_WORD_ORDER __BYTE_ORDER -#endif - -#ifdef __USE_BSD -# define LITTLE_ENDIAN __LITTLE_ENDIAN -# define BIG_ENDIAN __BIG_ENDIAN -# define PDP_ENDIAN __PDP_ENDIAN -# define BYTE_ORDER __BYTE_ORDER -#endif - -#if __BYTE_ORDER == __LITTLE_ENDIAN -# define __LONG_LONG_PAIR(HI, LO) LO, HI -#elif __BYTE_ORDER == __BIG_ENDIAN -# define __LONG_LONG_PAIR(HI, LO) HI, LO -#endif - -#endif /* endian.h */ diff --git a/import/OpenXDK/include/glibc/sys/cdefs.h b/import/OpenXDK/include/glibc/sys/cdefs.h deleted file mode 100644 index 4a191a5d9..000000000 --- a/import/OpenXDK/include/glibc/sys/cdefs.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/import/OpenXDK/include/glibc/sys/djtypes.h b/import/OpenXDK/include/glibc/sys/djtypes.h deleted file mode 100644 index 028934953..000000000 --- a/import/OpenXDK/include/glibc/sys/djtypes.h +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#ifndef __DJ_sys_djtypes_h_ -#define __DJ_sys_djtypes_h_ - -#define __DJ_clock_t typedef int clock_t; -#define __DJ_gid_t typedef int gid_t; -#define __DJ_off_t typedef int off_t; -#define __DJ_pid_t typedef int pid_t; -#define __DJ_size_t typedef long unsigned int size_t; -#define __DJ_ssize_t typedef int ssize_t; -#define __DJ_time_t typedef unsigned int time_t; -#define __DJ_uid_t typedef int uid_t; -#define __DJ_va_list typedef void *va_list; -#define __DJ_wchar_t typedef int wchar_t; - -#endif diff --git a/import/OpenXDK/include/openxdk.h b/import/OpenXDK/include/openxdk.h deleted file mode 100644 index 844f16b1d..000000000 --- a/import/OpenXDK/include/openxdk.h +++ /dev/null @@ -1,85 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : openxdk.h -// * -// * note : Welcome To Heaven -// * -// ****************************************************************** -#ifndef OPENXDK_H -#define OPENXDK_H - -// ****************************************************************** -// * OpenXDK Version Number -// ****************************************************************** -#define OPENXDK_VERSION "0.1.0-Pre1" - -// ****************************************************************** -// * OpenXDK Full Title -// ****************************************************************** -#define OPENXDK_TITLE "OpenXDK " OPENXDK_VERSION - -// ****************************************************************** -// * Humor caustik with some of his favorite typedefs -// ****************************************************************** -typedef signed int sint; -typedef unsigned int uint; - -typedef char int08; -typedef short int16; -typedef long int32; - -typedef unsigned char uint08; -typedef unsigned short uint16; -typedef unsigned long uint32; - -typedef signed char sint08; -typedef signed short sint16; -typedef signed long sint32; - -// ****************************************************************** -// * Humor Bigboy with some of his favorite typedefs :) -// ****************************************************************** -typedef unsigned char byte; -typedef unsigned char u8; -typedef signed char s8; -typedef unsigned short u16; -typedef signed short s16; -typedef unsigned int u32; -typedef signed int s32; - -// ****************************************************************** -// * XBox Kernel -// ****************************************************************** -#include "xboxkrnl/xboxkrnl.h" - -// ****************************************************************** -// * XHal -// ****************************************************************** -#include "xhal/xhal.h" - -// ****************************************************************** -// * XVGA -// ****************************************************************** -#include "xvga/xvga.h" - -// ****************************************************************** -// * XUSB (being removed...) -// ****************************************************************** -//#include "xusb/xusb.h" - -// ****************************************************************** -// * XINPUT (Gamepad Support) -// ****************************************************************** -//#include "xinput/xinput.h" - - - -#endif - - - - diff --git a/import/OpenXDK/include/xboxkrnl/dbg.h b/import/OpenXDK/include/xboxkrnl/dbg.h deleted file mode 100644 index ded5e242f..000000000 --- a/import/OpenXDK/include/xboxkrnl/dbg.h +++ /dev/null @@ -1,26 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : dbg.h -// * -// * note : XBox Kernel *Debug* Declarations -// * -// ****************************************************************** -#ifndef XBOXKRNL_DBG_H -#define XBOXKRNL_DBG_H - -XBSYSAPI VOID *DbgBreakPoint; -XBSYSAPI VOID *DbgBreakPointWithStatus; -XBSYSAPI VOID *DbgLoadImageSymbols; -XBSYSAPI VOID *DbgPrint; -XBSYSAPI VOID *DbgPrompt; -XBSYSAPI VOID *DbgUnLoadImageSymbols; - -#endif - - - - diff --git a/import/OpenXDK/include/xboxkrnl/ex.h b/import/OpenXDK/include/xboxkrnl/ex.h deleted file mode 100644 index ca67af22f..000000000 --- a/import/OpenXDK/include/xboxkrnl/ex.h +++ /dev/null @@ -1,108 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : ex.h -// * -// * note : XBox Kernel *Executive* Declarations -// * -// ****************************************************************** -#ifndef XBOXKRNL_EX_H -#define XBOXKRNL_EX_H - -XBSYSAPI VOID *ExAcquireReadWriteLockExclusive; -XBSYSAPI VOID *ExAcquireReadWriteLockShared; - -// ****************************************************************** -// * ExAllocatePool -// ****************************************************************** -// * -// * Allocates pool memory -// * -// ****************************************************************** -XBSYSAPI EXPORTNUM(14) PVOID NTAPI ExAllocatePool -( - IN ULONG NumberOfBytes -); - -// ****************************************************************** -// * ExAllocatePoolWithTag -// ****************************************************************** -// * -// * Allocates pool memory with a tag -// * -// ****************************************************************** -XBSYSAPI EXPORTNUM(15) PVOID NTAPI ExAllocatePoolWithTag -( - IN SIZE_T NumberOfBytes, - IN ULONG Tag -); - -XBSYSAPI VOID *ExEventObjectType; - -// ****************************************************************** -// * ExFreePool -// ****************************************************************** -// * -// * Deallocates a block of pool memory -// * -// ****************************************************************** -XBSYSAPI EXPORTNUM(17) PVOID NTAPI ExFreePool -( - IN PVOID P -); - -XBSYSAPI VOID *ExInitializeReadWriteLock; -XBSYSAPI VOID *ExInterlockedAddLargeInteger; -XBSYSAPI VOID *ExInterlockedAddLargeStatistic; -XBSYSAPI VOID *ExInterlockedCompareExchange64; -XBSYSAPI VOID *ExMutantObjectType; -XBSYSAPI VOID *ExQueryPoolBlockSize; - -// ****************************************************************** -// * ExQueryNonVolatileSetting -// ****************************************************************** -XBSYSAPI EXPORTNUM(24) NTSTATUS NTAPI ExQueryNonVolatileSetting -( - IN DWORD ValueIndex, - OUT DWORD *Type, - OUT PUCHAR Value, - IN SIZE_T ValueLength, - OUT PSIZE_T ResultLength OPTIONAL -); - -XBSYSAPI VOID *ExReadWriteRefurbInfo; -XBSYSAPI VOID *ExRaiseException; -XBSYSAPI VOID *ExRaiseStatus; -XBSYSAPI VOID *ExReleaseReadWriteLock; - -// ****************************************************************** -// * ExSaveNonVolatileSetting -// ****************************************************************** -XBSYSAPI EXPORTNUM(29) NTSTATUS NTAPI ExSaveNonVolatileSetting -( - IN DWORD ValueIndex, - OUT DWORD *Type, - IN PUCHAR Value, - IN SIZE_T ValueLength -); - -XBSYSAPI VOID *ExSemaphoreObjectType; -XBSYSAPI VOID *ExTimerObjectType; -XBSYSAPI VOID *ExfInterlockedInsertHeadList; -XBSYSAPI VOID *ExfInterlockedInsertTailList; -XBSYSAPI VOID *ExfInterlockedRemoveHeadList; -XBSYSAPI VOID *InterlockedCompareExchange; -XBSYSAPI VOID *InterlockedDecrement; -XBSYSAPI VOID *InterlockedIncrement; -XBSYSAPI VOID *InterlockedExchange; -XBSYSAPI VOID *InterlockedExchangeAdd; -XBSYSAPI VOID *InterlockedFlushSList; -XBSYSAPI VOID *InterlockedPopEntrySList; -XBSYSAPI VOID *InterlockedPushEntrySList; - -#endif - - diff --git a/import/OpenXDK/include/xboxkrnl/hal.h b/import/OpenXDK/include/xboxkrnl/hal.h deleted file mode 100644 index 67baa80f0..000000000 --- a/import/OpenXDK/include/xboxkrnl/hal.h +++ /dev/null @@ -1,148 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : hal.h -// * -// * note : XBox Kernel *Hardware Abstraction Layer* Declarations -// * -// ****************************************************************** -#ifndef XBOXKRNL_HAL_H -#define XBOXKRNL_HAL_H - -XBSYSAPI VOID *HalReadSMCTrayState; -XBSYSAPI VOID *HalClearSoftwareInterrupt; -XBSYSAPI VOID *HalDisableSystemInterrupt; -XBSYSAPI VOID *HalDiskCachePartitionCount; -XBSYSAPI VOID *HalDiskModelNumber; -XBSYSAPI VOID *HalDiskSerialNumber; -XBSYSAPI VOID *HalEnableSystemInterrupt; -XBSYSAPI VOID *HalGetInterruptVector; - -// ****************************************************************** -// * HalReadSMBusValue -// ****************************************************************** -XBSYSAPI EXPORTNUM(45) VOID NTAPI HalReadSMBusValue -( - ULONG BusNumber, - ULONG SlotNumber, - ULONG RegisterNumber, - PVOID Buffer, - ULONG Length, - BOOLEAN WritePCISpace -); - -// ****************************************************************** -// * HalReadWritePCISpace -// ****************************************************************** -XBSYSAPI EXPORTNUM(46) VOID NTAPI HalReadWritePCISpace -( - IN ULONG BusNumber, - IN ULONG SlotNumber, - IN ULONG RegisterNumber, - IN PVOID Buffer, - IN ULONG Length, - IN BOOLEAN WritePCISpace -); - -XBSYSAPI VOID *HalRegisterShutdownNotification; -XBSYSAPI VOID *HalRequestSoftwareInterrupt; - -// ****************************************************************** -// * HalReturnToFirmware -// ****************************************************************** -// * -// * Reboot / Shutdown / Etc -// * -// ****************************************************************** -XBSYSAPI EXPORTNUM(49) VOID DECLSPEC_NORETURN HalReturnToFirmware -( - RETURN_FIRMWARE Routine -); - -// ****************************************************************** -// * HalWriteSMBusValue -// ****************************************************************** -XBSYSAPI EXPORTNUM(50) ULONG NTAPI HalWriteSMBusValue -( - UCHAR Address, - UCHAR Command, - BOOLEAN WordFlag, - ULONG Value -); - -// ****************************************************************** -// * HalBootSMCVideoMode -// ****************************************************************** -XBSYSAPI EXPORTNUM(356) DWORD HalBootSMCVideoMode; - -XBSYSAPI VOID *HalIsResetOrShutdownPending; -XBSYSAPI VOID *HalInitiateShutdown; -XBSYSAPI VOID *HalEnableSecureTrayEject; -XBSYSAPI VOID *HalWriteSMCScratchRegister; - -// ****************************************************************** -// * READ_PORT_BUFFER_UCHAR -// ****************************************************************** -XBSYSAPI EXPORTNUM(329) VOID NTAPI READ_PORT_BUFFER_UCHAR -( - IN PUCHAR Port, - IN PUCHAR Buffer, - IN ULONG Count -); - -// ****************************************************************** -// * READ_PORT_BUFFER_USHORT -// ****************************************************************** -XBSYSAPI EXPORTNUM(330) VOID NTAPI READ_PORT_BUFFER_USHORT -( - IN PUSHORT Port, - IN PUSHORT Buffer, - IN ULONG Count -); - -// ****************************************************************** -// * READ_PORT_BUFFER_ULONG -// ****************************************************************** -XBSYSAPI EXPORTNUM(331) VOID NTAPI READ_PORT_BUFFER_ULONG -( - IN PULONG Port, - IN PULONG Buffer, - IN ULONG Count -); - -// ****************************************************************** -// * WRITE_PORT_BUFFER_UCHAR -// ****************************************************************** -XBSYSAPI EXPORTNUM(332) VOID NTAPI WRITE_PORT_BUFFER_UCHAR -( - IN PUCHAR Port, - IN PUCHAR Buffer, - IN ULONG Count -); - -// ****************************************************************** -// * WRITE_PORT_BUFFER_USHORT -// ****************************************************************** -XBSYSAPI EXPORTNUM(333) VOID NTAPI WRITE_PORT_BUFFER_USHORT -( - IN PUSHORT Port, - IN PUSHORT Buffer, - IN ULONG Count -); - -// ****************************************************************** -// * WRITE_PORT_BUFFER_ULONG -// ****************************************************************** -XBSYSAPI EXPORTNUM(334) VOID NTAPI WRITE_PORT_BUFFER_ULONG -( - IN PULONG Port, - IN PULONG Buffer, - IN ULONG Count -); - -#endif - - diff --git a/import/OpenXDK/include/xboxkrnl/io.h b/import/OpenXDK/include/xboxkrnl/io.h deleted file mode 100644 index a342a8ca2..000000000 --- a/import/OpenXDK/include/xboxkrnl/io.h +++ /dev/null @@ -1,83 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : io.h -// * -// * note : XBox Kernel *I/O Manager* Declarations -// * -// ****************************************************************** -#ifndef XBOXKRNL_IO_H -#define XBOXKRNL_IO_H - -XBSYSAPI VOID *IoAllocateIrp; -XBSYSAPI VOID *IoBuildAsynchronousFsdRequest; -XBSYSAPI VOID *IoBuildDeviceIoControlRequest; -XBSYSAPI VOID *IoBuildSynchronousFsdRequest; -XBSYSAPI VOID *IoCheckShareAccess; -XBSYSAPI VOID *IoCompletionObjectType; -XBSYSAPI VOID *IoCreateDevice; - -// ****************************************************************** -// * IoCreateFile -// ****************************************************************** -XBSYSAPI EXPORTNUM(66) NTSTATUS NTAPI IoCreateFile -( - OUT PHANDLE FileHandle, - IN ACCESS_MASK DesiredAccess, - IN POBJECT_ATTRIBUTES ObjectAttributes, - OUT PIO_STATUS_BLOCK IoStatusBlock, - IN PLARGE_INTEGER AllocationSize, - IN ULONG FileAttributes, - IN ULONG ShareAccess, - IN ULONG Disposition, - IN ULONG CreateOptions, - IN ULONG Options -); - -// ****************************************************************** -// * IoCreateSymbolicLink -// ****************************************************************** -XBSYSAPI EXPORTNUM(67) NTSTATUS NTAPI IoCreateSymbolicLink -( - IN PSTRING SymbolicLinkName, - IN PSTRING DeviceName -); - -XBSYSAPI VOID *IoDeleteDevice; - -// ****************************************************************** -// * IoDeleteSymbolicLink -// ****************************************************************** -XBSYSAPI EXPORTNUM(69) NTSTATUS NTAPI IoDeleteSymbolicLink -( - IN PSTRING SymbolicLinkName -); - -XBSYSAPI VOID *IoDeviceObjectType; -XBSYSAPI VOID *IoFileObjectType; -XBSYSAPI VOID *IoFreeIrp; -XBSYSAPI VOID *IoInitializeIrp; -XBSYSAPI VOID *IoInvalidDeviceRequest; -XBSYSAPI VOID *IoQueryFileInformation; -XBSYSAPI VOID *IoQueryVolumeInformation; -XBSYSAPI VOID *IoQueueThreadIrp; -XBSYSAPI VOID *IoRemoveShareAccess; -XBSYSAPI VOID *IoSetIoCompletion; -XBSYSAPI VOID *IoSetShareAccess; -XBSYSAPI VOID *IoStartNextPacket; -XBSYSAPI VOID *IoStartNextPacketByKey; -XBSYSAPI VOID *IoStartPacket; -XBSYSAPI VOID *IoSynchronousDeviceIoControlRequest; -XBSYSAPI VOID *IoSynchronousFsdRequest; -XBSYSAPI VOID *IofCallDriver; -XBSYSAPI VOID *IofCompleteRequest; -XBSYSAPI VOID *IoDismountVolume; -XBSYSAPI VOID *IoDismountVolumeByName; -XBSYSAPI VOID *IoMarkIrpMustComplete; - -#endif - - diff --git a/import/OpenXDK/include/xboxkrnl/kernel.h b/import/OpenXDK/include/xboxkrnl/kernel.h deleted file mode 100644 index 742064322..000000000 --- a/import/OpenXDK/include/xboxkrnl/kernel.h +++ /dev/null @@ -1,179 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : kernel.h -// * -// * note : XBox Kernel Declarations -// * -// ****************************************************************** -#ifndef KERNEL_H -#define KERNEL_H - -XBSYSAPI VOID *KeAlertResumeThread; -XBSYSAPI VOID *KeAlertThread; -XBSYSAPI VOID *KeBoostPriorityThread; -XBSYSAPI VOID *KeBugCheck; -XBSYSAPI VOID *KeBugCheckEx; -XBSYSAPI VOID *KeCancelTimer; -XBSYSAPI VOID *KeConnectInterrupt; - -// ****************************************************************** -// * KeDelayExecutionThread -// ****************************************************************** -XBSYSAPI EXPORTNUM(99) NTSTATUS NTAPI KeDelayExecutionThread -( - IN KPROCESSOR_MODE WaitMode, - IN BOOLEAN Alertable, - IN PLARGE_INTEGER Interval -); - -XBSYSAPI VOID *KeDisconnectInterrupt; -XBSYSAPI VOID *KeEnterCriticalRegion; -XBSYSAPI VOID *KeGetCurrentIrql; - -// ****************************************************************** -// * KeGetCurrentThread -// ****************************************************************** -XBSYSAPI VOID *KeGetCurrentThread; - -XBSYSAPI VOID *KeInitializeApc; -XBSYSAPI VOID *KeInitializeDeviceQueue; - -// ****************************************************************** -// * KeInitializeDpc -// ****************************************************************** -XBSYSAPI EXPORTNUM(107) VOID NTAPI KeInitializeDpc -( - KDPC *Dpc, - PKDEFERRED_ROUTINE DeferredRoutine, - PVOID DeferredContext -); - -XBSYSAPI VOID *KeInitializeEvent; -XBSYSAPI VOID *KeInitializeInterrupt; -XBSYSAPI VOID *KeInitializeMutant; -XBSYSAPI VOID *KeInitializeQueue; -XBSYSAPI VOID *KeInitializeSemaphore; - -// ****************************************************************** -// * KeInitializeTimerEx -// ****************************************************************** -XBSYSAPI EXPORTNUM(113) VOID NTAPI KeInitializeTimerEx -( - IN PKTIMER Timer, - IN TIMER_TYPE Type -); - -XBSYSAPI VOID *KeInsertByKeyDeviceQueue; -XBSYSAPI VOID *KeInsertDeviceQueue; -XBSYSAPI VOID *KeInsertHeadQueue; -XBSYSAPI VOID *KeInsertQueue; -XBSYSAPI VOID *KeInsertQueueApc; -XBSYSAPI VOID *KeInsertQueueDpc; -XBSYSAPI VOID *KeInterruptTime; -XBSYSAPI VOID *KeIsExecutingDpc; -XBSYSAPI VOID *KeLeaveCriticalRegion; -XBSYSAPI VOID *KePulseEvent; -XBSYSAPI VOID *KeQueryBasePriorityThread; -XBSYSAPI VOID *KeQueryInterruptTime; - -// ****************************************************************** -// * KeQueryPerformanceCounter -// ****************************************************************** -XBSYSAPI EXPORTNUM(126) ULONGLONG NTAPI KeQueryPerformanceCounter(); - -// ****************************************************************** -// * KeQueryPerformanceFrequency -// ****************************************************************** -XBSYSAPI EXPORTNUM(127) ULONGLONG NTAPI KeQueryPerformanceFrequency(); - -// ****************************************************************** -// * KeQuerySystemTime -// ****************************************************************** -XBSYSAPI EXPORTNUM(128) VOID NTAPI KeQuerySystemTime -( - PLARGE_INTEGER CurrentTime -); - -// ****************************************************************** -// * KeRaiseIrqlToDpcLevel -// ****************************************************************** -XBSYSAPI EXPORTNUM(129) UCHAR NTAPI KeRaiseIrqlToDpcLevel( VOID ); - -XBSYSAPI VOID *KeRaiseIrqlToSynchLevel; -XBSYSAPI VOID *KeReleaseMutant; -XBSYSAPI VOID *KeReleaseSemaphore; -XBSYSAPI VOID *KeRemoveByKeyDeviceQueue; -XBSYSAPI VOID *KeRemoveDeviceQueue; -XBSYSAPI VOID *KeRemoveEntryDeviceQueue; -XBSYSAPI VOID *KeRemoveQueue; -XBSYSAPI VOID *KeRemoveQueueDpc; -XBSYSAPI VOID *KeResetEvent; -XBSYSAPI VOID *KeRestoreFloatingPointState; -XBSYSAPI VOID *KeResumeThread; -XBSYSAPI VOID *KeRundownQueue; -XBSYSAPI VOID *KeSaveFloatingPointState; - -//XBSYSAPI VOID *KeSetBasePriorityThread; -XBSYSAPI EXPORTNUM(143) BOOLEAN NTAPI KeSetBasePriorityThread -( - IN PKTHREAD Thread, - IN PVOID Priority -); - - - -XBSYSAPI VOID *KeSetDisableBoostThread; -XBSYSAPI VOID *KeSetEvent; -XBSYSAPI VOID *KeSetEventBoostPriority; -XBSYSAPI VOID *KeSetPriorityProcess; - -//XBSYSAPI VOID *KeSetPriorityThread; -XBSYSAPI EXPORTNUM(148) BOOLEAN NTAPI KeSetPriorityThread -( - IN PKTHREAD Thread, - IN PVOID Priority -); - -// ****************************************************************** -// * KeSetTimer -// ****************************************************************** -XBSYSAPI EXPORTNUM(149) BOOLEAN NTAPI KeSetTimer -( - IN PKTIMER Timer, - IN LARGE_INTEGER DueTime, - IN PKDPC Dpc OPTIONAL -); - -// ****************************************************************** -// * KeSetTimerEx -// ****************************************************************** -XBSYSAPI EXPORTNUM(150) BOOLEAN NTAPI KeSetTimerEx -( - IN PKTIMER Timer, - IN LARGE_INTEGER DueTime, - IN LONG Period OPTIONAL, - IN PKDPC Dpc OPTIONAL -); - -XBSYSAPI VOID *KeStallExecutionProcessor; -XBSYSAPI VOID *KeSuspendThread; -XBSYSAPI VOID *KeSynchronizeExecution; -XBSYSAPI VOID *KeSystemTime; -XBSYSAPI VOID *KeTestAlertThread; - -// ****************************************************************** -// * KeTickCount -// ****************************************************************** -XBSYSAPI EXPORTNUM(156) volatile DWORD KeTickCount; - -XBSYSAPI VOID *KeTimeIncrement; -XBSYSAPI VOID *KeWaitForMultipleObjects; -XBSYSAPI VOID *KeWaitForSingleObject; - -#endif - - diff --git a/import/OpenXDK/include/xboxkrnl/mm.h b/import/OpenXDK/include/xboxkrnl/mm.h deleted file mode 100644 index fa7a67d58..000000000 --- a/import/OpenXDK/include/xboxkrnl/mm.h +++ /dev/null @@ -1,161 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : mm.h -// * -// * note : XBox Kernel *Memory Manager* Declarations -// * -// ****************************************************************** -#ifndef XBOXKRNL_MM_H -#define XBOXKRNL_MM_H - -XBSYSAPI VOID *MmGlobalData; - -// ****************************************************************** -// * MmAllocateContiguousMemory -// ****************************************************************** -// * -// * Allocates a range of physically contiguous, cache-aligned -// * memory from nonpaged pool (main pool on xbox). -// * -// ****************************************************************** -XBSYSAPI EXPORTNUM(165) PVOID NTAPI MmAllocateContiguousMemory -( - IN ULONG NumberOfBytes -); - -// ****************************************************************** -// * MmAllocateContiguousMemoryEx -// ****************************************************************** -XBSYSAPI EXPORTNUM(166) PVOID NTAPI MmAllocateContiguousMemoryEx -( - IN ULONG NumberOfBytes, - IN PHYSICAL_ADDRESS LowestAcceptableAddress, - IN PHYSICAL_ADDRESS HighestAcceptableAddress, - IN ULONG Alignment OPTIONAL, - IN ULONG ProtectionType -); - -// ****************************************************************** -// * MmAllocateSystemMemory -// ****************************************************************** -XBSYSAPI EXPORTNUM(167) PVOID NTAPI MmAllocateSystemMemory -( - ULONG NumberOfBytes, - ULONG Protect -); - -XBSYSAPI VOID *MmClaimGpuInstanceMemory; - -// ****************************************************************** -// * MmCreateKernelStack -// ****************************************************************** -XBSYSAPI EXPORTNUM(169) PVOID NTAPI MmCreateKernelStack -( - BOOLEAN GuiStack -); - -// ****************************************************************** -// * MmDeleteKernelStack -// ****************************************************************** -XBSYSAPI EXPORTNUM(170) VOID NTAPI MmDeleteKernelStack -( - PVOID Stack, - BOOLEAN GuiStack -); - -// ****************************************************************** -// * MmFreeContiguousMemory -// ****************************************************************** -XBSYSAPI EXPORTNUM(171) VOID NTAPI MmFreeContiguousMemory -( - IN PVOID BaseAddress -); - -// ****************************************************************** -// * MmFreeSystemMemory -// ****************************************************************** -XBSYSAPI EXPORTNUM(172) NTSTATUS NTAPI MmFreeSystemMemory -( - PVOID BaseAddress, - ULONG NumberOfBytes -); - -// ****************************************************************** -// * MmGetPhysicalAddress -// ****************************************************************** -XBSYSAPI EXPORTNUM(173) PHYSICAL_ADDRESS NTAPI MmGetPhysicalAddress -( - IN PVOID BaseAddress -); - -XBSYSAPI VOID *MmIsAddressValid; - -//XBSYSAPI VOID *MmLockUnlockBufferPages; -XBSYSAPI EXPORTNUM(175) PHYSICAL_ADDRESS NTAPI MmLockUnlockBufferPages -( - IN PHYSICAL_ADDRESS BaseAddress, - IN ULONG NumberOfBytes, - IN ULONG Protect -); - - -XBSYSAPI VOID *MmLockUnlockPhysicalPage; - -// ****************************************************************** -// * MmMapIoSpace -// ****************************************************************** -XBSYSAPI EXPORTNUM(177) PVOID NTAPI MmMapIoSpace -( - IN PHYSICAL_ADDRESS PhysicalAddress, - IN ULONG NumberOfBytes, - IN ULONG Protect -); - -// ****************************************************************** -// * MmPersistContiguousMemory -// ****************************************************************** -XBSYSAPI EXPORTNUM(178) VOID NTAPI MmPersistContiguousMemory -( - IN PVOID BaseAddress, - IN ULONG NumberOfBytes, - IN BOOLEAN Persist -); - -XBSYSAPI VOID *MmQueryAddressProtect; - -// ****************************************************************** -// * MmQueryAllocationSize -// ****************************************************************** -XBSYSAPI EXPORTNUM(180) ULONG NTAPI MmQueryAllocationSize -( - IN PVOID BaseAddress -); - -// ****************************************************************** -// * MmQueryStatistics -// ****************************************************************** -XBSYSAPI EXPORTNUM(181) NTSTATUS NTAPI MmQueryStatistics -( - OUT PMM_STATISTICS MemoryStatistics -); - -// ****************************************************************** -// * MmSetAddressProtect -// ****************************************************************** -XBSYSAPI EXPORTNUM(182) VOID NTAPI MmSetAddressProtect -( - IN PVOID BaseAddress, - IN ULONG NumberOfBytes, - IN ULONG NewProtect -); - -XBSYSAPI VOID *MmUnmapIoSpace; - -#endif - - - diff --git a/import/OpenXDK/include/xboxkrnl/nt.h b/import/OpenXDK/include/xboxkrnl/nt.h deleted file mode 100644 index c7810a0d6..000000000 --- a/import/OpenXDK/include/xboxkrnl/nt.h +++ /dev/null @@ -1,412 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : nt.h -// * -// * note : XBox Kernel *NT* Declarations -// * -// ****************************************************************** -#ifndef XBOXKRNL_NT_H -#define XBOXKRNL_NT_H - -// ****************************************************************** -// * NtAllocateVirtualMemory -// ****************************************************************** -XBSYSAPI EXPORTNUM(184) NTSTATUS NTAPI NtAllocateVirtualMemory -( - IN OUT PVOID *BaseAddress, - IN ULONG ZeroBits, - IN OUT PULONG AllocationSize, - IN DWORD AllocationType, - IN DWORD Protect -); - -XBSYSAPI VOID *NtCancelTimer; - -// ****************************************************************** -// * NtClearEvent -// ****************************************************************** -XBSYSAPI EXPORTNUM(186) NTSTATUS NTAPI NtClearEvent -( - IN HANDLE EventHandle -); - -// ****************************************************************** -// * NtClose -// ****************************************************************** -// * -// * Closes an object handle -// * -// ****************************************************************** -XBSYSAPI EXPORTNUM(187) NTSTATUS NTAPI NtClose -( - IN HANDLE Handle -); - -XBSYSAPI VOID *NtCreateDirectoryObject; - -// ****************************************************************** -// * NtCreateEvent -// ****************************************************************** -XBSYSAPI EXPORTNUM(189) NTSTATUS NTAPI NtCreateEvent -( - OUT PHANDLE EventHandle, - IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, - IN EVENT_TYPE EventType, - IN BOOLEAN InitialState -); - -// ****************************************************************** -// * NtCreateFile -// ****************************************************************** -// * -// * Causes a new file or directory to be created, or opens and -// * existing file, device, directory, or volume, giving the caller -// * a handle for the file object. -// * -// ****************************************************************** -XBSYSAPI EXPORTNUM(190) NTSTATUS NTAPI NtCreateFile -( - OUT PHANDLE FileHandle, - IN ACCESS_MASK DesiredAccess, - IN POBJECT_ATTRIBUTES ObjectAttributes, - OUT PIO_STATUS_BLOCK IoStatusBlock, - IN PLARGE_INTEGER AllocationSize OPTIONAL, - IN ULONG FileAttributes, - IN ULONG ShareAccess, - IN ULONG CreateDisposition, - IN ULONG CreateOptions -); - -XBSYSAPI VOID *NtCreateIoCompletion; - -// ****************************************************************** -// * NtCreateMutant -// ****************************************************************** -XBSYSAPI EXPORTNUM(192) NTSTATUS NTAPI NtCreateMutant -( - OUT PHANDLE MutantHandle, - IN POBJECT_ATTRIBUTES ObjectAttributes, - IN BOOLEAN InitialOwner -); - -// ****************************************************************** -// * NtCreateSemaphore -// ****************************************************************** -XBSYSAPI EXPORTNUM(193) NTSTATUS NTAPI NtCreateSemaphore -( - OUT PHANDLE SemaphoreHandle, - IN ACCESS_MASK DesiredAccess, - IN ULONG InitialCount, - IN ULONG MaximumCount -); - -XBSYSAPI VOID *NtCreateTimer; -XBSYSAPI VOID *NtDeleteFile; -XBSYSAPI VOID *NtDeviceIoControlFile; - -// ****************************************************************** -// * NtDuplicateObject -// ****************************************************************** -XBSYSAPI EXPORTNUM(197) NTSTATUS NTAPI NtDuplicateObject -( - PVOID SourceHandle, - PVOID *TargetHandle, - DWORD Options -); - -// ****************************************************************** -// * NtFlushBuffersFile -// ****************************************************************** -XBSYSAPI EXPORTNUM(198) NTSTATUS NTAPI NtFlushBuffersFile -( - PVOID FileHandle, - OUT PIO_STATUS_BLOCK IoStatusBlock -); - -// ****************************************************************** -// * NtFreeVirtualMemory -// ****************************************************************** -XBSYSAPI EXPORTNUM(199) NTSTATUS NTAPI NtFreeVirtualMemory -( - IN OUT PVOID *BaseAddress, - IN OUT PULONG FreeSize, - IN ULONG FreeType -); - -XBSYSAPI VOID *NtFsControlFile; -XBSYSAPI VOID *NtOpenDirectoryObject; - -// ****************************************************************** -// * NtOpenFile -// ****************************************************************** -XBSYSAPI EXPORTNUM(202) NTSTATUS NTAPI NtOpenFile -( - OUT PHANDLE FileHandle, - IN ACCESS_MASK DesiredAccess, - IN POBJECT_ATTRIBUTES ObjectAttributes, - OUT PIO_STATUS_BLOCK IoStatusBlock, - IN ULONG ShareAccess, - IN ULONG OpenOptions -); - -XBSYSAPI VOID *NtOpenSymbolicLinkObject; -XBSYSAPI VOID *NtProtectVirtualMemory; -XBSYSAPI VOID *NtPulseEvent; - -// ****************************************************************** -// * NtQueueApcThread -// ****************************************************************** -XBSYSAPI EXPORTNUM(206) NTSTATUS NTAPI NtQueueApcThread -( - IN HANDLE ThreadHandle, - IN PIO_APC_ROUTINE ApcRoutine, - IN PVOID ApcRoutineContext OPTIONAL, - IN PIO_STATUS_BLOCK ApcStatusBlock OPTIONAL, - IN ULONG ApcReserved OPTIONAL -); - -// ****************************************************************** -// * NtQueryDirectoryFile -// ****************************************************************** -XBSYSAPI EXPORTNUM(207) NTSTATUS NTAPI NtQueryDirectoryFile -( - IN HANDLE FileHandle, - IN HANDLE Event OPTIONAL, - IN PVOID ApcRoutine, // Todo: define this routine's prototype - IN PVOID ApcContext, - OUT PIO_STATUS_BLOCK IoStatusBlock, - OUT FILE_DIRECTORY_INFORMATION *FileInformation, - IN ULONG Length, - IN FILE_INFORMATION_CLASS FileInformationClass, - IN PSTRING FileMask, - IN BOOLEAN RestartScan -); - -XBSYSAPI VOID *NtQueryDirectoryObject; -XBSYSAPI VOID *NtQueryEvent; - -// ****************************************************************** -// * NtQueryFullAttributesFile -// ****************************************************************** -XBSYSAPI EXPORTNUM(210) NTSTATUS NTAPI NtQueryFullAttributesFile -( - IN POBJECT_ATTRIBUTES ObjectAttributes, - OUT PVOID Attributes -); - -// ****************************************************************** -// * NtQueryInformationFile -// ****************************************************************** -// * -// * Return various kinds of information about a given file object. -// * -// ****************************************************************** -XBSYSAPI EXPORTNUM(211) NTSTATUS NTAPI NtQueryInformationFile -( - IN HANDLE FileHandle, - OUT PIO_STATUS_BLOCK IoStatusBlock, - OUT PVOID FileInformation, - IN ULONG Length, - IN FILE_INFORMATION_CLASS FileInfo -); - -XBSYSAPI VOID *NtQueryIoCompletion; -XBSYSAPI VOID *NtQueryMutant; -XBSYSAPI VOID *NtQuerySemaphore; -XBSYSAPI VOID *NtQuerySymbolicLinkObject; -XBSYSAPI VOID *NtQueryTimer; - -// ****************************************************************** -// * NtQueryVirtualMemory -// ****************************************************************** -XBSYSAPI EXPORTNUM(217) NTSTATUS NTAPI NtQueryVirtualMemory -( - IN PVOID pBaseAddress, - OUT PVOID pBuffer -); - -// ****************************************************************** -// * NtQueryVolumeInformationFile -// ****************************************************************** -XBSYSAPI EXPORTNUM(218) NTSTATUS NTAPI NtQueryVolumeInformationFile -( - IN HANDLE FileHandle, - OUT PIO_STATUS_BLOCK IoStatusBlock, - OUT PFILE_FS_SIZE_INFORMATION FileInformation, - IN ULONG Length, - IN FS_INFORMATION_CLASS FileInformationClass -); - -// ****************************************************************** -// * NtReadFile -// ****************************************************************** -// * -// * Read data from an opened file. -// * -// ****************************************************************** -XBSYSAPI EXPORTNUM(219) NTSTATUS NTAPI NtReadFile -( - IN HANDLE FileHandle, // TODO: correct paramters - IN HANDLE Event OPTIONAL, - IN PVOID ApcRoutine OPTIONAL, - IN PVOID ApcContext, - OUT PVOID IoStatusBlock, - OUT PVOID Buffer, - IN ULONG Length, - IN PLARGE_INTEGER ByteOffset OPTIONAL -); - -XBSYSAPI VOID *NtReadFileScatter; - -// ****************************************************************** -// * NtReleaseMutant -// ****************************************************************** -XBSYSAPI EXPORTNUM(221) NTSTATUS NTAPI NtReleaseMutant -( - IN HANDLE MutantHandle, - OUT PLONG PreviousCount -); - -// ****************************************************************** -// * NtReleaseMutant -// ****************************************************************** -XBSYSAPI EXPORTNUM(222) NTSTATUS NTAPI NtReleaseSemaphore -( - IN HANDLE SemaphoreHandle, - IN ULONG ReleaseCount, - OUT PULONG PreviousCount OPTIONAL -); - -XBSYSAPI VOID *NtRemoveIoCompletion; - -// ****************************************************************** -// * NtResumeThread -// ****************************************************************** -XBSYSAPI EXPORTNUM(224) NTSTATUS NTAPI NtResumeThread -( - IN HANDLE ThreadHandle, - OUT PULONG PreviousSuspendCount -); - -// ****************************************************************** -// * NtSetEvent -// ****************************************************************** -XBSYSAPI EXPORTNUM(225) NTSTATUS NTAPI NtSetEvent -( - IN HANDLE EventHandle, - OUT PLONG PreviousState -); - -// ****************************************************************** -// * NtSetInformationFile -// ****************************************************************** -// * -// * Changes various kinds of information about a given file object. -// * -// ****************************************************************** -XBSYSAPI EXPORTNUM(226) NTSTATUS NTAPI NtSetInformationFile -( - IN HANDLE FileHandle, // TODO: correct paramters - OUT PVOID IoStatusBlock, - IN PVOID FileInformation, - IN ULONG Length, - IN ULONG FileInformationClass -); - -XBSYSAPI VOID *NtSetIoCompletion; -XBSYSAPI VOID *NtSetSystemTime; -XBSYSAPI VOID *NtSetTimerEx; -XBSYSAPI VOID *NtSignalAndWaitForSingleObjectEx; - -// ****************************************************************** -// * NtSuspendThread -// ****************************************************************** -XBSYSAPI EXPORTNUM(231) NTSTATUS NTAPI NtSuspendThread -( - IN HANDLE ThreadHandle, - OUT PULONG PreviousSuspendCount OPTIONAL -); - -// ****************************************************************** -// * NtUserIoApcDispatcher -// ****************************************************************** -XBSYSAPI EXPORTNUM(232) VOID NTAPI NtUserIoApcDispatcher -( - PVOID ApcContext, - PIO_STATUS_BLOCK IoStatusBlock, - ULONG Reserved -); - -// ****************************************************************** -// * NtWaitForSingleObject -// ****************************************************************** -// * -// * Put the current thread into a wait state until the given -// * dispatcher object is set to a signaled state or (optionally) -// * until the wait times out. -// * -// ****************************************************************** -XBSYSAPI EXPORTNUM(233) NTSTATUS NTAPI NtWaitForSingleObject -( - IN HANDLE Handle, - IN BOOLEAN Alertable, - IN PVOID Timeout -); - -// ****************************************************************** -// * NtWaitForSingleObjectEx -// ****************************************************************** -XBSYSAPI EXPORTNUM(234) NTSTATUS NTAPI NtWaitForSingleObjectEx -( - IN HANDLE Handle, - IN CHAR WaitMode, - IN BOOLEAN Alertable, - IN PLARGE_INTEGER Timeout -); - -// ****************************************************************** -// * NtWaitForMultipleObjectsEx -// ****************************************************************** -XBSYSAPI EXPORTNUM(235) NTSTATUS NTAPI NtWaitForMultipleObjectsEx -( - IN ULONG Count, - IN HANDLE *Handles, - IN WAIT_TYPE WaitType, - IN CHAR WaitMode, - IN BOOLEAN Alertable, - IN PLARGE_INTEGER Timeout -); - -// ****************************************************************** -// * NtWriteFile -// ****************************************************************** -// * -// * Write data to an opened file. -// * -// ****************************************************************** -XBSYSAPI EXPORTNUM(236) NTSTATUS NTAPI NtWriteFile -( - IN HANDLE FileHandle, // TODO: correct paramters - IN PVOID Event, - IN PVOID ApcRoutine, - IN PVOID ApcContext, - OUT PVOID IoStatusBlock, - IN PVOID Buffer, - IN ULONG Length, - IN PLARGE_INTEGER ByteOffset -); - -XBSYSAPI VOID *NtWriteFileGather; - -// ****************************************************************** -// * NtYieldExecution -// ****************************************************************** -XBSYSAPI EXPORTNUM(238) VOID NTAPI NtYieldExecution(); - -#endif - - diff --git a/import/OpenXDK/include/xboxkrnl/ob.h b/import/OpenXDK/include/xboxkrnl/ob.h deleted file mode 100644 index 572fb3369..000000000 --- a/import/OpenXDK/include/xboxkrnl/ob.h +++ /dev/null @@ -1,40 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : ob.h -// * -// * note : XBox Kernel *Object Manager* Declarations -// * -// ****************************************************************** -#ifndef XBOXKRNL_OB_H -#define XBOXKRNL_OB_H - -XBSYSAPI VOID *ObCreateObject; -XBSYSAPI VOID *ObDirectoryObjectType; -XBSYSAPI VOID *ObInsertObject; -XBSYSAPI VOID *ObMakeTemporaryObject; -XBSYSAPI VOID *ObOpenObjectByName; -XBSYSAPI VOID *ObOpenObjectByPointer; -XBSYSAPI VOID *ObpObjectHandleTable; - - -//XBSYSAPI VOID *ObReferenceObjectByHandle; -XBSYSAPI EXPORTNUM(246) BOOLEAN NTAPI ObReferenceObjectByHandle -( unsigned int a, - unsigned int b, - unsigned int c -); - - -XBSYSAPI VOID *ObReferenceObjectByName; -XBSYSAPI VOID *ObReferenceObjectByPointer; -XBSYSAPI VOID *ObSymbolicLinkObjectType; -XBSYSAPI VOID *ObfDereferenceObject; -XBSYSAPI VOID *ObfReferenceObject; - -#endif - - diff --git a/import/OpenXDK/include/xboxkrnl/ps.h b/import/OpenXDK/include/xboxkrnl/ps.h deleted file mode 100644 index 390f7e04b..000000000 --- a/import/OpenXDK/include/xboxkrnl/ps.h +++ /dev/null @@ -1,58 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : ps.h -// * -// * note : XBox Kernel *Process Structure* Declarations -// * -// ****************************************************************** -#ifndef XBOXKRNL_PS_H -#define XBOXKRNL_PS_H - -//XBSYSAPI VOID *PsCreateSystemThread; - -XBSYSAPI EXPORTNUM(254) NTSTATUS NTAPI PsCreateSystemThread -( - PULONG lpThreadAttributes, // SD - DWORD dwStackSize, // initial stack size - PKSTART_ROUTINE lpStartAddress, // thread function - VOID* lpParameter, // thread argument - DWORD dwCreationFlags, // creation option - DWORD* lpThreadId // thread identifier - -); - -// ****************************************************************** -// * PsCreateSystemThreadEx -// ****************************************************************** -XBSYSAPI EXPORTNUM(255) NTSTATUS NTAPI PsCreateSystemThreadEx -( - OUT PHANDLE ThreadHandle, - IN ULONG ThreadExtraSize, - IN ULONG KernelStackSize, - IN ULONG TlsDataSize, - OUT PULONG ThreadId OPTIONAL, - IN PVOID StartContext1, - IN PVOID StartContext2, - IN BOOLEAN CreateSuspended, - IN BOOLEAN DebugStack, - IN PKSTART_ROUTINE StartRoutine -); - -XBSYSAPI VOID *PsQueryStatistics; -XBSYSAPI VOID *PsSetCreateThreadNotifyRoutine; - -// ****************************************************************** -// * PsTerminateSystemThread -// ****************************************************************** -XBSYSAPI EXPORTNUM(258) VOID NTAPI PsTerminateSystemThread(IN NTSTATUS ExitStatus); - -//XBSYSAPI VOID *PsThreadObjectType; -XBSYSAPI EXPORTNUM(259) volatile DWORD PsThreadObjectType; - -#endif - - diff --git a/import/OpenXDK/include/xboxkrnl/rtl.h b/import/OpenXDK/include/xboxkrnl/rtl.h deleted file mode 100644 index 59d640759..000000000 --- a/import/OpenXDK/include/xboxkrnl/rtl.h +++ /dev/null @@ -1,247 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : ps.h -// * -// * note : XBox Kernel *Run-time Library* Declarations -// * -// ****************************************************************** -#ifndef XBOXKRNL_RTL_H -#define XBOXKRNL_RTL_H - -// ****************************************************************** -// * RtlAnsiStringToUnicodeString -// ****************************************************************** -XBSYSAPI EXPORTNUM(260) NTSTATUS NTAPI RtlAnsiStringToUnicodeString -( - PUNICODE_STRING DestinationString, - PSTRING SourceString, - UCHAR AllocateDestinationString -); - -// ****************************************************************** -// * RtlAppendStringToString -// ****************************************************************** -XBSYSAPI EXPORTNUM(261) NTSTATUS NTAPI RtlAppendStringToString -( - IN PSTRING Destination, - IN PSTRING Source -); - -XBSYSAPI VOID *RtlAppendUnicodeStringToString; -XBSYSAPI VOID *RtlAppendUnicodeToString; - -// ****************************************************************** -// * RtlAssert -// ****************************************************************** -XBSYSAPI EXPORTNUM(264) VOID NTAPI RtlAssert -( - PVOID FailedAssertion, - PVOID FileName, - ULONG LineNumber, - PCHAR Message -); - -XBSYSAPI VOID *RtlCaptureContext; -XBSYSAPI VOID *RtlCaptureStackBackTrace; -XBSYSAPI VOID *RtlCharToInteger; - -// ****************************************************************** -// * RtlCompareMemory -// ****************************************************************** -// * -// * compare block of memory, return number of equivalent bytes. -// * -// ****************************************************************** -XBSYSAPI EXPORTNUM(268) SIZE_T NTAPI RtlCompareMemory -( - IN CONST VOID *Source1, - IN CONST VOID *Source2, - IN SIZE_T Length -); - -XBSYSAPI VOID *RtlCompareMemoryUlong; -XBSYSAPI VOID *RtlCompareString; -XBSYSAPI VOID *RtlCompareUnicodeString; - -// ****************************************************************** -// * RtlCopyString -// ****************************************************************** -// * -// * Copy Source to Destination -// * -// ****************************************************************** -XBSYSAPI EXPORTNUM(272) VOID NTAPI RtlCopyString -( - IN OUT PVOID Destination, // TODO: should be STRING - IN PVOID Source OPTIONAL // TODO: should be STRING -); - -XBSYSAPI VOID *RtlCopyUnicodeString; -XBSYSAPI VOID *RtlCreateUnicodeString; -XBSYSAPI VOID *RtlDowncaseUnicodeChar; -XBSYSAPI VOID *RtlDowncaseUnicodeString; - -// ****************************************************************** -// * RtlEnterCriticalSection -// ****************************************************************** -XBSYSAPI EXPORTNUM(277) VOID NTAPI RtlEnterCriticalSection -( - IN PRTL_CRITICAL_SECTION CriticalSection -); - -XBSYSAPI VOID *RtlEnterCriticalSectionAndRegion; -XBSYSAPI VOID *RtlEqualString; -XBSYSAPI VOID *RtlEqualUnicodeString; -XBSYSAPI VOID *RtlExtendedIntegerMultiply; -XBSYSAPI VOID *RtlExtendedLargeIntegerDivide; -XBSYSAPI VOID *RtlExtendedMagicDivide; -XBSYSAPI VOID *RtlFillMemory; -XBSYSAPI VOID *RtlFillMemoryUlong; -XBSYSAPI VOID *RtlFreeAnsiString; -XBSYSAPI VOID *RtlFreeUnicodeString; -XBSYSAPI VOID *RtlGetCallersAddress; - -// ****************************************************************** -// * RtlInitAnsiString -// ****************************************************************** -// * -// * Initialize a counted ANSI string. -// * -// ****************************************************************** -XBSYSAPI EXPORTNUM(289) VOID NTAPI RtlInitAnsiString -( - IN OUT PANSI_STRING DestinationString, - IN PCSZ SourceString -); - -XBSYSAPI VOID *RtlInitUnicodeString; - -// ****************************************************************** -// * RtlInitializeCriticalSection -// ****************************************************************** -XBSYSAPI EXPORTNUM(291) VOID NTAPI RtlInitializeCriticalSection -( - IN PRTL_CRITICAL_SECTION CriticalSection -); - -XBSYSAPI VOID *RtlIntegerToChar; -XBSYSAPI VOID *RtlIntegerToUnicodeString; - -// ****************************************************************** -// * RtlLeaveCriticalSection -// ****************************************************************** -XBSYSAPI EXPORTNUM(294) VOID NTAPI RtlLeaveCriticalSection -( - IN PRTL_CRITICAL_SECTION CriticalSection -); - -XBSYSAPI VOID *RtlLeaveCriticalSectionAndRegion; - -// ****************************************************************** -// * RtlLowerChar -// ****************************************************************** -XBSYSAPI EXPORTNUM(296) CHAR NTAPI RtlLowerChar(CHAR Character); - -XBSYSAPI VOID *RtlMapGenericMask; - -// ****************************************************************** -// * RtlMoveMemory -// ****************************************************************** -// * -// * Move memory either forward or backward, aligned or unaligned, -// * in 4-byte blocks, followed by any remaining blocks. -// * -// ****************************************************************** -XBSYSAPI EXPORTNUM(298) VOID NTAPI RtlMoveMemory -( - IN VOID UNALIGNED *Destination, - IN CONST VOID UNALIGNED *Source, - IN SIZE_T Length -); - -XBSYSAPI VOID *RtlMultiByteToUnicodeN; -XBSYSAPI VOID *RtlMultiByteToUnicodeSize; - -// ****************************************************************** -// * RtlNtStatusToDosError -// ****************************************************************** -XBSYSAPI EXPORTNUM(301) ULONG NTAPI RtlNtStatusToDosError -( - IN NTSTATUS Status -); - -XBSYSAPI VOID *RtlRaiseException; -XBSYSAPI VOID *RtlRaiseStatus; - -// ****************************************************************** -// * RtlTimeFieldsToTime -// ****************************************************************** -XBSYSAPI EXPORTNUM(304) BOOLEAN NTAPI RtlTimeFieldsToTime -( - IN PTIME_FIELDS TimeFields, - OUT PLARGE_INTEGER Time -); - -// ****************************************************************** -// * RtlTimeToTimeFields -// ****************************************************************** -XBSYSAPI EXPORTNUM(305) VOID NTAPI RtlTimeToTimeFields -( - IN PLARGE_INTEGER Time, - OUT PTIME_FIELDS TimeFields -); - -// ****************************************************************** -// * RtlTryEnterCriticalSection -// ****************************************************************** -XBSYSAPI EXPORTNUM(306) BOOLEAN NTAPI RtlTryEnterCriticalSection -( - IN PRTL_CRITICAL_SECTION CriticalSection -); - -XBSYSAPI VOID *RtlUlongByteSwap; - -// ****************************************************************** -// * RtlUnicodeStringToAnsiString -// ****************************************************************** -XBSYSAPI EXPORTNUM(308) NTSTATUS NTAPI RtlUnicodeStringToAnsiString -( - IN OUT PSTRING DestinationString, - IN PUNICODE_STRING SourceString, - IN BOOLEAN AllocateDestinationString -); - -XBSYSAPI VOID *RtlUnicodeStringToInteger; -XBSYSAPI VOID *RtlUnicodeToMultiByteN; -XBSYSAPI VOID *RtlUnicodeToMultiByteSize; -XBSYSAPI VOID *RtlUnwind; -XBSYSAPI VOID *RtlUpcaseUnicodeChar; -XBSYSAPI VOID *RtlUpcaseUnicodeString; -XBSYSAPI VOID *RtlUpcaseUnicodeToMultiByteN; -XBSYSAPI VOID *RtlUpperChar; -XBSYSAPI VOID *RtlUpperString; -XBSYSAPI VOID *RtlUshortByteSwap; -XBSYSAPI VOID *RtlWalkFrameChain; - -// ****************************************************************** -// * RtlZeroMemory -// ****************************************************************** -// * -// * Fill a block of memory with zeros. -// * -// ****************************************************************** -XBSYSAPI EXPORTNUM(320) VOID NTAPI RtlZeroMemory -( - IN VOID UNALIGNED *Destination, - IN SIZE_T Length -); - -XBSYSAPI VOID *RtlRip; - -#endif - - diff --git a/import/OpenXDK/include/xboxkrnl/xbox.h b/import/OpenXDK/include/xboxkrnl/xbox.h deleted file mode 100644 index 290f62e7c..000000000 --- a/import/OpenXDK/include/xboxkrnl/xbox.h +++ /dev/null @@ -1,156 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : xbox.h -// * -// * note : XBox Kernel Declarations -// * -// ****************************************************************** -#ifndef XBOX_H -#define XBOX_H - -// ****************************************************************** -// * AvGetSavedDataAddress -// ****************************************************************** -XBSYSAPI EXPORTNUM(1) PVOID NTAPI AvGetSavedDataAddress(); - -// ****************************************************************** -// * AvSendTVEncoderOption -// ****************************************************************** -XBSYSAPI EXPORTNUM(2) VOID NTAPI AvSendTVEncoderOption -( - IN PVOID RegisterBase, - IN ULONG Option, - IN ULONG Param, - OUT ULONG *Result -); - -// ****************************************************************** -// * AvSetDisplayMode -// ****************************************************************** -XBSYSAPI EXPORTNUM(3) ULONG NTAPI AvSetDisplayMode -( - IN PVOID RegisterBase, - IN ULONG Step, - IN ULONG Mode, - IN ULONG Format, - IN ULONG Pitch, - IN ULONG FrameBuffer -); - -// ****************************************************************** -// * AvSetSavedDataAddress -// ****************************************************************** -XBSYSAPI EXPORTNUM(4) VOID NTAPI AvSetSavedDataAddress -( - IN PVOID Address -); - -XBSYSAPI VOID *FscGetCacheSize; -XBSYSAPI VOID *FscInvalidateIdleBlocks; - -// ****************************************************************** -// * FscSetCacheSize -// ****************************************************************** -XBSYSAPI EXPORTNUM(37) LONG NTAPI FscSetCacheSize(ULONG uCachePages); - -XBSYSAPI VOID *KdDebuggerEnabled; -XBSYSAPI VOID *KdDebuggerNotPresent; - -// ****************************************************************** -// * KfRaiseIrql -// ****************************************************************** -XBSYSAPI EXPORTNUM(160) UCHAR NTAPI KfRaiseIrql -( - IN UCHAR NewIrql -); - -// ****************************************************************** -// * KfLowerIrql -// ****************************************************************** -XBSYSAPI EXPORTNUM(161) UCHAR NTAPI KfLowerIrql -( - IN UCHAR NewIrql -); - -XBSYSAPI VOID *KiBugCheckData; -XBSYSAPI VOID *KiUnlockDispatcherDatabase; - -// ****************************************************************** -// * LaunchDataPage (actually a pointer) -// ****************************************************************** -XBSYSAPI EXPORTNUM(164) PLAUNCH_DATA_PAGE LaunchDataPage; - -XBSYSAPI VOID *PhyGetLinkState; -XBSYSAPI VOID *PhyInitialize; - -// ****************************************************************** -// * XboxEEPROMKey -// ****************************************************************** -XBSYSAPI EXPORTNUM(321) UCHAR XboxEEPROMKey[16]; - -// ****************************************************************** -// * XboxHardwareInfo -// ****************************************************************** -XBSYSAPI EXPORTNUM(322) XBOX_HARDWARE_INFO XboxHardwareInfo; - -// ****************************************************************** -// * XboxHDKey -// ****************************************************************** -XBSYSAPI EXPORTNUM(323) UCHAR XboxHDKey[16]; - -XBSYSAPI VOID *XboxKrnlVersion; - -// ****************************************************************** -// * XboxSignatureKey -// ****************************************************************** -XBSYSAPI EXPORTNUM(325) BYTE XboxSignatureKey[16]; - -XBSYSAPI VOID *XeImageFileName; -XBSYSAPI VOID *XeLoadSection; -XBSYSAPI VOID *XeUnloadSection; - -// ****************************************************************** -// * XcSHAInit -// ****************************************************************** -XBSYSAPI EXPORTNUM(335) VOID NTAPI XcSHAInit(UCHAR *pbSHAContext); - -// ****************************************************************** -// * XcSHAUpdate -// ****************************************************************** -XBSYSAPI EXPORTNUM(336) VOID NTAPI XcSHAUpdate(UCHAR *pbSHAContext, UCHAR *pbInput, ULONG dwInputLength); - -// ****************************************************************** -// * XcSHAFinal -// ****************************************************************** -XBSYSAPI EXPORTNUM(337) VOID NTAPI XcSHAFinal(UCHAR *pbSHAContext, UCHAR *pbDigest); - -XBSYSAPI VOID *XcRC4Key; -XBSYSAPI VOID *XcRC4Crypt; -XBSYSAPI VOID *XcHMAC; -XBSYSAPI VOID *XcPKEncPublic; -XBSYSAPI VOID *XcPKDecPrivate; -XBSYSAPI VOID *XcPKGetKeyLen; -XBSYSAPI VOID *XcVerifyPKCS1Signature; -XBSYSAPI VOID *XcModExp; -XBSYSAPI VOID *XcDESKeyParity; -XBSYSAPI VOID *XcKeyTable; -XBSYSAPI VOID *XcBlockCrypt; -XBSYSAPI VOID *XcBlockCryptCBC; -XBSYSAPI VOID *XcCryptService; -XBSYSAPI VOID *XcUpdateCrypto; -XBSYSAPI VOID *XboxLANKey; -XBSYSAPI VOID *XboxAlternateSignatureKeys; -XBSYSAPI VOID *XePublicKeyData; -XBSYSAPI VOID *IdexChannelObject; -XBSYSAPI VOID *xsnprintf; // prefixed with "x" to avoid xlibc collisions -XBSYSAPI VOID *xsprintf; // "" -XBSYSAPI VOID *xvsnprintf; // "" -XBSYSAPI VOID *xvsprintf; // "" - -#endif - - diff --git a/import/OpenXDK/include/xboxkrnl/xboxkrnl.h b/import/OpenXDK/include/xboxkrnl/xboxkrnl.h deleted file mode 100644 index 55875d8b2..000000000 --- a/import/OpenXDK/include/xboxkrnl/xboxkrnl.h +++ /dev/null @@ -1,1003 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : xboxkrnl.h -// * -// * note : XBox Kernel Declarations -// * -// ****************************************************************** -#ifndef XBOXKRNL_H -#define XBOXKRNL_H - -#if defined(__cplusplus) -extern "C" -{ -#endif - -// ****************************************************************** -// * dll import/export -// ****************************************************************** -#define DECLSPEC_IMPORT __declspec(dllimport) -#define DECLSPEC_EXPORT __declspec(dllexport) - -// ****************************************************************** -// * kernel exports, others either import or link locally -// ****************************************************************** -#define XBSYSAPI DECLSPEC_IMPORT -#ifdef _XBOXKRNL_INTERNAL_ -#undef XBSYSAPI -#define XBSYSAPI DECLSPEC_EXPORT -#endif -#ifdef _XBOXKRNL_DEFEXTRN_ -#undef XBSYSAPI -#define XBSYSAPI extern -#endif - -// ****************************************************************** -// * Null -// ****************************************************************** -#ifndef NULL -#define NULL 0 -#endif - -// ****************************************************************** -// * TRUE / FALSE -// ****************************************************************** -#ifndef FALSE -#define FALSE 0 -#endif -#ifndef TRUE -#define TRUE 1 -#endif - -// ****************************************************************** -// * CONST -// ****************************************************************** -#define CONST const - -// ****************************************************************** -// * VOID -// ****************************************************************** -#ifndef VOID -typedef void VOID; - //#define VOID void -#endif - -// ****************************************************************** -// * Basic types -// ****************************************************************** -typedef char CHAR, CCHAR; -typedef short SHORT, CSHORT; -typedef long LONG; -typedef unsigned char UCHAR; -typedef unsigned char BYTE; -typedef unsigned char BOOLEAN; -typedef unsigned short USHORT; -typedef unsigned short WORD; -typedef unsigned long ULONG; -typedef unsigned long DWORD; -typedef unsigned long SIZE_T, *PSIZE_T; -typedef unsigned long ACCESS_MASK, *PACCESS_MASK; -typedef unsigned long PHYSICAL_ADDRESS; -typedef long INT_PTR; -typedef signed __int64 LONGLONG; -typedef unsigned __int64 ULONGLONG; -typedef unsigned short WCHAR; - -// ****************************************************************** -// * Pointer types -// ****************************************************************** -typedef CHAR *PCHAR; -typedef CHAR *PCSZ; -typedef BYTE *PBYTE; -typedef BOOLEAN *PBOOLEAN; -typedef UCHAR *PUCHAR; -typedef USHORT *PUSHORT; -typedef ULONG *PULONG; -typedef DWORD *PDWORD, *LPDWORD; -typedef ACCESS_MASK *PACCESS_MASK; -typedef LONG *PLONG, *LONG_PTR; -typedef ULONG *ULONG_PTR; -typedef INT_PTR *PINT_PTR; -typedef VOID *PVOID, *LPVOID; -typedef void *HANDLE; -typedef HANDLE *PHANDLE; - -// ****************************************************************** -// * LPSECURITY_ATTRIBUTES -// ****************************************************************** -typedef void* LPSECURITY_ATTRIBUTES; - -// ****************************************************************** -// * NTSTATUS -// ****************************************************************** -typedef long NTSTATUS; - -#define NT_SUCCESS(Status) ((NTSTATUS) (Status) >= 0) -#define STATUS_SUCCESS ((DWORD )0x00000000L) -#ifndef STATUS_PENDING -#define STATUS_PENDING ((DWORD )0x00000103L) -#endif -#define STATUS_TIMER_RESUME_IGNORED ((DWORD )0x40000025L) -#define STATUS_UNSUCCESSFUL ((DWORD )0xC0000001) -#define STATUS_UNRECOGNIZED_MEDIA ((DWORD )0xC0000014) -#ifndef STATUS_NO_MEMORY -#define STATUS_NO_MEMORY ((DWORD )0xC0000017L) -#endif -#define STATUS_ALERTED ((DWORD )0x00000101) -#define STATUS_USER_APC ((DWORD )0x000000C0L) -// The SCSI input buffer was too large (not necessarily an error!) -#define STATUS_DATA_OVERRUN ((DWORD )0xC000003CL) -#define STATUS_INVALID_IMAGE_FORMAT ((DWORD )0xC000007BL) -#define STATUS_INSUFFICIENT_RESOURCES ((DWORD )0xC000009AL) -#define STATUS_TOO_MANY_SECRETS ((DWORD )0xC0000156L) -#define STATUS_XBE_REGION_MISMATCH ((DWORD )0xC0050001L) -#define STATUS_XBE_MEDIA_MISMATCH ((DWORD )0xC0050002L) -#define STATUS_OBJECT_NAME_NOT_FOUND ((DWORD )0xC0000034L) -#define STATUS_OBJECT_NAME_COLLISION ((DWORD )0xC0000035L) - -// ****************************************************************** -// * PAGE Masks -// ****************************************************************** -#define PAGE_NOACCESS 0x01 -#define PAGE_READONLY 0x02 -#define PAGE_READWRITE 0x04 -#define PAGE_WRITECOPY 0x08 -#define PAGE_EXECUTE 0x10 -#define PAGE_EXECUTE_READ 0x20 -#define PAGE_EXECUTE_READWRITE 0x40 -#define PAGE_EXECUTE_WRITECOPY 0x80 -#define PAGE_GUARD 0x100 -#define PAGE_NOCACHE 0x200 -#define PAGE_WRITECOMBINE 0x400 - -// ****************************************************************** -// * calling conventions -// ****************************************************************** -#define NTAPI __stdcall -#define CDECL __cdecl -#define INLINE __inline -#define DECLSPEC_NORETURN __declspec(noreturn) - -// ****************************************************************** -// * documentation purposes only -// ****************************************************************** -#define EXPORTNUM(a) -#define UNALIGNED -#define OPTIONAL -#define IN -#define OUT - -// ****************************************************************** -// * KPROCESSOR_MODE -// ****************************************************************** -typedef CCHAR KPROCESSOR_MODE; - -// ****************************************************************** -// * MODE -// ****************************************************************** -typedef enum _MODE -{ - KernelMode, - UserMode, - MaximumMode -} -MODE; - -// ****************************************************************** -// * WAIT_TYPE -// ****************************************************************** -typedef enum _WAIT_TYPE -{ - WaitAll = 0, - WaitAny = 1 -} -WAIT_TYPE; - -// ****************************************************************** -// * LARGE_INTEGER -// ****************************************************************** -typedef union _LARGE_INTEGER -{ - struct - { - DWORD LowPart; - LONG HighPart; - } - u; - - LONGLONG QuadPart; -} -LARGE_INTEGER, *PLARGE_INTEGER; - -// ****************************************************************** -// * ULARGE_INTEGER -// ****************************************************************** -typedef union _ULARGE_INTEGER -{ - struct - { - DWORD LowPart; - DWORD HighPart; - } - u1; - - struct - { - DWORD LowPart; - DWORD HighPart; - } - u; - - ULONGLONG QuadPart; -} -ULARGE_INTEGER, *PULARGE_INTEGER; - -// ****************************************************************** -// * STRING -// ****************************************************************** -typedef struct _STRING -{ - USHORT Length; - USHORT MaximumLength; - PCHAR Buffer; -} -STRING, ANSI_STRING, *PSTRING, *PANSI_STRING; - -// ****************************************************************** -// * UNICODE_STRING -// ****************************************************************** -typedef struct _UNICODE_STRING -{ - USHORT Length; - USHORT MaximumLength; - USHORT *Buffer; -} -UNICODE_STRING, *PUNICODE_STRING; - -// ****************************************************************** -// * LIST_ENTRY -// ****************************************************************** -typedef struct _LIST_ENTRY -{ - struct _LIST_ENTRY *Flink; - struct _LIST_ENTRY *Blink; -} -LIST_ENTRY, *PLIST_ENTRY; - -// ****************************************************************** -// * FILE_FS_SIZE_INFORMATION -// ****************************************************************** -typedef struct _FILE_FS_SIZE_INFORMATION -{ - LARGE_INTEGER TotalAllocationUnits; - LARGE_INTEGER AvailableAllocationUnits; - ULONG SectorsPerAllocationUnit; - ULONG BytesPerSector; -} -FILE_FS_SIZE_INFORMATION, *PFILE_FS_SIZE_INFORMATION; - -// ****************************************************************** -// * FILE_INFORMATION_CLASS -// ****************************************************************** -typedef enum _FILE_INFORMATION_CLASS -{ - FileDirectoryInformation = 1, - FileFullDirectoryInformation, - FileBothDirectoryInformation, - FileBasicInformation, - FileStandardInformation, - FileInternalInformation, - FileEaInformation, - FileAccessInformation, - FileNameInformation, - FileRenameInformation, - FileLinkInformation, - FileNamesInformation, - FileDispositionInformation, - FilePositionInformation, - FileFullEaInformation, - FileModeInformation, - FileAlignmentInformation, - FileAllInformation, - FileAllocationInformation, - FileEndOfFileInformation, - FileAlternateNameInformation, - FileStreamInformation, - FilePipeInformation, - FilePipeLocalInformation, - FilePipeRemoteInformation, - FileMailslotQueryInformation, - FileMailslotSetInformation, - FileCompressionInformation, - FileCopyOnWriteInformation, - FileCompletionInformation, - FileMoveClusterInformation, - FileQuotaInformation, - FileReparsePointInformation, - FileNetworkOpenInformation, - FileObjectIdInformation, - FileTrackingInformation, - FileOleDirectoryInformation, - FileContentIndexInformation, - FileInheritContentIndexInformation, - FileOleInformation, - FileMaximumInformation -} -FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS; - -// ****************************************************************** -// * CreateDisposition Values for NtCreateFile -// ****************************************************************** -#define FILE_SUPERSEDE 0x00000000 -#define FILE_OPEN 0x00000001 -#define FILE_CREATE 0x00000002 -#define FILE_OPEN_IF 0x00000003 -#define FILE_OVERWRITE 0x00000004 -#define FILE_OVERWRITE_IF 0x00000005 -#define FILE_MAXIMUM_DISPOSITION 0x00000005 - -// ****************************************************************** -// * CreateOption Values for NtCreateFile -// ****************************************************************** -// FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT is what CreateFile -// uses for most things when translating to NtCreateFile. -#define FILE_DIRECTORY_FILE 0x00000001 -#define FILE_WRITE_THROUGH 0x00000002 -#define FILE_SEQUENTIAL_ONLY 0x00000004 -#define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008 -#define FILE_SYNCHRONOUS_IO_ALERT 0x00000010 -#define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020 -#define FILE_NON_DIRECTORY_FILE 0x00000040 -#define FILE_CREATE_TREE_CONNECTION 0x00000080 -#define FILE_COMPLETE_IF_OPLOCKED 0x00000100 -#define FILE_NO_EA_KNOWLEDGE 0x00000200 -#define FILE_OPEN_FOR_RECOVERY 0x00000400 -#define FILE_RANDOM_ACCESS 0x00000800 -#define FILE_DELETE_ON_CLOSE 0x00001000 -#define FILE_OPEN_BY_FILE_ID 0x00002000 -#define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000 -#define FILE_NO_COMPRESSION 0x00008000 -#define FILE_RESERVE_OPFILTER 0x00100000 -#define FILE_OPEN_REPARSE_POINT 0x00200000 -#define FILE_OPEN_NO_RECALL 0x00400000 -#define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000 -#define FILE_COPY_STRUCTURED_STORAGE 0x00000041 -#define FILE_STRUCTURED_STORAGE 0x00000441 -#define FILE_VALID_OPTION_FLAGS 0x00ffffff -#define FILE_VALID_PIPE_OPTION_FLAGS 0x00000032 -#define FILE_VALID_MAILSLOT_OPTION_FLAGS 0x00000032 -#define FILE_VALID_SET_FLAGS 0x00000036 - -// ****************************************************************** -// * OBJECT_ATTRIBUTES -// ****************************************************************** -typedef struct _OBJECT_ATTRIBUTES -{ - HANDLE RootDirectory; - PSTRING ObjectName; - ULONG Attributes; -} -OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES; - -// ****************************************************************** -// * FSINFOCLASS -// ****************************************************************** -typedef enum _FSINFOCLASS -{ - FileFsVolumeInformation = 1, - FileFsLabelInformation, // 2 - FileFsSizeInformation, // 3 - FileFsDeviceInformation, // 4 - FileFsAttributeInformation, // 5 - FileFsControlInformation, // 6 - FileFsFullSizeInformation, // 7 - FileFsObjectIdInformation, // 8 - FileFsMaximumInformation -} -FS_INFORMATION_CLASS, *PFS_INFORMATION_CLASS; - -// ****************************************************************** -// * FILE_DIRECTORY_INFORMATION -// ****************************************************************** -typedef struct _FILE_DIRECTORY_INFORMATION -{ - ULONG NextEntryOffset; - ULONG FileIndex; - LARGE_INTEGER CreationTime; - LARGE_INTEGER LastAccessTime; - LARGE_INTEGER LastWriteTime; - LARGE_INTEGER ChangeTime; - LARGE_INTEGER EndOfFile; - LARGE_INTEGER AllocationSize; - ULONG FileAttributes; - ULONG FileNameLength; - CHAR FileName[1]; // Offset: 0x40 -} -FILE_DIRECTORY_INFORMATION; - -// ****************************************************************** -// * MM_STATISTICS -// ****************************************************************** -typedef struct _MM_STATISTICS -{ - ULONG Length; - ULONG TotalPhysicalPages; - ULONG AvailablePages; - ULONG VirtualMemoryBytesCommitted; - ULONG VirtualMemoryBytesReserved; - ULONG CachePagesCommitted; - ULONG PoolPagesCommitted; - ULONG StackPagesCommitted; - ULONG ImagePagesCommitted; -} -MM_STATISTICS, *PMM_STATISTICS; - -// ****************************************************************** -// * IO_STATUS_BLOCK *Same as Win2k/XP* -// ****************************************************************** -typedef struct _IO_STATUS_BLOCK -{ - union - { - NTSTATUS Status; - PVOID Pointer; - } - u1; - - ULONG_PTR Information; -} -IO_STATUS_BLOCK, *PIO_STATUS_BLOCK; - -// ****************************************************************** -// * IO_APC_ROUTINE -// ****************************************************************** -typedef VOID (NTAPI *PIO_APC_ROUTINE) -( - IN PVOID ApcContext, - IN PIO_STATUS_BLOCK IoStatusBlock, - IN ULONG Reserved -); - -// ****************************************************************** -// * EVENT_TYPE -// ****************************************************************** -typedef enum _EVENT_TYPE -{ - NotificationEvent = 0, - SynchronizationEvent -} -EVENT_TYPE; - -// ****************************************************************** -// * BUS_DATA_TYPE -// ****************************************************************** -typedef enum _BUS_DATA_TYPE -{ - ConfigurationSpaceUndefined = 0xFF, - Cmos = 0x0, - EisaConfiguration = 0x1, - Pos = 0x2, - CbusConfiguration = 0x3, - PCIConfiguration = 0x4, - VMEConfiguration = 0x5, - NuBusConfiguration = 0x6, - PCMCIAConfiguration = 0x7, - MPIConfiguration = 0x8, - MPSAConfiguration = 0x9, - PNPISAConfiguration = 0xA, - SgiInternalConfiguration = 0xB, - MaximumBusDataType = 0xC, -} -BUS_DATA_TYPE; - -// ****************************************************************** -// * PCI_SLOT_NUMBER -// ****************************************************************** -typedef struct _PCI_SLOT_NUMBER -{ - union - { - struct - { - ULONG DeviceNumber:5; - ULONG FunctionNumber:3; - ULONG Reserved:24; - } - bits; - - ULONG AsULONG; - }u; -} -PCI_SLOT_NUMBER, *PPCI_SLOT_NUMBER; - -#define PCI_TYPE0_ADDRESSES 6 -#define PCI_TYPE1_ADDRESSES 2 -#define PCI_TYPE2_ADDRESSES 5 - -// ****************************************************************** -// * PCI_COMMON_CONFIG -// ****************************************************************** -typedef struct _PCI_COMMON_CONFIG -{ - USHORT VendorID; // 0x00 (ro) - USHORT DeviceID; // 0x02 (ro) - USHORT Command; // 0x04 Device control - USHORT Status; // 0x06 - UCHAR RevisionID; // 0x08 (ro) - UCHAR ProgIf; // 0x09 (ro) - UCHAR SubClass; // 0x0A (ro) - UCHAR BaseClass; // 0x0B (ro) - UCHAR CacheLineSize; // 0x0C (ro+) - UCHAR LatencyTimer; // 0x0D (ro+) - UCHAR HeaderType; // 0x0E (ro) - UCHAR BIST; // 0x0F Built in self test - - union - { - struct _PCI_HEADER_TYPE_0 - { - ULONG BaseAddresses[PCI_TYPE0_ADDRESSES]; // 0x10 - ULONG CIS; - USHORT SubVendorID; - USHORT SubSystemID; - ULONG ROMBaseAddress; - UCHAR CapabilitiesPtr; - UCHAR Reserved1[3]; - ULONG Reserved2; - UCHAR InterruptLine; // - UCHAR InterruptPin; // (ro) - UCHAR MinimumGrant; // (ro) - UCHAR MaximumLatency; // (ro) - } - type0; - }u; - - UCHAR DeviceSpecific[192]; - -} -PCI_COMMON_CONFIG, *PPCI_COMMON_CONFIG; - -#define FIELD_OFFSET(type, field) ((LONG)(LONG_PTR)&(((type *)0)->field)) - -#define PCI_COMMON_HDR_LENGTH (FIELD_OFFSET (PCI_COMMON_CONFIG, DeviceSpecific)) - -#define PCI_MAX_DEVICES 32 -#define PCI_MAX_FUNCTION 8 -#define PCI_MAX_BRIDGE_NUMBER 0xFF -#define PCI_INVALID_VENDORID 0xFFFF - -#define PCI_VENDOR_NVIDIA_CORPORATION 0x10DE - -#define PCI_USB0_DEVICE_ID 2 -#define PCI_USB0_FUNCTION_ID 0 -#define PCI_USB0_IRQ 1 -#define PCI_USB0_REGISTER_BASE 0xFED00000 -#define PCI_USB0_REGISTER_LENGTH 0x00001000 -#define PCI_USB0_OHCI_CONTROLLER 0x01C2 - -// ****************************************************************** -// * RETURN_FIRMWARE -// ****************************************************************** -typedef enum _RETURN_FIRMWARE -{ - ReturnFirmwareHalt = 0x0, - ReturnFirmwareReboot = 0x1, - ReturnFirmwareQuickReboot = 0x2, - ReturnFirmwareHard = 0x3, - ReturnFirmwareFatal = 0x4, - ReturnFirmwareAll = 0x5 -} -RETURN_FIRMWARE, *LPRETURN_FIRMWARE; - -// ****************************************************************** -// * LAUNCH_DATA_HEADER -// ****************************************************************** -typedef struct _LAUNCH_DATA_HEADER -{ - DWORD dwLaunchDataType; - DWORD dwTitleId; - char szLaunchPath[520]; - DWORD dwFlags; -} -LAUNCH_DATA_HEADER, *PLAUNCH_DATA_HEADER; - -// ****************************************************************** -// * LAUNCH_DATA_PAGE -// ****************************************************************** -typedef struct _LAUNCH_DATA_PAGE -{ - LAUNCH_DATA_HEADER Header; - UCHAR Pad[492]; - UCHAR LaunchData[3072]; -} -LAUNCH_DATA_PAGE, *PLAUNCH_DATA_PAGE; - -// ****************************************************************** -// * DISPATCHER_HEADER -// ****************************************************************** -typedef struct _DISPATCHER_HEADER -{ - UCHAR Type; // 0x00 - UCHAR Absolute; // 0x01 - UCHAR Size; // 0x02 - UCHAR Inserted; // 0x03 - LONG SignalState; // 0x04 - LIST_ENTRY WaitListHead; // 0x08 -} -DISPATCHER_HEADER; - -// ****************************************************************** -// * TIMER_TYPE -// ****************************************************************** -typedef enum _TIMER_TYPE -{ - NotificationTimer = 0, - SynchronizationTimer = 1 -} -TIMER_TYPE; - -// ****************************************************************** -// * KTIMER (Timer Object) -// ****************************************************************** -typedef struct _KTIMER -{ - DISPATCHER_HEADER Header; // 0x00 - ULARGE_INTEGER DueTime; // 0x10 - LIST_ENTRY TimerListEntry; // 0x18 - struct _KDPC *Dpc; // 0x20 - LONG Period; // 0x24 -} -KTIMER, *PKTIMER; - -// ****************************************************************** -// * PKSTART_ROUTINE -// ****************************************************************** -// * -// * NOTE: Non-standard call. Similar to stdcall, but first argument -// * must be located at ebp+4 before calling. -// * -// * This is different from the NT version: 2 parameters as -// * opposed to 1. -// * -// ****************************************************************** -typedef VOID (NTAPI *PKSTART_ROUTINE) -( - IN PVOID StartContext1, - IN PVOID StartContext2 -); - -struct _KDPC; - -// ****************************************************************** -// * PKDEFERRED_ROUTINE -// ****************************************************************** -typedef VOID (*PKDEFERRED_ROUTINE) -( - IN struct _KDPC *Dpc, - IN PVOID DeferredContext, - IN PVOID SystemArgument1, - IN PVOID SystemArgument2 -); - -// ****************************************************************** -// * KDPC (Deferred Procedure Call (DPC) Object) -// ****************************************************************** -typedef struct _KDPC -{ - CSHORT Type; // 0x00 - UCHAR Number; // 0x02 - UCHAR Importance; // 0x03 - LIST_ENTRY DpcListEntry; // 0x04 - PKDEFERRED_ROUTINE DeferredRoutine; // 0x0C - PVOID DeferredContext; - PVOID SystemArgument1; - PVOID SystemArgument2; -} -KDPC, *PKDPC; - -// ****************************************************************** -// * KOBJECTS -// ****************************************************************** -typedef enum _KOBJECTS -{ - DpcObject = 0x13, -} -KOBJECTS, *PKOBJECTS; - -// ****************************************************************** -// * RTL_CRITICAL_SECTION -// ****************************************************************** -typedef struct _RTL_CRITICAL_SECTION -{ - DWORD Unknown[4]; // 0x00 - LONG LockCount; // 0x10 - LONG RecursionCount; // 0x14 - ULONG OwningThread; // 0x18 -} -RTL_CRITICAL_SECTION, *PRTL_CRITICAL_SECTION; - -// ****************************************************************** -// * NT_TIB -// ****************************************************************** -typedef struct _NT_TIB -{ - struct _EXCEPTION_REGISTRATION_RECORD *ExceptionList; // 0x00 - PVOID StackBase; // 0x04 - PVOID StackLimit; // 0x08 - PVOID SubSystemTib; // 0x0C - union - { - PVOID FiberData; // 0x10 for TIB - ULONG Version; // 0x10 for TEB (?) - } - u_a; - PVOID ArbitraryUserPointer; // 0x14 - struct _NT_TIB *Self; // 0x18 -} -NT_TIB, *PNT_TIB; - -// ****************************************************************** -// * KTHREAD -// ****************************************************************** -// * -// * NOTE: INCOMPLETE!! -// * -// ****************************************************************** -typedef struct _KTHREAD -{ - UCHAR UnknownA[0x28]; - PVOID TlsData; // 0x28 - UCHAR UnknownB[0xE4]; // 0x2C -} -KTHREAD, *PKTHREAD; - -// ****************************************************************** -// * ETHREAD -// ****************************************************************** -// * -// * NOTE: INCOMPLETE!! -// * -// ****************************************************************** -typedef struct _ETHREAD -{ - struct _KTHREAD Tcb; - UCHAR UnknownA[0x1C]; // 0x110 - DWORD UniqueThread; // 0x12C -} -ETHREAD, *PETHREAD; - -// ****************************************************************** -// * KPCRB -// ****************************************************************** -// * -// * NOTE: INCOMPLETE!! -// * -// ****************************************************************** -typedef struct _KPRCB -{ - struct _KTHREAD* CurrentThread; // 0x00, KPCR : 0x28 - struct _KTHREAD* NextThread; // 0x04, KPCR : 0x2C - struct _KTHREAD* IdleThread; // 0x08, KPCR : 0x30 - - // This is the total size of the structure (presumably) - UCHAR Unknown[0x250]; // 0x0C, KPCR : 0x34 -} -KPRCB, *PKPRCB; - -// ****************************************************************** -// * KPCR -// ****************************************************************** -// * -// * NOTE: KPCR is the structure which exists at the FS: segment. -// * -// ****************************************************************** -typedef struct _KPCR -{ - struct _NT_TIB NtTib; // 0x00 - struct _KPCR *SelfPcr; // 0x1C - struct _KPRCB *Prcb; // 0x20 - UCHAR Irql; // 0x24 - struct _KPRCB PrcbData; // 0x28 -} -KPCR, *PKPCR; - -// ****************************************************************** -// * EEPROM_INDEX -// ****************************************************************** -typedef enum _EEPROM_INDEX -{ - EEPROM_MISC = 0x11 -} -EEPROM_INDEX, *PEEPROM_INDEX; - -// ****************************************************************** -// * XBOX_HARDWARE_INFO -// ****************************************************************** -typedef struct _XBOX_HARDWARE_INFO -{ - ULONG Flags; - UCHAR Unknown1; - UCHAR Unknown2; - UCHAR Unknown3; - UCHAR Unknown4; -} -XBOX_HARDWARE_INFO; - -// ****************************************************************** -// * TIME_FIELDS -// ****************************************************************** -typedef struct _TIME_FIELDS -{ - USHORT Year; - USHORT Month; - USHORT Day; - USHORT Hour; - USHORT Minute; - USHORT Second; - USHORT Millisecond; - USHORT Weekday; -} -TIME_FIELDS, *PTIME_FIELDS; - -// ****************************************************************** -// * READ_REGISTER_UCHAR -// ****************************************************************** -// * -// * Use this to access I/O mapped memory. Just a good standard. -// * -// ****************************************************************** -INLINE static UCHAR READ_REGISTER_UCHAR(PUCHAR Address) -{ - return *(volatile UCHAR *)Address; -} - -// ****************************************************************** -// * READ_REGISTER_USHORT -// ****************************************************************** -// * -// * Use this to access I/O mapped memory. Just a good standard. -// * -// ****************************************************************** -INLINE static USHORT READ_REGISTER_USHORT(PUSHORT Address) -{ - return *(volatile USHORT *)Address; -} - -// ****************************************************************** -// * READ_REGISTER_ULONG -// ****************************************************************** -// * -// * Use this to access I/O mapped memory. Just a good standard. -// * -// ****************************************************************** -INLINE static ULONG READ_REGISTER_ULONG(PULONG Address) -{ - return *(volatile ULONG *)Address; -} - -// ****************************************************************** -// * WRITE_REGISTER_UCHAR -// ****************************************************************** -// * -// * Use this to access I/O mapped memory (without this, writing a -// * value and then reading it back can produce an incorrect result -// * because the write may not be completed yet.) -// * -// ****************************************************************** -static VOID WRITE_REGISTER_UCHAR(PVOID Address, UCHAR Value) -{ - __asm - { - mov edx, Address - mov ah, Value - mov [edx], ah - lock or Address, edx - }; -} - -// ****************************************************************** -// * WRITE_REGISTER_USHORT -// ****************************************************************** -// * -// * Use this to access I/O mapped memory (without this, writing a -// * value and then reading it back can produce an incorrect result -// * because the write may not be completed yet.) -// * -// ****************************************************************** -static VOID WRITE_REGISTER_USHORT(PVOID Address, USHORT Value) -{ - __asm - { - mov edx, Address - mov ax, Value - mov [edx], ax - lock or Address, edx - }; -} - -// ****************************************************************** -// * WRITE_REGISTER_ULONG -// ****************************************************************** -// * -// * Use this to access I/O mapped memory (without this, writing a -// * value and then reading it back can produce an incorrect result -// * because the write may not be completed yet.) -// * -// ****************************************************************** -static VOID WRITE_REGISTER_ULONG(PVOID Address, ULONG Value) -{ - __asm - { - mov edx, Address - mov eax, Value - mov [edx], eax - lock or Address, edx - }; -} - -// ****************************************************************** -// * Debug -// ****************************************************************** -#include "dbg.h" - -// ****************************************************************** -// * Executive -// ****************************************************************** -#include "ex.h" - -// ****************************************************************** -// * Hardware Abstraction Layer -// ****************************************************************** -#include "hal.h" - -// ****************************************************************** -// * I/O Manager -// ****************************************************************** -#include "io.h" - -// ****************************************************************** -// * Kernel -// ****************************************************************** -#include "kernel.h" - -// ****************************************************************** -// * Memory Manager -// ****************************************************************** -#include "mm.h" - -// ****************************************************************** -// * NT -// ****************************************************************** -#include "nt.h" - -// ****************************************************************** -// * Object Manager -// ****************************************************************** -#include "ob.h" - -// ****************************************************************** -// * Process Structure -// ****************************************************************** -#include "ps.h" - -// ****************************************************************** -// * Run-time Library -// ****************************************************************** -#include "rtl.h" - -// ****************************************************************** -// * XBox -// ****************************************************************** -#include "xbox.h" - -#if defined(__cplusplus) -} -#endif - -#endif - - diff --git a/import/OpenXDK/include/xgfx2d/bitmap.h b/import/OpenXDK/include/xgfx2d/bitmap.h deleted file mode 100644 index 71108959b..000000000 --- a/import/OpenXDK/include/xgfx2d/bitmap.h +++ /dev/null @@ -1,58 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : bitmap.h -// * -// * note : Simple 2D Bitmap library -// * -// ****************************************************************** - -#ifndef XBITMAP_H -#define XBITMAP_H - -#include "openxdk.h" - -#if defined(__cplusplus) -extern "C" -{ -#endif - - -//you shouldn't need to mess with this if you use the functions in this lib, -//but feel free to :) -//data = the raw 32-bit bitmap data -//w = width in pixels -//h = height in pixels -//pitch = memory distance between rows, in pixels (you don't need to care) - -typedef struct -{ - uint32 *data; - int w, h; - int pitch; // pitch is in pixels, not bytes as many libs do - // will in most cases be same as w -} Bitmap; - - -//creates a 32-bit bitmap, sized WxH -Bitmap *create_bitmap(int w, int h); - -//gets the screen bitmap, so you can draw to it easily -//you have to have inited VGA before calling this -//also currently UNTESTED, but should work :D -Bitmap *get_screen_bitmap(); - -//destroys a bitmap -void destroy_bitmap(Bitmap *bmp); - -//image loaders -Bitmap *load_tga(char *filename); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/import/OpenXDK/include/xgfx2d/blit.h b/import/OpenXDK/include/xgfx2d/blit.h deleted file mode 100644 index 5d41ab525..000000000 --- a/import/OpenXDK/include/xgfx2d/blit.h +++ /dev/null @@ -1,62 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : blit.c -// * -// * note : blitter with clipping, uses any one of the blitters from -// * blitters.h per scanline -// * -// ****************************************************************** - -#ifndef XBLIT_H -#define XBLIT_H - -#include -#include "xgfx2d/bitmap.h" - -#if defined(__cplusplus) -extern "C" -{ -#endif - - -// INSTRUCTIONS -// ************ -// pass in a blitter from blitters.h -// dx,dy = destination x,y -// sx,sy = source x,y -// sw,sh = width and height of the copy -// blitter = copying method, check blitters.h -// parameter = if a blitter method needs a parameter pass it here, -// else pass 0 -// Sample: -// blit(source,dest,10,10,0,0,20,20,alphavalue_blit,128) -// will blit the topleft 20x20 of source to 10,10 in dest, -// blended ~50% (128/255) -void blit(Bitmap *dest, Bitmap *src, - int dx, int dy, - int sx, int sy, int sw, int sh, - void (*blitter)(uint32*,uint32*,int,int), - int parameter); - -// just copies entire source bitmap to 0,0 of dest -void full_blit(Bitmap *dest, Bitmap *src, - void (*blitter)(uint32*,uint32*,int,int), - int parameter); - -// shortcut to copy entire source bitmap to a coordinate in dest -// use for simple sprites -void blit_at(Bitmap *dest, Bitmap *src, - int x, int y, - void (*blitter)(uint32*,uint32*,int,int), - int parameter); - - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/import/OpenXDK/include/xgfx2d/blitters.h b/import/OpenXDK/include/xgfx2d/blitters.h deleted file mode 100644 index 4e1c47f1a..000000000 --- a/import/OpenXDK/include/xgfx2d/blitters.h +++ /dev/null @@ -1,51 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : blitters.h -// * -// * note : A bunch of fast MMX blitters of various kinds -// * Alpha blending, additive blending, you name it -// * Many non-ASM substitutes needs writing if we're gonna -// * support GNU C -// * -// ****************************************************************** - -#ifndef XBLITTERS_H -#define XBLITTERS_H - -#include -#include "xgfx2d/bitmap.h" - -#if defined(__cplusplus) -extern "C" -{ -#endif - -#define DECLARE_BLITTER(name,parameter) \ - void name (uint32 *s, uint32 *d, int len, int parameter) - - -//you're supposed to pass these ones into blit, check blit.h - -DECLARE_BLITTER(normal_blit,none); //just a straight blit -DECLARE_BLITTER(sprite_blit,none); //ignores 0xFF00FF -DECLARE_BLITTER(additive_blit,none); //adds images together -DECLARE_BLITTER(additive_alpha_blit,alpha); //adds image multiplied with alpha to the other one -DECLARE_BLITTER(alpha_blit,none); //alpha from image! yes, a true alpha blender -DECLARE_BLITTER(alphavalue_blit,alpha); //1 alpha value for the entire image -DECLARE_BLITTER(alphavalue_sprite_blit,none); //1 alpha value for the entire image, ignores black -DECLARE_BLITTER(alphavalue50_blit,none); //50% alpha value for the entire image (faster?) -DECLARE_BLITTER(multiply_blit,none); //like multiply in photoshop -DECLARE_BLITTER(invert_blit,none); //odd :) -DECLARE_BLITTER(subtractive_blit,none); //subtracts one image from the other -DECLARE_BLITTER(colorize_sprite_blit,color); //uhm, for drawing colored fonts - -#if defined(__cplusplus) -} -#endif - -#endif - diff --git a/import/OpenXDK/include/xgfx2d/charmap.h b/import/OpenXDK/include/xgfx2d/charmap.h deleted file mode 100644 index e49c04b5d..000000000 --- a/import/OpenXDK/include/xgfx2d/charmap.h +++ /dev/null @@ -1,129 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : charmap.h -// * -// * note : Character map format : U16 per entry -// * -// * TxPPPIII_CCCCCCCC -// * T = character touched flag -// * x = unused -// * P = paper colour -// * I = Ink colour -// * C = character -// * -// ****************************************************************** - -#ifndef __CHARMAP_H_ -#define __CHARMAP_H_ - -#include -#include - -#if defined(__cplusplus) -extern "C" -{ -#endif - - - -// ************************************************************************************************************** -// -// constants: #defines, enums etc. -// -// ************************************************************************************************************** -#define CHARMAP_DEBUG 0x80000000 // character map debug mode, force update after every write - // slow, but visible. Does NOT update on single character outs - -#define MAP_TOUCHED 0x8000 // this character has been touched, and needs redrawing - -#define FONT_WIDTH 8 // our assumed character width -#define FONT_HEIGHT 15 // and height. These could be variable for user fonts - -#define CHARMAP_BLACK (0) // Genaral character attribute colours -#define CHARMAP_BLUE (1) -#define CHARMAP_GREEN (2) -#define CHARMAP_RED (3) -#define CHARMAP_CYAN (4) -#define CHARMAP_YELLOW (5) -#define CHARMAP_PINK (6) -#define CHARMAP_WHITE (7) - -#define INK_BLACK (0<<8) // INK attribute colours -#define INK_BLUE (1<<8) -#define INK_GREEN (2<<8) -#define INK_RED (3<<8) -#define INK_CYAN (4<<8) -#define INK_YELLOW (5<<8) -#define INK_PINK (6<<8) -#define INK_WHITE (7<<8) - -#define PAPER_BLACK (0<<11) // PAPER attribute colours -#define PAPER_BLUE (1<<11) -#define PAPER_GREEN (2<<11) -#define PAPER_RED (3<<11) -#define PAPER_CYAN (4<<11) -#define PAPER_YELLOW (5<<11) -#define PAPER_PINK (6<<11) -#define PAPER_WHITE (7<<11) - -// ************************************************************************************************************** -// -// Structures -// -// ************************************************************************************************************** - -// Charmap structure -typedef struct SCharMap -{ - u32 Flags; // system flags and options - u8* pBitmap; // pointer to our screen bitmap (pix width*pix height) - u16* pCharMap; // pointer to actuall character array - s32 x,y; // screen X,Y - s32 width,height; // width and height - s32 pixwidth,pixheight; // pixel width and height - - u16 attrib_char; // clear attrib and character - - s32 curx,cury; // current Cursor X,Y - s32 wx1,wy1,wx2,wy2; // Text window - -}SCharMap,*PCharMap; - - - - - - -// ************************************************************************************************************** -// -// Public functions -// -// ************************************************************************************************************** -void charmap_init( s32 baseX, s32 baseY, s32 width, s32 height ); -void charmap_set_flags( u32 flags ); -void charmap_display( void ); -void charmap_clear( void ); -void charmap_print( char *pStr ); -void charmap_printf( const char *format, ...); -void charmap_printat( s32 x, s32 y, char *pStr ); -void charmap_outchar( char Ch ); -void charmap_newline( void ); -void charmap_scroll_window( void ); -void charmap_setink( u8 ink ); -void charmap_setpaper( u8 paper ); -void charmap_set_window( s32 x1,s32 y1,s32 x2, s32 y2 ); -void charmap_home( void ); -void charmap_move_cursor( s32 x, s32 y); - - - -#if defined(__cplusplus) -} -#endif - -#endif //__CHARMAP_H_ - diff --git a/import/OpenXDK/include/xgfx2d/drawprim.h b/import/OpenXDK/include/xgfx2d/drawprim.h deleted file mode 100644 index 60484db01..000000000 --- a/import/OpenXDK/include/xgfx2d/drawprim.h +++ /dev/null @@ -1,66 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : drawprim.h -// * -// * note : A bunch of drawing primitives -// * -// ****************************************************************** - - -#ifndef XDRAWPRIM_H -#define XDRAWPRIM_H - -#include -#include "xgfx2d/bitmap.h" - -#if defined(__cplusplus) -extern "C" -{ -#endif - -//simple straightforward functions -void clear(Bitmap *bmp, uint32 col); -void putpixel(Bitmap *bmp, int x, int y, uint32 color); -void line(Bitmap *bmp, int x1, int y1, int x2, int y2, uint32 color); - -//horizontal line from x1 to x2 at y -void hline(Bitmap *bmp, int x1, int y, int x2, uint32 color); -//vertical line from y1 to y2 at x -void vline(Bitmap *bmp, int x, int y1, int y2, uint32 color); - -//rectangle (boundary) -void rect(Bitmap *bmp, int x1, int y1, int x2, int y2, uint32 color); - -//filled rectangle -void rectfill(Bitmap *bmp, int x1, int y1, int x2, int y2, uint32 color); - -//circle (not filled) -void circle(Bitmap *bmp, int x, int y, int radius, uint32 color); - -//more advanced stuff: - -//antialiased pixel -//use this for smooth scrolling starfields and stuff :) -//this one takes floats -void aa_pixel_float(Bitmap *bmp, float x,float y,int color); -//this one takes x and y in 16.16 fixed point (slightly faster) -void aa_pixel(Bitmap *bmp, int x, int y, int color); - -// draws a single alpha blended pixel, used by bilinear_pixel and aa_line -//this one takes x and y in 16.16 fixed point -void alpha_pixel(Bitmap *bmp, int x, int y, uint32 sc, int alpha); - -// nice antialiased line drawer -// alpha from 0..255, means transparency -void aa_line(Bitmap *bmp, float x1, float y1, float x2, float y2, uint32 color, int alpha); - -#if defined(__cplusplus) -} -#endif - -#endif - diff --git a/import/OpenXDK/include/xhal/xfile.h b/import/OpenXDK/include/xhal/xfile.h deleted file mode 100644 index 779abb36d..000000000 --- a/import/OpenXDK/include/xhal/xfile.h +++ /dev/null @@ -1,154 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : xfile.h -// * -// * note : XBox File Access -// * -// ****************************************************************** -// * TODO: most of this belongs in a different .h -// ****************************************************************** -#ifndef XFILE_H -#define XFILE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "xboxkrnl\xboxkrnl.h" - -#define INVALID_HANDLE_VALUE ((HANDLE)-1) -#define INVALID_FILE_SIZE ((HANDLE)-1) -#define DELETE (0x00010000L) - -#ifndef PAGE_SIZE -#define PAGE_SIZE 4096 -#endif -#define ALIGN_SIZE (0x10000) // NT's allocation alignment size (64k) - -// PAGE_ALIGN: -// Returns an address rounded down to the nearest page boundary. -// Differences from NT: None. -#define NT_SUCCESS(Status) ((NTSTATUS) (Status) >= 0) -#define PAGE_ALIGN(Va) ((PVOID)((ULONG_PTR)(Va) & ~(PAGE_SIZE - 1))) - - -// Initializes an OBJECT_ATTRIBUTES. I added this because it's familiar to -// NT kernel mode programmers. I just changed it to the XBOX style. -// Works as if it were this function: -#define InitializeObjectAttributes( p, n, a, r ) { \ - (p)->RootDirectory = r; \ - (p)->Attributes = a; \ - (p)->ObjectName = n; \ - } - - -//unsure where these really belong -#define MAX_PATH (2048) -#define ERROR_NEGATIVE_SEEK (131) -#define ERROR_INVALID_NAME (123) -#define ERROR_OPEN_FAILED (110) -#define ERROR_DRIVE_LOCKED (108) -#define ERROR_HANDLE_DISK_FULL (39) -#define ERROR_ALREADY_EXISTS (183) -#define ERROR_INVALID_PARAMETER (1) -#define ERROR_FILE_NOT_FOUND (2) -#define ERROR_TOO_MANY_OPEN_FILES (4) -#define ERROR_INVALID_HANDLE (6) -#define ERROR_NOT_ENOUGH_MEMORY (0x100000) -#define NO_ERROR (0) - -typedef char* LPCSTR; - -// ============================================== -// end stuff that belong in some xboxwindows.h -// ============================================== - -// these structs need to be here as they are used as parameters -typedef struct SSecurity_Attributes{ - u32 nLength; - void* lpSecurityDescriptor; - u32 bInheritHandle; -} SSecurity_Attributes, *PSecurity_Attributes ; - - -typedef struct _OVERLAPPED { - u32 Internal; - u32 InternalHigh; - u32 Offset; - u32 OffsetHigh; - HANDLE hEvent; -} OVERLAPPED, *LPOVERLAPPED; - - -// Standard -#define FILE_FLAG_WRITE_THROUGH (0x80000000) -#define FILE_FLAG_OVERLAPPED (0x40000000) -#define FILE_FLAG_NO_BUFFERING (0x20000000) -#define FILE_FLAG_RANDOM_ACCESS (0x10000000) -#define FILE_FLAG_SEQUENTIAL_SCAN (0x08000000) -#define FILE_FLAG_DELETE_ON_CLOSE (0x04000000) -#define FILE_FLAG_BACKUP_SEMANTICS (0x02000000) -#define FILE_FLAG_POSIX_SEMANTICS (0x01000000) -#define FILE_FLAG_OPEN_REPARSE_POINT (0x00200000) -#define FILE_FLAG_OPEN_NO_RECALL (0x00100000) - -#define CREATE_NEW (0x00000001) -#define CREATE_ALWAYS (0x00000002) -#define OPEN_EXISTING (0x00000003) -#define OPEN_ALWAYS (0x00000004) -#define TRUNCATE_EXISTING (0x00000005) - - -#define GENERIC_READ (0x80000000) -#define GENERIC_WRITE (0x40000000) - -#define FILE_BEGIN (0x00000000) -#define FILE_CURRENT (0x00000001) -#define FILE_END (0x00000002) - - -HANDLE CreateFile(char* lpFilename, - u32 dwDesiredAccess, - u32 dwShareMode, - SSecurity_Attributes *lpSecurityAttributes, - u32 dwCreationDisposition, - u32 dwFlagsAndAttributes, - HANDLE hTemplateFile - ); -int ReadFile( HANDLE hFile, // file handle - void* lpBuffer, // Dest buffer to put file - u32 nNumberOfBytesToRead, // read "n" bytes - u32* lpNumberOfBytesRead, // pointer to a place to store bytes read - LPOVERLAPPED lpOverlapped // NULL unless overlap - ); - -int WriteFile( HANDLE hFile, - PVOID lpBuffer, - u32 nNumberOfBytesToWrite, - u32* lpNumberOfBytesWritten, - LPOVERLAPPED lpOverlapped - ); - -int CloseHandle(HANDLE Handle); -int GetFileSizeEx(HANDLE hFile, PLARGE_INTEGER lpFileSize); -int SetFilePointerEx(HANDLE hFile, LARGE_INTEGER liDistanceToMove, PLARGE_INTEGER lpNewFilePointer, DWORD dwMoveMethod); - - - -char* GetLastErrorMessage( void ); -void SetLastError( u32 ErrorCode ); - - -#ifdef __cplusplus -}; -#endif - -#endif - - - - diff --git a/import/OpenXDK/include/xhal/xfile_def.h b/import/OpenXDK/include/xhal/xfile_def.h deleted file mode 100644 index 91a63ff31..000000000 --- a/import/OpenXDK/include/xhal/xfile_def.h +++ /dev/null @@ -1,108 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : xfile_def.h -// * -// * note : internal typedefs / structs / etc for xfile -// * -// ****************************************************************** -#ifndef XFILE_DEF_H -#define XFILE_DEF_H - -#ifdef __cplusplus -extern "C" { -#endif - -// DEVICE_TYPEs (I took a guess as to which the XBOX might have.) -#define FILE_DEVICE_CD_ROM (0x00000002) -#define FILE_DEVICE_CD_ROM_FILE_SYSTEM (0x00000003) -#define FILE_DEVICE_CONTROLLER (0x00000004) -#define FILE_DEVICE_DISK (0x00000007) -#define FILE_DEVICE_DISK_FILE_SYSTEM (0x00000008) -#define FILE_DEVICE_FILE_SYSTEM (0x00000009) -#define FILE_DEVICE_NULL (0x00000015) -#define FILE_DEVICE_SCREEN (0x0000001c) -#define FILE_DEVICE_SOUND (0x0000001d) -#define FILE_DEVICE_UNKNOWN (0x00000022) -#define FILE_DEVICE_VIDEO (0x00000023) -#define FILE_DEVICE_VIRTUAL_DISK (0x00000024) -#define FILE_DEVICE_FULLSCREEN_VIDEO (0x00000034) - -#define FILE_ATTRIBUTE_READONLY (0x00000001) -#define FILE_ATTRIBUTE_HIDDEN (0x00000002) -#define FILE_ATTRIBUTE_SYSTEM (0x00000004) -#define FILE_ATTRIBUTE_DIRECTORY (0x00000010) -#define FILE_ATTRIBUTE_ARCHIVE (0x00000020) -#define FILE_ATTRIBUTE_NORMAL (0x00000080) -#define FILE_ATTRIBUTE_TEMPORARY (0x00000100) -#define FILE_FLAG_WRITE_THROUGH (0x80000000) -#define FILE_FLAG_RANDOM_ACCESS (0x10000000) - -// NtCreateFile/NtOpenFile stuff -#define FILE_SUPERSEDED 0x00000000 -#define FILE_OPENED 0x00000001 -#define FILE_CREATED 0x00000002 -#define FILE_OVERWRITTEN 0x00000003 -#define FILE_EXISTS 0x00000004 -#define FILE_DOES_NOT_EXIST 0x00000005 - -// Flags for OBJECT_ATTRIBUTES::Attributes -#define OBJ_INHERIT (0x00000002L) -#define OBJ_PERMANENT (0x00000010L) -#define OBJ_EXCLUSIVE (0x00000020L) -#define OBJ_CASE_INSENSITIVE (0x00000040L) -#define OBJ_OPENIF (0x00000080L) -#define OBJ_OPENLINK (0x00000100L) -#define OBJ_KERNEL_HANDLE (0x00000200L) -#define OBJ_VALID_ATTRIBUTES (0x000003F2L) - -// ****************************************************************** -// * File pointer information (SetFilePointer, etc) -// ****************************************************************** -typedef struct _FILE_POSITION_INFORMATION -{ - LARGE_INTEGER CurrentByteOffset; -} -FILE_POSITION_INFORMATION, *PFILE_POSITION_INFORMATION; - -// ****************************************************************** -// * Access times and normal attributes (only set is known to be -// * supported - use FILE_NETWORK_OPEN_INFORMATION if you want to -// * query this information. -// ****************************************************************** -typedef struct _FILE_BASIC_INFORMATION -{ - LARGE_INTEGER CreationTime; - LARGE_INTEGER LastAccessTime; - LARGE_INTEGER LastWriteTime; - LARGE_INTEGER ChangeTime; - ULONG FileAttributes; -} -FILE_BASIC_INFORMATION, *PFILE_BASIC_INFORMATION; - -// ****************************************************************** -// * Access times and normal attributes -// ****************************************************************** -typedef struct _FILE_NETWORK_OPEN_INFORMATION -{ - LARGE_INTEGER CreationTime; // 000 Time file was created - LARGE_INTEGER LastAccessTime; // 008 Time file was last accessed - LARGE_INTEGER LastWriteTime; // 010 Time file was last opened for writing? - LARGE_INTEGER ChangeTime; // 018 Time file was last changed? - LARGE_INTEGER AllocationSize; // 020 Size of the file in the file system (including slack space) - LARGE_INTEGER EndOfFile; // 028 What we'd normally call the file size - ULONG FileAttributes; // 030 File attributes - ULONG Unknown; // 034 Unknown -} -FILE_NETWORK_OPEN_INFORMATION, *PFILE_NETWORK_OPEN_INFORMATION; - -LARGE_INTEGER AddU64(PLARGE_INTEGER A, PLARGE_INTEGER B); - -#ifdef __cplusplus -}; -#endif - -#endif // XFILE_DEF_H diff --git a/import/OpenXDK/include/xhal/xhal.h b/import/OpenXDK/include/xhal/xhal.h deleted file mode 100644 index 4df70d753..000000000 --- a/import/OpenXDK/include/xhal/xhal.h +++ /dev/null @@ -1,44 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : xhal.h -// * -// * note : XBox Hardware Abstraction Layer -// * -// ****************************************************************** -#ifndef XHAL_H -#define XHAL_H - -#if defined(__cplusplus) -extern "C" -{ -#endif - -// ****************************************************************** -// * XVGA -// ****************************************************************** -#include "xvga.h" - -// ****************************************************************** -// * XFile -// ****************************************************************** -#include "xfile.h" - -// ****************************************************************** -// * XOHCI -// ****************************************************************** -#include "xohci.h" - -// ****************************************************************** -// * The user application starts here -// ****************************************************************** -extern VOID XBoxStartup(); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/import/OpenXDK/include/xhal/xnvidia.h b/import/OpenXDK/include/xhal/xnvidia.h deleted file mode 100644 index 0201b4cb9..000000000 --- a/import/OpenXDK/include/xhal/xnvidia.h +++ /dev/null @@ -1,282 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : xnvidia.h -// * -// * note : XBox NVidia Chip -// * -// ****************************************************************** -#ifndef XNVIDIA_H -#define XNVIDIA_H - -#ifdef __cplusplus -extern "C" { -#endif - -// ****************************************************************** -// * Accessible Functions -// ****************************************************************** -void NVSetScreenAddress(void); -void NVSetBPP(int mode); -int NVSetVideoMode(u32 dwResolution, u32 dwPixelFormat ); -int NVSetFlickerFilter(DWORD dwLevel); -void NVSetClippingRectangle(u32 x1,u32 y1,u32 x2,u32 y2); - -// ****************************************************************** -// * AvSetDisplayMode pixel formats -// ****************************************************************** -#define PIXEL_16BITS_555 0x10 -#define PIXEL_16BITS_565 0x11 -#define PIXEL_32BITS 0x12 - -// ****************************************************************** -// * AvSetDisplayMode resolutions (only 640 is tested) -// ****************************************************************** -#define RESOLUTION_640 0x20010101 -#define RESOLUTION_720 0x20020101 -#define RESOLUTION_800 0x20030101 -#define RESOLUTION_1024 0x200B0101 - -// ****************************************************************** -// * Parameters for AvSendTVEncoderOption -// ****************************************************************** -#define AV_OPTION_SET_MACROVISION 0x01 -#define AV_OPTION_CONFIRM_MACROVISION 0x0A -#define AV_OPTION_SET_FLICKER_FILTER 0x0B - -// ****************************************************************** -// * NVidia registers base / offsets -// ****************************************************************** -#define NV_REGBASE (0xFD000000) -#define NV_PMC (0x000000) -#define NV_PFIFO (0x002000) -#define NV_FB (0x100000) -#define NV_EXTDEV (0x101000) -#define NV_CRTC (0x600000) -#define NV_RAMDAC (0x680000) -#define NV_FIFO (0x800000) - -// ****************************************************************** -// * CRTC register accessors -// ****************************************************************** -#define CRTC_WRITE(a,b) *((volatile u8*) (NV_REGBASE + NV_CRTC + (a))) = (b) -#define CRTC_READ(a) (*((volatile u8*) (NV_REGBASE + NV_CRTC + (a)))) -#define CRTC_WRITEL(a,b) *((volatile u32*) (NV_REGBASE + NV_CRTC + (a))) = (b) -#define CRTC_READL(a) (*((volatile u32*) (NV_REGBASE + NV_CRTC + (a)))) - -// ****************************************************************** -// * Macros to get pointers to FIFO regs -// ****************************************************************** -#define NVPTR_ROP ((PNV_ROP)(NV_REGBASE + NV_FIFO + 0x0000)) -#define NVPTR_PATTERN ((PNV_PATTERN)(NV_REGBASE + NV_FIFO + 0x4000)) -#define NVPTR_CLIP ((PNV_CLIP)(NV_REGBASE + NV_FIFO + 0x2000)) -#define NVPTR_SCREENBLT ((PNV_SCREENBLT)(NV_REGBASE + NV_FIFO + 0x8000)) -#define NVPTR_BLIT ((PNV_BLIT)(NV_REGBASE + NV_FIFO + 0x6000)) -#define NVPTR_BITMAP ((PNV_BITMAP)(NV_REGBASE + NV_FIFO + 0xA000)) -#define NVPTR_LINE ((PNV_LINE)(NV_REGBASE + NV_FIFO + 0xC000)) - -// ****************************************************************** -// * Registers -// ****************************************************************** -#define NV_INPUT_STATUS (0x13DA) -#define NV_CRTC_FB_ADDR (0x800) // Display start address -#define NV_CRTC_INDEX (0x13D4) -#define NV_CRTC_DATA (0x13D5) -#define NV_CRTC_REGS_LOCK 0x1F -#define NV_CRTC_UNLOCK_VALUE 0x57 -#define NV_CRTC_LOCK_VALUE 0x99 -#define NV_CRTC_PIXEL (0x28) - -// ****************************************************************** -// * Pixel / TV Mode bits -// ****************************************************************** -#define NV_TV 0x80 -#define NV_VGA 0x00 -#define NV_PAL 0x40 -#define NV_NTSC 0x00 -#define NV_VGA 0x00 // format -#define NV_8BPP 0x01 -#define NV_16BPP 0x02 -#define NV_32BPP 0x03 -#define NV_BPP_MASK (~0x03) // - - -//-- FIFO Regs ----------------------------------------------------------------- - -// Macro to wait until the GPU has enough FIFO slots -#define NV_WAIT_FIFO(Ptr, Cnt) while( ( ((Ptr)->FifoFree) / 4) < (Cnt) ); - -// FIFO + 0x0000 -typedef volatile struct -{ - ULONG Reserved0[4]; - USHORT FifoFree; - USHORT Unused; - ULONG Reserved1[0x0BB]; - ULONG Rop3; -} NV_ROP, *PNV_ROP; - -// FIFO + 0x4000 -typedef volatile struct -{ - ULONG Reserved0[4]; - USHORT FifoFree; - USHORT Unused; - ULONG Reserved1[0x0BD]; - ULONG Shape; - ULONG Reserved2[0x001]; - ULONG Color0; - ULONG Color1; - ULONG Monochrome[2]; -} NV_PATTERN, *PNV_PATTERN; - -// FIFO + 0x2000 -typedef volatile struct -{ - ULONG Reserved0[4]; - USHORT FifoFree; - USHORT Unused; - ULONG Reserved1[0x0BB]; - ULONG TopLeft; - ULONG WidthHeight; -} NV_CLIP, *PNV_CLIP; - -/* -typedef volatile struct -{ - ULONG Reserved0[4]; - USHORT FifoFree; - USHORT Unused[1]; - ULONG Reserved1[0x0BC]; - ULONG Color; - ULONG Reserved3[0x03E]; - ULONG TopLeft; - ULONG WidthHeight; -} NV_RECTANGLE, *PNV_RECTANGLE; -*/ - -// FIFO + 0x8000 -typedef volatile struct -{ - ULONG Reserved0[4]; - USHORT FifoFree; - USHORT Unused; - ULONG Reserved1[0x0BB]; - ULONG TopLeftSrc; - ULONG TopLeftDst; - ULONG WidthHeight; -} NV_SCREENBLT, *PNV_SCREENBLT; - -// FIFO + 0x6000 -typedef volatile struct -{ - ULONG Reserved0[4]; - USHORT FifoFree; - USHORT Unused[1]; - ULONG Reserved1[0x0BC]; - ULONG TopLeft; - ULONG WidthHeight; - ULONG WidthHeightIn; - ULONG Reserved2[0x03C]; - ULONG Pixels; -} NV_BLIT, *PNV_BLIT; - -// FIFO + 0xA000 -typedef volatile struct -{ - ULONG Reserved0[4]; - USHORT FifoFree; - USHORT Unused; - ULONG Reserved1[0x0BB]; - ULONG Reserved2[0x03F]; - ULONG Color1A; - struct - { - ULONG TopLeft; - ULONG WidthHeight; - } UnclippedRectangle[64]; - ULONG Reserved3[0x07D]; - struct - { - ULONG TopLeft; - ULONG BottomRight; - } ClipB; - ULONG Color1B; - struct - { - ULONG TopLeft; - ULONG BottomRight; - } ClippedRectangle[64]; - ULONG Reserved4[0x07B]; - struct - { - ULONG TopLeft; - ULONG BottomRight; - } ClipC; - ULONG Color1C; - ULONG WidthHeightC; - ULONG PointC; - ULONG MonochromeData1C; - ULONG Reserved5[0x0F9]; - struct - { - ULONG TopLeft; - ULONG BottomRight; - } ClipD; - ULONG Color1D; - ULONG WidthHeightInD; - ULONG WidthHeightOutD; - ULONG PointD; - ULONG MonochromeData1D; - ULONG Reserved6[0x0F8]; - struct - { - ULONG TopLeft; - ULONG BottomRight; - } ClipE; - ULONG Color0E; - ULONG Color1E; - ULONG WidthHeightInE; - ULONG WidthHeightOutE; - ULONG PointE; - ULONG MonochromeData01E; -} NV_BITMAP, *PNV_BITMAP; - -// FIFO + 0xC000 -typedef volatile struct -{ - ULONG Reserved0[4]; - USHORT FifoFree; - USHORT Unused[1]; - ULONG Reserved1[0x0BC]; - ULONG Color; // source color 0304-0307 - ULONG Reserved2[0x03E]; - struct { // start aliased methods in array 0400- - ULONG Point0; // y_x S16_S16 in pixels 0- 3 - ULONG Point1; // y_x S16_S16 in pixels 4- 7 - } Lin[16]; // end of aliased methods in array -047f - struct { // start aliased methods in array 0480- - ULONG Point0X; // in pixels, 0 at left 0- 3 - ULONG Point0Y; // in pixels, 0 at top 4- 7 - ULONG Point1X; // in pixels, 0 at left 8- b - ULONG Point1Y; // in pixels, 0 at top c- f - } Lin32[8]; // end of aliased methods in array -04ff - ULONG PolyLin[32]; // y_x S16_S16 in pixels 0500-057f - struct { // start aliased methods in array 0580- - ULONG x; // in pixels, 0 at left 0- 3 - ULONG y; // in pixels, 0 at top 4- 7 - } PolyLin32[16]; // end of aliased methods in array -05ff - struct { // start aliased methods in array 0600- - ULONG Color; // source color 0- 3 - ULONG Point; // y_x S16_S16 in pixels 4- 7 - } ColorPolyLin[16]; // end of aliased methods in array -067f -} NV_LINE, *PNV_LINE; - -#ifdef __cplusplus -}; -#endif - -#endif // XNVIDIA_H diff --git a/import/OpenXDK/include/xhal/xohci.h b/import/OpenXDK/include/xhal/xohci.h deleted file mode 100644 index 6254caf26..000000000 --- a/import/OpenXDK/include/xhal/xohci.h +++ /dev/null @@ -1,293 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : xohci.h -// * -// * note : XBox USB Open Host Controller Interface -// * -// ****************************************************************** -#ifndef XOHCI_H -#define XOHCI_H - -#if defined(__cplusplus) -extern "C" -{ -#endif - -// ****************************************************************** -// * external functions -// ****************************************************************** -void xohci_init(); - -// ****************************************************************** -// * OHCI (PCI) -// ****************************************************************** -#include "xohci_pci.h" - -// ****************************************************************** -// * struct : ed (Endpoint Descriptor) -// ****************************************************************** -#pragma pack(16) -typedef struct _xohci_ed -{ - // ****************************************************************** - // * DWord 0 - // ****************************************************************** - uint32 m_function_addr : 7; - uint32 m_endpoint_numb : 4; - uint32 m_direction : 2; - uint32 m_speed : 1; - uint32 m_skip : 1; - uint32 m_format : 1; - uint32 m_max_packet_size : 11; - uint32 m_reserved0 : 5; - - // ****************************************************************** - // * DWord 1 - // ****************************************************************** - uint32 m_reserved1 : 4; - uint32 m_tail_p : 28; - - // ****************************************************************** - // * DWord 2 - // ****************************************************************** - uint32 m_halted : 1; - uint32 m_toggle_carry : 1; - uint32 m_zero_bit : 2; - uint32 m_head_p : 28; - - // ****************************************************************** - // * DWord 1 - // ****************************************************************** - uint32 m_reserved3 : 4; - uint32 m_next_ed : 28; -} -xohci_ed; -#pragma pack() - -// ****************************************************************** -// * Endpoint Descriptor Flags -// ****************************************************************** -#define ED_DIRECTION_IN 0 -#define ED_DIRECTION_OUT 1 -#define ED_SPEED_FULL 0 -#define ED_SPEED_LOW 1 - -// ****************************************************************** -// * struct : td (Transfer Descriptor) -// ****************************************************************** -// * -// * Since XBox controllers are not isochronous, we do not need -// * to support that transfer type. therefore, we also do not need -// * to align this structure to 32 bytes, as general transfer desc -// * only require 16 byte alignment -// * -// ****************************************************************** -#pragma pack(16) -typedef struct _xohci_td -{ - // ****************************************************************** - // * DWord 0 - // ****************************************************************** - uint32 m_reserved18 : 18; // (NA) - uint32 m_buffer_rounding : 1; // (RO) R - uint32 m_direction_pid : 2; // (RO) DP - uint32 m_delay_int : 3; // (RO) DI - uint32 m_data_toggle : 2; // (RW) T - uint32 m_error_count : 2; // (RW) EC - uint32 m_condition_code : 4; // (RW) CC - - // ****************************************************************** - // * DWord 1 - // ****************************************************************** - uint32 m_current_buffer : 32; // (RW) CBP - - // ****************************************************************** - // * DWord 2 - // ****************************************************************** - uint32 m_zero4 : 4; // (00) Should be Zero - uint32 m_next_td : 28; // (RW) NextTD - - // ****************************************************************** - // * DWord 1 - // ****************************************************************** - uint32 m_buffer_end : 32; // (RO) BE -} -xohci_td; -#pragma pack() - -// ****************************************************************** -// * Transfer Descriptor Flags -// ****************************************************************** -#define TD_DP_SETUP 0x00 -#define TD_DP_OUT 0x01 -#define TD_DP_IN 0x02 -#define TD_T_DATA0 0x02 -#define TD_T_DATA1 0x03 -#define TD_T_TOGGLE 0x00 - -// ****************************************************************** -// * Condition Code Values -// ****************************************************************** -#define TD_CC_NOERROR 0x0000 -#define TD_CC_CRC 0x0001 -#define TD_CC_BITSTUFFING 0x0002 -#define TD_CC_DATATOGGLEM 0x0003 -#define TD_CC_STALL 0x0004 -#define TD_DEVNOTRESP 0x0005 -#define TD_PIDCHECKFAIL 0x0006 -#define TD_UNEXPECTEDPID 0x0007 -#define TD_DATAOVERRUN 0x0008 -#define TD_DATAUNDERRUN 0x0009 -#define TD_BUFFEROVERRUN 0x000C -#define TD_BUFFERUNDERRUN 0x000D -#define TD_NOTACCESSED 0x000F - -// ****************************************************************** -// * struct : xohci_hcca (Host Controller Communications Area) -// ****************************************************************** -// * -// * Note: This must be 256-byte aligned -// * -// ****************************************************************** -#pragma pack(1) -typedef struct _xohci_hcca -{ - uint32 int_table[32]; // (RO) HccaInterruptTable - uint16 frame_number; // (WO) HccaFrameNumber - uint16 pad1; // (WO) HccaPad1 - uint32 done_head; // (WO) HccaDoneHead - uint08 reserved[116]; // (RW) Reserved for use by Host Controller - // less than 256 bytes..why? -} -xohci_hcca; -#pragma pack() - -// ****************************************************************** -// * class : ohci_regs (OHCI Host Controller Operational Registers) -// ****************************************************************** -// * -// * NOTE: These fields must be accessed using the functions: -// * -// * WRITE_REGISTER_* and READ_REGISTER_* -// * -// * NOTE: These should fall naturally on a 32 byte boundary -// * -// ****************************************************************** -typedef struct _xohci_regs -{ - uint32 hc_revision; - uint32 hc_control; - uint32 hc_cmdstatus; - uint32 hc_int_status; - uint32 hc_int_enable; - uint32 hc_int_disable; - - uint32 hc_hcca; - uint32 hc_period_cur; - uint32 hc_control_head; - uint32 hc_control_cur; - uint32 hc_bulk_head; - uint32 hc_bulk_cur; - uint32 hc_done_head; - - uint32 hc_fm_interval; - uint32 hc_fm_remaining; - uint32 hc_fm_number; - uint32 hc_periodic_start; - uint32 hc_ls_threshold; - - uint32 hc_rh_descriptor_a; - uint32 hc_rh_descriptor_b; - uint32 hc_rh_status; - uint32 hc_rh_port_status[15]; -} -xohci_regs; - -// ****************************************************************** -// * global pointer to OHCI Host Controller Operational Registers -// ****************************************************************** -// ERROR DURING LINKING -// ERROR DURING LINKING -// ERROR DURING LINKING -// ERROR DURING LINKING -// ERROR DURING LINKING - so its definition was moved to -// xohci.c -extern xohci_regs *g_xohci_regs; - -// ****************************************************************** -// * hc_control register masks -// ****************************************************************** -#define XOHCI_CTRL_CBSR (3 << 0) // control/bulk service ratio -#define XOHCI_CTRL_PLE (1 << 2) // periodic list enable -#define XOHCI_CTRL_IE (1 << 3) // isochronous enable -#define XOHCI_CTRL_CLE (1 << 4) // control list enable -#define XOHCI_CTRL_BLE (1 << 5) // bulk list enable -#define XOHCI_CTRL_HCFS (3 << 6) // host controller functional state -#define XOHCI_CTRL_IR (1 << 8) // interrupt routing -#define XOHCI_CTRL_RWC (1 << 9) // remote wakeup connected -#define XOHCI_CTRL_RWE (1 << 10) // remote wakeup enable - -// ****************************************************************** -// * pre-shifted values for HC_CONTROL_FUNCTIONAL_STATE -// ****************************************************************** -#define XOHCI_USB_RESET (0 << 6) -#define XOHCI_USB_RESUME (1 << 6) -#define XOHCI_USB_OPERATIONAL (2 << 6) -#define XOHCI_USB_SUSPEND (3 << 6) - -// ****************************************************************** -// * hc_cmdstatus register masks -// ****************************************************************** -#define XOHCI_HCR (1 << 0) // host controller reset -#define XOHCI_CLF (1 << 1) // control list filled -#define XOHCI_BLF (1 << 2) // bulk list filled -#define XOHCI_OCR (1 << 3) // ownership change request -#define XOHCI_SOC (3 << 16) // scheduling overrun count - -// ****************************************************************** -// * interrupt register masks (status/enable/disable regs) -// ****************************************************************** -#define XOHCI_INTR_SO (1 << 0) // scheduling overrun -#define XOHCI_INTR_WDH (1 << 1) // writeback of done_head -#define XOHCI_INTR_SF (1 << 2) // start frame -#define XOHCI_INTR_RD (1 << 3) // resume detect -#define XOHCI_INTR_UE (1 << 4) // unrecoverable error -#define XOHCI_INTR_FNO (1 << 5) // frame number overflow -#define XOHCI_INTR_RHSC (1 << 6) // root hub status change -#define XOHCI_INTR_OC (1 << 30) // ownership change -#define XOHCI_INTR_MIE (1 << 31) // master interrupt enable - -// ****************************************************************** -// * struct : xohci -// ****************************************************************** -// * -// * Packages up all of our variables -// * -// ****************************************************************** -typedef struct _xohci -{ - xohci_hcca *m_hcca; - uint32 m_hcca_dma; - uint32 m_disabled; -} -xohci; - -// ****************************************************************** -// * global variables -// ****************************************************************** -// ERROR DURING LINKING -// ERROR DURING LINKING -// ERROR DURING LINKING -// ERROR DURING LINKING - so its definition was moved to -// xohci.c -extern xohci g_xohci; - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/import/OpenXDK/include/xhal/xohci_pci.h b/import/OpenXDK/include/xhal/xohci_pci.h deleted file mode 100644 index 5fbe8b29d..000000000 --- a/import/OpenXDK/include/xhal/xohci_pci.h +++ /dev/null @@ -1,29 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : xohci_pci.h -// * -// * note : XBox USB Open Host Controller Interface (PCI) -// * -// ****************************************************************** -#ifndef XOHCI_PCI_H -#define XOHCI_PCI_H - -#if defined(__cplusplus) -extern "C" -{ -#endif - -// ****************************************************************** -// * external functions -// ****************************************************************** -void xohci_pci_init(); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/import/OpenXDK/include/xhal/xvga.h b/import/OpenXDK/include/xhal/xvga.h deleted file mode 100644 index ba2902443..000000000 --- a/import/OpenXDK/include/xhal/xvga.h +++ /dev/null @@ -1,119 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : xvga.h -// * -// * note : XBox VGA -// * -// ****************************************************************** -#ifndef XVGA_H -#define XVGA_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "openxdk.h" - -// ****************************************************************** -// * User Variables -// ****************************************************************** -extern u32 g_ScreenWidth; // Current Screen Width -extern u32 g_ScreenHeight; // Current Screen Height -extern u32 g_nFlags; -extern u32 g_nInk; -extern u32 g_nPaper; -extern u32 g_nFontFlags; - -// ****************************************************************** -// * ScreenInfo (returned by GetScreen()) -// ****************************************************************** -typedef struct _ScreenInfo -{ - u32 ScreenAddress; - u32 lpitch; -} -ScreenInfo; - -// ************************************************************** -// * User Functions -// ************************************************************** -void vga_init_mode(int Mode); // Init VGA screen to a selected mode -void vga_vsync(void); // Wait for vertical blank -void vga_flip(void); // Flip buffers -ScreenInfo vga_get_screen_info(void); // get screen base address - -// ************************************************************** -// * For debugging purposes (serious 2D should use xgfx2d lib) -// ************************************************************** -void vga_clear( void ); // Clear screen -void vga_box( int x1,int y1, int x2,int y2 ); // Draw wireframe BOX (WHITE) -void vga_print( int x, int y, char* pText ); // Draw text using SYSTEM font (32bit modes only just now) -void vga_testpattern( int shift); // Draw a test pattern/colour to the screen - -// ************************************************************** -// * Misc things... will be used later -// ************************************************************** -void vga_set_color( int reg, int R, int G, int B ); -void vga_set_reg( int port, int reg, int data ); - -// ****************************************************************** -// * Pixel resolutions -// ****************************************************************** -#define RES_320X200 (1) // Hardware mode *NOT YET* -#define RES_320X240 (2) // Software emulated -#define RES_640X200 (3) // Hardware mode *NOT YET* -#define RES_640X240 (4) // Hardware mode *NOT YET* -#define RES_640X400 (5) // Hardware mode *NOT YET* -#define RES_640X480 (6) // Hardware mode *NOT YET* -#define RES_720X480 (7) // Hardware mode *NOT YET* -#define RES_800X600 (8) // Hardware mode *NOT YET* -#define RES_1024X768 (9) // Hardware mode *NOT YET* -#define RES_MASK (15) - -// ****************************************************************** -// * Bit depths -// ****************************************************************** -#define _32BITCOLOUR (0x00000000) -#define _16BITCOLOUR (0x00000010) -#define _8BITCOLOUR (0x00000020) -#define COLOUR_MASK (0x00000030) - -// ****************************************************************** -// * Extra display flags -// ****************************************************************** -#define _DISPLAY_DEBUG (0x80000000) // display into debug mode (single buffer system) - -// ****************************************************************** -// * Easy to use screen modes -// ****************************************************************** -#define MODE_320x200x32 (RES_320X200|_32BITCOLOUR) // not yet -#define MODE_320x240x32 (RES_320X240|_32BITCOLOUR) -#define MODE_640x200x32 (RES_320X200|_32BITCOLOUR) // not yet -#define MODE_640x240x32 (RES_320X240|_32BITCOLOUR) -#define MODE_640x400x32 (RES_640X400|_32BITCOLOUR) // not yet -#define MODE_640x480x32 (RES_640X480|_32BITCOLOUR) // not yet -#define MODE_320x200x16 (RES_320X200|_16BITCOLOUR) // not yet -#define MODE_320x240x16 (RES_320X240|_16BITCOLOUR) // not yet -#define MODE_640x200x16 (RES_320X200|_16BITCOLOUR) // not yet -#define MODE_640x240x16 (RES_320X240|_16BITCOLOUR) // not yet -#define MODE_640x400x16 (RES_640X400|_16BITCOLOUR) // not yet -#define MODE_640x480x16 (RES_640X480|_16BITCOLOUR) // not yet - -// this is really to be used with the character map, so debug can be seen as soon as its output.. single buffered. -#define MODE_640x480x32_DEBUG (RES_640X480|_32BITCOLOUR|_DISPLAY_DEBUG) // not yet - -// ****************************************************************** -// * For print -// ****************************************************************** -#define FONT_SOLID (1) // render font with SOLID background (with paper colour) -#define FONT_WRAP (2) // Wrap PRINT's when they go off the screen - -#ifdef __cplusplus -} -#endif - -#endif // XVGA_H diff --git a/import/OpenXDK/include/xhal/xvga_def.h b/import/OpenXDK/include/xhal/xvga_def.h deleted file mode 100644 index f586a9fa9..000000000 --- a/import/OpenXDK/include/xhal/xvga_def.h +++ /dev/null @@ -1,150 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : xvga_def.h -// * -// * note : XBox VGA (#defines) -// * -// ****************************************************************** -#ifndef XVGA_DEF_H -#define XVGA_DEF_H - -#ifdef __cplusplus -extern "C" { -#endif - -extern u8 SystemFont[]; // handy to use system font -extern u8 *pFont; // point to the system Font by default. You can change it to your own -extern u32 pScreenBuffer[]; // Our screen (software emulated for LOW res just now) -extern u32 FrontBuffer; // Current screen address (visible) -extern u32 BackBuffer; // Current back buffer -extern u32 _FrontBuffer; // Current screen address (visible) -extern u32 _BackBuffer; // Current back buffer -extern u32 _Framebuffer; - -// ****************************************************************** -// * Internal -// ****************************************************************** -#define XBV_BASE 0xfd601000 -#define XBV_ATTR_REG_INDEX 0xfd6013c0 -#define XBV_ATTR_REG_DATA 0xfd6013c1 -#define XBV_ATTR_REG_INDEX2 0xfd6013c2 -#define XBV_ATTR_REG_INDEX3 0xfd6013c3 -#define XBV_CRTC_REG_INDEX 0xfd6013d4 -#define XBV_CRTC_REG_DATA 0xfd6013d5 -#define XBV_GRA_REG_INDEX 0xfd0C03ce -#define XBV_GRA_REG_DATA 0xfd0C03cf -#define XBV_SEQ_REG_INDEX 0xfd0C03c4 -#define XBV_SEQ_REG_DATA 0xfd0C03c5 -#define XBV_MISC_REG 0xfd0C03c2 -#define VBL 0xfd6013da - -#define XBV_COLOUR_REG 0xfd6013c8 -#define XBV_COLOUR_DATA 0xfd6013c9 - -#define XBOX_SCREENRAM 0x8003d000 // Xbox screen RAM starts here (power on default) - -// ****************************************************************** -// * System flags -// ****************************************************************** -#define XHAL_320SCREEN (1) // Software emulation of 320x??? mode -#define YHAL_200SCREEN (2) // Center 200 screen inside a 240 one - -// This might be able to be safely removed now -extern int _fltused; - -// ****************************************************************** -// * Register -// ****************************************************************** -typedef struct -{ - short port; - unsigned char index; - unsigned char value; -} -Register; - -#define ATTRCON_ADDR 0x3c0 -#define MISC_ADDR 0x3c2 -#define VGAENABLE_ADDR 0x3c3 -#define SEQ_ADDR 0x3c4 -#define GRACON_ADDR 0x3ce -#define CRTC_ADDR 0x3d4 -#define STATUS_ADDR 0x3da - -/* - xxxxADDR defines the base port number used to access VGA component xxxx, - and is defined for xxxx = - ATTRCON - Attribute Controller - MISC - Miscellaneous Register - VGAENABLE - VGA Enable Register - SEQ - Sequencer - GRACON - Graphics Controller - CRTC - Cathode Ray Tube Controller - STATUS - Status Register -*/ - -// ****************************************************************** -// * VGA Registers -// ****************************************************************** -#define VGAREG_ACTL_ADDRESS 0x3c0 -#define VGAREG_ACTL_WRITE_DATA 0x3c0 -#define VGAREG_ACTL_READ_DATA 0x3c1 - -#define VGAREG_INPUT_STATUS 0x3c2 -#define VGAREG_WRITE_MISC_OUTPUT 0x3c2 -#define VGAREG_VIDEO_ENABLE 0x3c3 -#define VGAREG_SEQU_ADDRESS 0x3c4 -#define VGAREG_SEQU_DATA 0x3c5 - -#define VGAREG_PEL_MASK 0x3c6 -#define VGAREG_DAC_STATE 0x3c7 -#define VGAREG_DAC_READ_ADDRESS 0x3c7 -#define VGAREG_DAC_WRITE_ADDRESS 0x3c8 -#define VGAREG_DAC_DATA 0x3c9 - -#define VGAREG_READ_FEATURE_CTL 0x3ca -#define VGAREG_READ_MISC_OUTPUT 0x3cc - -#define VGAREG_GRDC_ADDRESS 0x3ce -#define VGAREG_GRDC_DATA 0x3cf - -#define VGAREG_MDA_CRTC_ADDRESS 0x3b4 -#define VGAREG_MDA_CRTC_DATA 0x3b5 -#define VGAREG_VGA_CRTC_ADDRESS 0x3d4 -#define VGAREG_VGA_CRTC_DATA 0x3d5 - -#define VGAREG_MDA_WRITE_FEATURE_CTL 0x3ba -#define VGAREG_VGA_WRITE_FEATURE_CTL 0x3da -#define VGAREG_ACTL_RESET 0x3da - -#define VGAREG_MDA_MODECTL 0x3b8 -#define VGAREG_CGA_MODECTL 0x3d8 -#define VGAREG_CGA_PALETTE 0x3d9 - -/* Video memory */ -#define VGAMEM_GRAPH 0xA000 -#define VGAMEM_CTEXT 0xB800 -#define VGAMEM_MTEXT 0xB000 - -Register Mode320x200[]; - -// ****************************************************************** -// * functions needed for xvga.c -// ****************************************************************** -void outportb(int port, unsigned char data); -void readyVgaRegs(void); -void outReg(Register r); -void vga_set_reg( int port, int reg, int data ); -void vga_set_color( int reg, int R, int G, int B ); - -#ifdef __cplusplus -} -#endif - -#endif // XVGA_DEF_H - - diff --git a/import/OpenXDK/include/xinput/hub.h b/import/OpenXDK/include/xinput/hub.h deleted file mode 100644 index d3b488a62..000000000 --- a/import/OpenXDK/include/xinput/hub.h +++ /dev/null @@ -1,407 +0,0 @@ -/******************************************************************************/ -/* */ -/* File: hub.h */ -/* bkenwright@xbdev.net - www.xbdev.net */ -/* */ -/******************************************************************************/ - -#ifndef __HUB__ -#define __HUB__ - -#include "ohci.h" - - - -/******************************************************************************/ -/* USB CONSTANTS */ -/******************************************************************************/ - -/* - * Device and/or Interface Class codes - */ -#define USB_CLASS_PER_INTERFACE 0 /* for DeviceClass */ -#define USB_CLASS_AUDIO 1 -#define USB_CLASS_COMM 2 -#define USB_CLASS_HID 3 -#define USB_CLASS_PRINTER 7 -#define USB_CLASS_MASS_STORAGE 8 -#define USB_CLASS_HUB 9 -#define USB_CLASS_DATA 10 -#define USB_CLASS_VENDOR_SPEC 0xff - -/* - * Descriptor types - */ -#define USB_DT_DEVICE 0x01 -#define USB_DT_CONFIG 0x02 -#define USB_DT_STRING 0x03 -#define USB_DT_INTERFACE 0x04 -#define USB_DT_ENDPOINT 0x05 - -#define USB_DT_HUB 0x29 -#define USB_DT_HID 0x21 -#define USB_DT_REPORT 0x22 -#define USB_DT_PHYSICAL 0x23 - -/* - * Descriptor sizes per descriptor type - */ -#define USB_DT_DEVICE_SIZE 18 -#define USB_DT_CONFIG_SIZE 9 -#define USB_DT_INTERFACE_SIZE 9 -#define USB_DT_ENDPOINT_SIZE 7 -#define USB_DT_ENDPOINT_AUDIO_SIZE 9 /* Audio extension */ -#define USB_DT_HUB_NONVAR_SIZE 7 - -/* - * USB Request Type and Endpoint Directions - */ -#define USB_DIR_OUT 0 -#define USB_DIR_IN 0x80 - -#define USB_ENDPOINT_NUMBER_MASK 0x0f /* in bEndpointAddress */ -#define USB_ENDPOINT_DIR_MASK 0x80 - -#define USB_ENDPOINT_XFERTYPE_MASK 0x03 /* in bmAttributes */ -#define USB_ENDPOINT_XFER_CONTROL 0 -#define USB_ENDPOINT_XFER_ISOC 1 -#define USB_ENDPOINT_XFER_BULK 2 -#define USB_ENDPOINT_XFER_INT 3 - -/* - * USB Packet IDs (PIDs) - */ -#define USB_PID_OUT 0xe1 -#define USB_PID_IN 0x69 -#define USB_PID_SETUP 0x2d - -/* - * Standard requests - */ -#define USB_REQ_GET_STATUS 0x00 -#define USB_REQ_CLEAR_FEATURE 0x01 -/* 0x02 is reserved */ -#define USB_REQ_SET_FEATURE 0x03 -/* 0x04 is reserved */ -#define USB_REQ_SET_ADDRESS 0x05 -#define USB_REQ_GET_DESCRIPTOR 0x06 -#define USB_REQ_SET_DESCRIPTOR 0x07 -#define USB_REQ_GET_CONFIGURATION 0x08 -#define USB_REQ_SET_CONFIGURATION 0x09 -#define USB_REQ_GET_INTERFACE 0x0A -#define USB_REQ_SET_INTERFACE 0x0B -#define USB_REQ_SYNCH_FRAME 0x0C - -/* - * HIDD requests - */ -#define USB_REQ_GET_REPORT 0x01 -#define USB_REQ_GET_IDLE 0x02 -#define USB_REQ_GET_PROTOCOL 0x03 -#define USB_REQ_SET_REPORT 0x09 -#define USB_REQ_SET_IDLE 0x0A -#define USB_REQ_SET_PROTOCOL 0x0B - -#define USB_TYPE_STANDARD (0x00 << 5) -#define USB_TYPE_CLASS (0x01 << 5) -#define USB_TYPE_VENDOR (0x02 << 5) -#define USB_TYPE_RESERVED (0x03 << 5) - -#define USB_RECIP_DEVICE 0x00 -#define USB_RECIP_INTERFACE 0x01 -#define USB_RECIP_ENDPOINT 0x02 -#define USB_RECIP_OTHER 0x03 - -#define USB_HID_RPT_INPUT 0x01 -#define USB_HID_RPT_OUTPUT 0x02 -#define USB_HID_RPT_FEATURE 0x03 - -/* - * Request target types. - */ -#define USB_RT_DEVICE 0x00 -#define USB_RT_INTERFACE 0x01 -#define USB_RT_ENDPOINT 0x02 - -#define USB_RT_HUB (USB_TYPE_CLASS | USB_RECIP_DEVICE) -#define USB_RT_PORT (USB_TYPE_CLASS | USB_RECIP_OTHER) - -#define USB_RT_HIDD (USB_TYPE_CLASS | USB_RECIP_INTERFACE) - - -/******************************************************************************/ -/* HUB CONTANTS */ -/******************************************************************************/ - - - - -/* - * Hub Class feature numbers - */ -#define C_HUB_LOCAL_POWER 0 -#define C_HUB_OVER_CURRENT 1 - -/* - * Port feature numbers - */ -#define USB_PORT_FEAT_CONNECTION 0 -#define USB_PORT_FEAT_ENABLE 1 -#define USB_PORT_FEAT_SUSPEND 2 -#define USB_PORT_FEAT_OVER_CURRENT 3 -#define USB_PORT_FEAT_RESET 4 -#define USB_PORT_FEAT_POWER 8 -#define USB_PORT_FEAT_LOWSPEED 9 -#define USB_PORT_FEAT_C_CONNECTION 16 -#define USB_PORT_FEAT_C_ENABLE 17 -#define USB_PORT_FEAT_C_SUSPEND 18 -#define USB_PORT_FEAT_C_OVER_CURRENT 19 -#define USB_PORT_FEAT_C_RESET 20 - - -#pragma pack( push, 1 ) -struct usb_port_status -{ - __u16 wPortStatus; - __u16 wPortChange; -}; -#pragma pack( pop ) - - -/* wPortStatus bits */ -#define USB_PORT_STAT_CONNECTION 0x0001 -#define USB_PORT_STAT_ENABLE 0x0002 -#define USB_PORT_STAT_SUSPEND 0x0004 -#define USB_PORT_STAT_OVERCURRENT 0x0008 -#define USB_PORT_STAT_RESET 0x0010 -#define USB_PORT_STAT_POWER 0x0100 -#define USB_PORT_STAT_LOW_SPEED 0x0200 - -/* wPortChange bits */ -#define USB_PORT_STAT_C_CONNECTION 0x0001 -#define USB_PORT_STAT_C_ENABLE 0x0002 -#define USB_PORT_STAT_C_SUSPEND 0x0004 -#define USB_PORT_STAT_C_OVERCURRENT 0x0008 -#define USB_PORT_STAT_C_RESET 0x0010 - -/* wHubCharacteristics (masks) */ -#define HUB_CHAR_LPSM 0x0003 -#define HUB_CHAR_COMPOUND 0x0004 -#define HUB_CHAR_OCPM 0x0018 - -#pragma pack( push, 1 ) -struct usb_hub_status -{ - __u16 wHubStatus; - __u16 wHubChange; -}; -#pragma pack( pop ) - -/* - *Hub Status & Hub Change bit masks - */ -#define HUB_STATUS_LOCAL_POWER 0x0001 -#define HUB_STATUS_OVERCURRENT 0x0002 - -#define HUB_CHANGE_LOCAL_POWER 0x0001 -#define HUB_CHANGE_OVERCURRENT 0x0002 - -/* Hub descriptor */ -#pragma pack( push, 1 ) -struct usb_hub_descriptor -{ - __u8 bLength; - __u8 bDescriptorType; - __u8 bNbrPorts; - __u16 wHubCharacteristics; - __u8 bPwrOn2PwrGood; - __u8 bHubContrCurrent; - __u8 DeviceRemovable; - __u8 PortPowerCtrlMask; -}; -#pragma pack( pop ) - -/* -struct usb_hub_descriptor_t -{ - __u8 bDescLength; - __u8 bDescriptorType; - __u8 bNbrPorts; - __u16 wHubCharacteristics; - #define UHD_PWR 0x0003 - #define UHD_PWR_GANGED 0x0000 - #define UHD_PWR_INDIVIDUAL 0x0001 - #define UHD_PWR_NO_SWITCH 0x0002 - #define UHD_COMPOUND 0x0004 - #define UHD_OC 0x0018 - #define UHD_OC_GLOBAL 0x0000 - #define UHD_OC_INDIVIDUAL 0x0008 - #define UHD_OC_NONE 0x0010 - #define UHD_TT_THINK 0x0060 - #define UHD_TT_THINK_8 0x0000 - #define UHD_TT_THINK_16 0x0020 - #define UHD_TT_THINK_24 0x0040 - #define UHD_TT_THINK_32 0x0060 - #define UHD_PORT_IND 0x0080 - - __u8 bPwrOn2PwrGood; // delay in 2 ms units - #define UHD_PWRON_FACTOR 2 - - __u8 bHubContrCurrent; - __u8 DeviceRemovable[32]; //max 255 ports - - #define UHD_NOT_REMOV(desc, i) \ - (((desc)->DeviceRemovable[(i)/8] >> ((i) % 8)) & 1) - __u8 PortPowerCtrlMask[1]; // deprecated - }; -*/ -#define USB_HUB_DESCRIPTOR_SIZE 9 /* includes deprecated PortPowerCtrlMask */ - - -/******************************************************************************/ -/******************************************************************************/ -/******************************************************************************/ - -int get_control_msg(ohci_t * ohci, - __u8 Addr, - __u8 request, // 0x06 - __u8 requesttype, // 0x80 - __u16 value, - __u16 index, - __u16 size, - __u8 * data ); - - - - -int set_control_msg(ohci_t * ohci, - __u8 Addr, - __u8 request, - __u8 requesttype, - __u16 value, - __u16 index, - __u16 size, - __u8 * data ); - - - -//int usb_get_device_descriptor(ohci_t * ohci, __u8 Addr, int size, void *buf); - - -//int usb_get_hub_descriptor(ohci_t * ohci, __u8 Addr, int size, void *buf); - - - - -int usb_set_configuration(ohci_t * ohci, __u8 Addr, int configuration); - - -void DebugHubDescriptor( usb_hub_descriptor * pDes ); - - - -/***********************************************************************************/ - - -#define UT_WRITE 0x00 -#define UT_READ 0x80 -#define UT_STANDARD 0x00 -#define UT_CLASS 0x20 -#define UT_VENDOR 0x40 -#define UT_DEVICE 0x00 -#define UT_INTERFACE 0x01 -#define UT_ENDPOINT 0x02 -#define UT_OTHER 0x03 - -#define UT_READ_DEVICE (UT_READ | UT_STANDARD | UT_DEVICE) -#define UT_READ_INTERFACE (UT_READ | UT_STANDARD | UT_INTERFACE) -#define UT_READ_ENDPOINT (UT_READ | UT_STANDARD | UT_ENDPOINT) -#define UT_WRITE_DEVICE (UT_WRITE | UT_STANDARD | UT_DEVICE) -#define UT_WRITE_INTERFACE (UT_WRITE | UT_STANDARD | UT_INTERFACE) -#define UT_WRITE_ENDPOINT (UT_WRITE | UT_STANDARD | UT_ENDPOINT) -#define UT_READ_CLASS_DEVICE (UT_READ | UT_CLASS | UT_DEVICE) -#define UT_READ_CLASS_INTERFACE (UT_READ | UT_CLASS | UT_INTERFACE) -#define UT_READ_CLASS_OTHER (UT_READ | UT_CLASS | UT_OTHER) -#define UT_READ_CLASS_ENDPOINT (UT_READ | UT_CLASS | UT_ENDPOINT) -#define UT_WRITE_CLASS_DEVICE (UT_WRITE | UT_CLASS | UT_DEVICE) -#define UT_WRITE_CLASS_INTERFACE (UT_WRITE | UT_CLASS | UT_INTERFACE) -#define UT_WRITE_CLASS_OTHER (UT_WRITE | UT_CLASS | UT_OTHER) -#define UT_WRITE_CLASS_ENDPOINT (UT_WRITE | UT_CLASS | UT_ENDPOINT) -#define UT_READ_VENDOR_DEVICE (UT_READ | UT_VENDOR | UT_DEVICE) -#define UT_READ_VENDOR_INTERFACE (UT_READ | UT_VENDOR | UT_INTERFACE) -#define UT_READ_VENDOR_OTHER (UT_READ | UT_VENDOR | UT_OTHER) -#define UT_READ_VENDOR_ENDPOINT (UT_READ | UT_VENDOR | UT_ENDPOINT) -#define UT_WRITE_VENDOR_DEVICE (UT_WRITE | UT_VENDOR | UT_DEVICE) -#define UT_WRITE_VENDOR_INTERFACE (UT_WRITE | UT_VENDOR | UT_INTERFACE) -#define UT_WRITE_VENDOR_OTHER (UT_WRITE | UT_VENDOR | UT_OTHER) -#define UT_WRITE_VENDOR_ENDPOINT (UT_WRITE | UT_VENDOR | UT_ENDPOINT) - -/* Requests */ -#define UR_GET_STATUS 0x00 -#define UR_CLEAR_FEATURE 0x01 -#define UR_SET_FEATURE 0x03 -#define UR_SET_ADDRESS 0x05 -#define UR_GET_DESCRIPTOR 0x06 -#define UDESC_DEVICE 0x01 -#define UDESC_CONFIG 0x02 -#define UDESC_STRING 0x03 -#define UDESC_INTERFACE 0x04 -#define UDESC_ENDPOINT 0x05 -#define UDESC_DEVICE_QUALIFIER 0x06 -#define UDESC_OTHER_SPEED_CONFIGURATION 0x07 -#define UDESC_INTERFACE_POWER 0x08 -#define UDESC_OTG 0x09 -#define UDESC_CS_DEVICE 0x21 /* class specific */ -#define UDESC_CS_CONFIG 0x22 -#define UDESC_CS_STRING 0x23 -#define UDESC_CS_INTERFACE 0x24 -#define UDESC_CS_ENDPOINT 0x25 -#define UDESC_HUB 0x29 -#define UR_SET_DESCRIPTOR 0x07 -#define UR_GET_CONFIG 0x08 -#define UR_SET_CONFIG 0x09 -#define UR_GET_INTERFACE 0x0a -#define UR_SET_INTERFACE 0x0b -#define UR_SYNCH_FRAME 0x0c - - - -/***********************************************************************************/ - -struct devrequest -{ - unsigned char requesttype; // 1 byte - unsigned char request; // 1 byte - unsigned short value; // 2 bytes - unsigned short index; // 2 bytes - unsigned short length; // 2 bytes -};// end devrequest // Total = 8 bytes - - -struct usbd_device -{ - ohci_t * p_ohci; /* our ohci stuff */ - __u8 address; /* device addess */ -};// end usbd_device - - - -int usbd_get_desc(usbd_device * dev, int type, int index, int len, void *desc); - -int usbd_do_request(usbd_device * dev, devrequest *req, void *data); - - -int usbd_get_hub_descriptor(usbd_device * dev, void * data); - - -int do_hub_work(usbd_device * dev); - - -int usbd_do_request_big_packet(usbd_device * dev, devrequest *req, void *data); - - - - -#endif // __HUB__ - - diff --git a/import/OpenXDK/include/xinput/misc.h b/import/OpenXDK/include/xinput/misc.h deleted file mode 100644 index c09ca5874..000000000 --- a/import/OpenXDK/include/xinput/misc.h +++ /dev/null @@ -1,73 +0,0 @@ -/******************************************************************************/ -/* */ -/* File: misc.h */ -/* Author: bkenwright@xbdev.net */ -/* Desc: Misc functions, making our usb/gamepad code lib independent */ -/* */ -/******************************************************************************/ - -#ifndef __XMISC__ -#define __XMISC__ - - - - -typedef unsigned char __u8; -typedef char __s8; -typedef unsigned short __u16; -typedef short __s16; -typedef unsigned long __u32; -typedef int __s32; - -#define NULL 0 - -//#include -//extern char buf[500]; -//void dbg(char* str); - - -/******************************************************************************/ -/* */ -/* StdFunctions */ -/* Didn't want our code being dependent on anything! For example Sleep(..) */ -/* As its available in the xdk and the openxdk or linux?... Well I could */ -/* write custom functions - giveing us the ultimate in flexiblity! */ -/* We really are now a portible piece of code */ -/* */ -/******************************************************************************/ - -void xSleep( long timemilliseconds ); - -void *xmemcpy(void *dest, const void *src, size_t n); - -void *xmalloc(size_t size); - -void *xmemset(void *s, int c, size_t n); - -//unsigned __int64 MyGetTickCount(); -unsigned int MyGetTickCount(); - - -/******************************************************************************/ -/* */ -/* Kernel Functions */ -/* Here are the 2 kernal api's from the bios that we need to make this code */ -/* work - everything else can be hand coded but these. As we need to use */ -/* memory that isn't quite where its suppose to be! Remember where running */ -/* in protected mode - so for our ohci registers, when we give them an */ -/* address, it has to be the real physical address. If we where in the */ -/* kernel or writing a kernel bios, we wolndt' need to worry about it..but we */ -/* do here as where in the xbe! */ -/* */ -/* These are just wrapper's as we call the exact same function name..but */ -/* without the x at the start. */ -/* */ -/******************************************************************************/ - -__u32 xMmGetPhysicalAddress(__u32 BaseAddress); -void xMmLockUnlockBufferPages(__u32 MemoryAddress, __u32 NumberOfBytes, __u32 a); - -/******************************************************************************/ - - -#endif // __XMISC__ diff --git a/import/OpenXDK/include/xinput/ohci.h b/import/OpenXDK/include/xinput/ohci.h deleted file mode 100644 index 8d7b5abcd..000000000 --- a/import/OpenXDK/include/xinput/ohci.h +++ /dev/null @@ -1,242 +0,0 @@ -/******************************************************************************/ -/* */ -/* File: ohci.h */ -/* */ -/* Details: Original File & Design: Thomas Frei */ -/* (modifications for xbox openxdk by bkenwright) */ -/* (bkenwright@xbdev.net) www.xbdev.net */ -/* */ -/******************************************************************************/ - - -#ifndef __OHCI_X__ -#define __OHCI_X__ - -#include "misc.h" // We only need this here, for the definitions of __u8, __u32 etc -// to be added in later (example): - - -// Example sippet of possible later improvment on structure aligment in vs -// __declspec(align(32)) struct Str1 -// { -// int a, b, c, d, e; -// }; - -/* -typedef unsigned char __u8; -typedef char __s8; -typedef unsigned short __u16; -typedef short __s16; -typedef unsigned long __u32; -typedef int __s32; - -#define NULL 0 -*/ - - - -#define SIZEOF_HCCA 0x100 - - - -/* - * The HCCA (Host Controller Communications Area) is a 256 byte - * structure defined in the OHCI spec. that the host controller is - * told the base address of. It must be 256-byte aligned. - */ - -#define NUM_INTS 32 /* part of the OHCI standard */ - - - -#pragma pack( push, 1 ) -struct ohci_hcca -{ - __u32 int_table[NUM_INTS]; /* Interrupt ED table */ - __u16 frame_no; /* current frame number */ - __u16 pad1; /* set to 0 on each frame_no change */ - __u32 done_head; /* info returned for an interrupt */ - __u8 reserved_for_hc[116]; -}; -#pragma pack( pop ) -typedef struct ohci_hcca ohci_hcca_t; - - -/* - * Maximum number of root hub ports. - */ - -#define MAX_ROOT_PORTS 15 - - -#pragma pack(1) -volatile struct ohci_regs -{ - /* control and status registers */ - __u32 revision; - __u32 control; - __u32 cmdstatus; - __u32 intrstatus; - __u32 intrenable; - __u32 intrdisable; - /* memory pointers */ - __u32 hcca; - __u32 ed_periodcurrent; - __u32 ed_controlhead; - __u32 ed_controlcurrent; - __u32 ed_bulkhead; - __u32 ed_bulkcurrent; - __u32 donehead; - /* frame counters */ - __u32 fminterval; - __u32 fmremaining; - __u32 fmnumber; - __u32 periodicstart; - __u32 lsthresh; - /* Root hub ports */ - volatile struct ohci_roothub_regs - { - __u32 a; - __u32 b; - __u32 status; - __u32 portstatus[MAX_ROOT_PORTS]; - } roothub; -}; -#pragma pack() -typedef struct ohci_regs ohci_regs_t; - - - - -#pragma pack(1) -typedef struct ohci -{ - volatile struct ohci_hcca *hcca; /* hcca */ - - volatile struct ohci_regs * regs; /* OHCI controller's memory */ - -} ohci_t; -#pragma pack() - - -/******************************************************************************/ - - -#define SKIP 0x4000L -#define OUTV 0x0800L -#define INV 0x1000L -#define AUTOIO 0x1800L -#define LOWS 0x2000L - - - -//#pragma block (push,1) -#pragma pack(1) -typedef struct { -__u32 Format; -__u32 Tailptr; -__u32 Headptr; -__u32 NextED; -} s_Endpointdescripor; -#pragma pack() - -#pragma pack(1) -typedef struct { -__u32 Format; -__u32 Buffer; -__u32 NextTD; -__u32 BufferEnd; -} s_Transferdescriptor; -#pragma pack() - -#pragma pack(1) -typedef struct { -__u8 Length; -__u8 DescriptorType; -__u16 USB; -__u8 DeviceClass; -__u8 DeviceSubClass; -__u8 DeviceProtocol; -__u8 MaxPacketSize; -__u16 Vendor; -__u16 ProductID; -__u16 Device; -__u8 Manufacturer; -__u8 ProductIndex; -__u8 SerialNumber; -__u8 ConfigNumber; -} s_USB_Devicedescriptor; -#pragma pack() - -#pragma pack(1) -typedef struct { -__u8 Length; -__u8 DescriptorType; -__u16 TotalLength; -__u8 NumberofInterfaces; -__u8 ConfigValue; -__u8 Configuration; -__u8 Attributes; -__u8 MaxPower; -} s_USB_Configurationdescriptor; - -typedef struct { -__u8 Length; -__u8 DescriptorType; -__u8 Interfacenumber; -__u8 AlternateSetting; -__u8 NumberofEndpoints; -__u8 InterfaceClass; -__u8 InterfaceSubClass; -__u8 InterfaceProtocol; -__u8 InterfaceIndex; -} s_USB_Interfacedescriptor; - -typedef struct { -__u8 Length; -__u8 DescriptorType; -__u8 EndpointAddress; -__u8 Attributes; -__u16 MaxPacketSize; -__u8 Interval; -} s_USB_Endpointdescriptor; - -typedef struct { -__u8 Length; -__u8 DescriptorType; -__u16 *LANGID; -} s_USB_Languagedescriptor; - -typedef struct { -__u8 Length; -__u8 DescriptorType; -__u8 *String; -} s_USB_Stringdescriptor; -//#pragma block (pop) -#pragma pack() - - -/******************************************************************************/ - -// Main Functions -int FindOHC(ohci_t * ohci, void *regbase); -int FindDev(ohci_t * ohci, int Port); - - -int ResetPort(ohci_t * ohci, int Port); -int SetAddres(ohci_t * ohci, int Port, __u8 AddrNew); -int SetConfigur(ohci_t * ohci, __u8 Addr, __u8 Config); -int GetDesc(ohci_t * ohci, __u8 Addr, __u8 DescrType, __u8 Index, __u8 Count, __u8 *DBuffer); - - - -// Debug Functions -void DebugFile(ohci_t * ohci); -void DebugDescriptor( s_USB_Devicedescriptor * pDes ); -void DebugConfigDescriptor( s_USB_Configurationdescriptor * pDes ); -void DebugInterfaceDescriptor( s_USB_Interfacedescriptor * pDes ); -void DebugEndPointDescriptor( s_USB_Endpointdescriptor * pDes ); - - - -#endif // __OHCI_X__ diff --git a/import/OpenXDK/include/xinput/pad.h b/import/OpenXDK/include/xinput/pad.h deleted file mode 100644 index ef7629e01..000000000 --- a/import/OpenXDK/include/xinput/pad.h +++ /dev/null @@ -1,89 +0,0 @@ -/******************************************************************************/ -/* */ -/* File: pad.h */ -/* bkenwright@xbdev.net - www.xbdev.net */ -/* */ -/******************************************************************************/ - -/******************************************************************************/ -/* - What on earth! Whats this file for? - Well once we have our usb device address set...for the xbox gamepad :) - This file will do some simple commands...sending bulk test messages - ...an example would be to send a rumble message? - Also probe for some button presses? - - In Development though. -*/ -/******************************************************************************/ - - -#ifndef __PAD__ -#define __PAD__ - - -#include "ohci.h" -#include "hub.h" - -/******************************************************************************/ -/* */ -/* stXPAD - Gamepad Data Structure */ -/* This structure will be filled in by our USB Gamepad - its the data that */ -/* is returned to us when we request a gamepad in on the usb bus. */ -/* */ -/******************************************************************************/ - - -#pragma pack(1) // We use this, so our data is packed nice and tight!..no space. -struct stXPAD // Packed to 1 byte alignment. -{ - char reserved1; - unsigned char structsize; - - char pad; /* 1 up 2 down 4 left 8 right */ - char reserved2; - unsigned char keys[6]; /* A B X Y Black White */ - - unsigned char trig_left; - unsigned char trig_right; - short stick_left_x; - short stick_left_y; - short stick_right_x; - short stick_right_y; - - char padding[0x40]; -}; -#pragma pack() - - -/******************************************************************************/ -/* */ -/* stRumbleXPAD */ -/* We will fill this with data later on, that we will pass to the gamepad, */ -/* it will specify the left or right rumble and speed for example */ -/* */ -/******************************************************************************/ - -#pragma pack(1) -struct stRumbleXPAD -{ -}; -#pragma pack() - - - -/******************************************************************************/ -/* */ -/* Functions */ -/* */ -/******************************************************************************/ - - -void usb_bulk_msg( usbd_device * dev, int size, void * data ); // Send data to the USB - -void usb_bulk_msg_in( usbd_device * dev, int size, void * data ); // Get data from the USB - - - - -#endif // __PAD__ diff --git a/import/OpenXDK/include/xinput/xinput.h b/import/OpenXDK/include/xinput/xinput.h deleted file mode 100644 index c8a390b96..000000000 --- a/import/OpenXDK/include/xinput/xinput.h +++ /dev/null @@ -1,96 +0,0 @@ -/******************************************************************************/ -/* */ -/* File: xinput.h */ -/* Auth: bkenwright@xbdev.net */ -/* Desc: GamePad entry code for use on the xbox. */ -/* */ -/******************************************************************************/ -/* - This is our xinput header file, this is where all our functions that we'll - use in our game or app for the xbox that 'require' gamepad support will - be put. -*/ -/******************************************************************************/ -/* - How does this code work? What lib's does it need? How would I use it - in my code? - - Well the aim of the gamepad code was to develop an independent set of - code for the openxdk - but because it's lib independent it also works on - the xdk. - - <1> Include our header file, and the other files which do all the work.. - later they'll be put into a library - e.g. #include "xinput/xinput.h" // Gamepad input - - <2> Init our gamepad code - e.g. - stXINPUT xin; - xInitInput(&xin); - You do this ocne at the start of the program, I did it this way as I don't - like globals, so you need to pass it a stuct called stXINPUT which - keeps all our usb/gampad information in. - - <3> Get our gamepad information in our main loop e.g: - stXPAD pad; - xGetPadInput(&pad, &xin); - - <4> When we've all finished, call xReleaseInput(&xin); - - You can also set the rumble effect - still in development - e.g. xSetPadInput(&pad, &xin); -*/ -/******************************************************************************/ - -#ifndef __XINPUT__ -#define __XINPUT__ - -#if defined(__cplusplus) -extern "C" -{ -#endif - - -#include "ohci.h" -#include "pad.h" // for stXPAD definition - - - -// About this - at the moment it just contains the offset to the ohci memory -// location (e.g. 0xfed00000...but we will also use this to keep track of -// alocated memory - how many gamepads are plugged in...usb dev drivers etc. - -struct stXINPUT -{ - ohci_t my_ohci; -}; - -struct stXPAD; // Defined in xpad.h - - - -/******************************************************************************/ -/* */ -/* Interface Functions */ -/* */ -/******************************************************************************/ - -//<1> Creation -int xInitInput(stXINPUT* p); - -//<2> Probing/ Getting or Setting Gamepad -int xGetPadInput(stXPAD * p, stXINPUT * xin, int iWhichPad = 0); // 0 is default pad -int xSetPadInput(stXPAD * p, stXINPUT * xin, int iWhichPad = 0); - -//<3> Death End -int xReleaseInput(stXINPUT * p); - - - -#if defined(__cplusplus) -} -#endif - - -#endif // __XINPUT__ - diff --git a/import/OpenXDK/include/xinput/xinputdetails.txt b/import/OpenXDK/include/xinput/xinputdetails.txt deleted file mode 100644 index 05d64d4dc..000000000 --- a/import/OpenXDK/include/xinput/xinputdetails.txt +++ /dev/null @@ -1,110 +0,0 @@ -/******************************************************************************/ -/* */ -/* It has arrived! */ -/* */ -/* Gamepad support for the OpenXDK */ -/* */ -/******************************************************************************/ - -This is a lib build of the gamepad code - its more or less independent..it -doens't need any of the other openxdk header files, and will work in the ms xdk -as well. - -Its been designed to be as flexible as possible - so many of the xinput.h -interface functions have been designed so we can tweek away at the workings -and get you a great feel in tim. - -It works! But might need a bit of improvement for speed. - -Externals: - - -extern "C" __u32 __stdcall MmAllocateContiguousMemory(__u32 a); -extern "C" __u32 __stdcall MmLockUnlockBufferPages(__u32 MemoryAddress, __u32 NumberOfBytes, __u32 a); -extern "C" __u32 __stdcall MmGetPhysicalAddress(__u32 BaseAddress); - - -These are the only external links in our code! Everything else..even the -myGetTickCount() have all been implemented inside our code! - - -How to use it: - -/******************************************************************************/ -/* - How does this code work? What lib's does it need? How would I use it - in my code? - - Well the aim of the gamepad code was to develop an independent set of - code for the openxdk - but because it's lib independent it also works on - the xdk. - - <1> Include our header file, and the other files which do all the work.. - later they'll be put into a library - e.g. #include "xinput/xinput.h" // Gamepad input - - <2> Init our gamepad code - e.g. - stXINPUT xin; - xInitInput(&xin); - You do this ocne at the start of the program, I did it this way as I don't - like globals, so you need to pass it a stuct called stXINPUT which - keeps all our usb/gampad information in. - - <3> Get our gamepad information in our main loop e.g: - stXPAD pad; - xGetPadInput(&pad, &xin); - - <4> When we've all finished, call xReleaseInput(&xin); - - You can also set the rumble effect - still in development - e.g. xSetPadInput(&pad, &xin); -*/ -/******************************************************************************/ - - -Feedback welcome: bkenwright@xbdev.net - - -Edits to OpenXDK main code: - -mm.h line:83 - -from: - -XBSYSAPI VOID *MmLockUnlockBufferPages; - -to: - -XBSYSAPI EXPORTNUM(175) PHYSICAL_ADDRESS NTAPI MmLockUnlockBufferPages -( - IN PHYSICAL_ADDRESS BaseAddress, - IN ULONG NumberOfBytes, - IN ULONG Protect -); - - -mm.c line:94 - -from: - -XBSYSAPI VOID *MmLockUnlockBufferPages = 0; - -to: - - -XBSYSAPI EXPORTNUM(175) PHYSICAL_ADDRESS NTAPI MmLockUnlockBufferPages -( - IN PHYSICAL_ADDRESS BaseAddress, - IN ULONG NumberOfBytes, - IN ULONG Protect -) -{ - return; -} - - - - - - diff --git a/import/OpenXDK/include/xlibc/ansidecl.h b/import/OpenXDK/include/xlibc/ansidecl.h deleted file mode 100644 index c8089ae30..000000000 --- a/import/OpenXDK/include/xlibc/ansidecl.h +++ /dev/null @@ -1,70 +0,0 @@ -// ****************************************************************** -// * -// * proj : openLIBC -// * -// * desc : Totally Free LIC replacement -// * -// * file : ansidecl.h -// * -// * note : This LIBC is TOTALLY free - do what you like with it!! -// * -// ****************************************************************** - -#ifndef __OPENXDK_ANSIDECL__ -#define __OPENXDK_ANSIDECL__ - -#ifdef __cplusplus -extern "C" { -#endif - - - -// ****************************************************************** -// * Bigboy types -// ****************************************************************** -#ifndef _BIGBOY_TYPES_ -#define _BIGBOY_TYPES_ -typedef unsigned char byte; -typedef unsigned char u8; -typedef signed char s8; -typedef unsigned short u16; -typedef signed short s16; -typedef unsigned int u32; -typedef signed int s32; -#endif //_BIGBOY_TYPES_ - - - -#ifndef NULL -#define NULL 0x00 -#endif - -#ifndef true -#define true 1 -#endif -#ifndef false -#define false 0 -#endif - -#ifndef __SIZE_T_ -#define __SIZE_T_ -typedef unsigned int size_t; -#endif //__SIZE_T_ - - - - - - - - - - -#ifdef __cplusplus -}; -#endif - -#endif // __OPENXDK_ANSIDECL__ - - - diff --git a/import/OpenXDK/include/xlibc/ctype.h b/import/OpenXDK/include/xlibc/ctype.h deleted file mode 100644 index 69fcd359a..000000000 --- a/import/OpenXDK/include/xlibc/ctype.h +++ /dev/null @@ -1,51 +0,0 @@ -// ****************************************************************** -// * -// * proj : openLIBC -// * -// * desc : Totally Free LIC replacement -// * -// * file : ctype.h -// * -// * note : This LIBC is TOTALLY free - do what you like with it!! -// * -// ****************************************************************** - -#ifndef __OPENXDK_CTYPE__ -#define __OPENXDK_CTYPE__ - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -// ***************************************************************************** -// -// Structures -// -// ***************************************************************************** - - -// ***************************************************************************** -// -// Functions -// -// ***************************************************************************** - -#define tolower(c) (c>='A' && c<='Z')?c+('a'-'A'):c -#define toupper(c) (c>='a' && c<='z')?c+('A'-'a'):c -#define isdigit(c) (c>='0' && c<='9')?1:0 -#define isxdigit(c) (c>='0' && c<='9' || c>='a' && c<='f' || c>='A' && c<='F')?1:0 - - - - -#ifdef __cplusplus -}; -#endif - -#endif // __OPENXDK_CTYPE__ - - - - diff --git a/import/OpenXDK/include/xlibc/malloc.h b/import/OpenXDK/include/xlibc/malloc.h deleted file mode 100644 index 4efc1f818..000000000 --- a/import/OpenXDK/include/xlibc/malloc.h +++ /dev/null @@ -1,18 +0,0 @@ - -#ifndef __OPENXDK_MALLOC__ -#define __OPENXDK_MALLOC__ - -#ifdef __cplusplus -extern "C" { -#endif - -//dummy malloc to make bitmap lib compile :P - -void *malloc(size_t); -void free(void *); - -#ifdef __cplusplus -}; -#endif - -#endif diff --git a/import/OpenXDK/include/xlibc/math.h b/import/OpenXDK/include/xlibc/math.h deleted file mode 100644 index 03b21f60c..000000000 --- a/import/OpenXDK/include/xlibc/math.h +++ /dev/null @@ -1,77 +0,0 @@ -// ****************************************************************** -// * -// * proj : openLIBC -// * -// * desc : Totally Free LIC replacement -// * -// * file : math.h -// * -// * note : This LIBC is TOTALLY free - do what you like with it!! -// * -// ****************************************************************** - -#ifndef __OPENXDK_MATH__ -#define __OPENXDK_MATH__ - -//here for now -#define OPENXDK_UNIMPLEMENTEDC(x) // x are not implemented in C! - -#ifdef __cplusplus -extern "C" { -#endif - -//Double-precision functions - -//trig -double sin(double); -double cos(double); -double tan(double); -double asin(double); -double acos(double); -double atan(double); -double atan2(double, double); - -//power -double sqrt(double); -double pow(double, double); //approx. -double exp(double); //approx. -double log(double); //approx. -double log10(double); //approx -double hypot(double, double); - -//rounding -double ceil(double); -double floor(double); -double fmod(double, double); -double fabs(double); - -//Single-precision functions - -//trig -float sinf(float); -float cosf(float); -float tanf(float); -float asinf(float); -float acosf(float); -float atanf(float); -float atan2f(float, float); - -//power -float sqrtf(float); -float powf(float, float);//approx. -float expf(float);//approx. -float logf(float);//approx. -float log10f(float);//approx -float hypotf(float, float); - -//rounding -float ceilf(float); -float floorf(float); -float fmodf(float, float); -float fabsf(float); - -#ifdef __cplusplus -}; -#endif - -#endif //__OPENXDK_MATH__ diff --git a/import/OpenXDK/include/xlibc/stdarg.h b/import/OpenXDK/include/xlibc/stdarg.h deleted file mode 100644 index 5e9f3b543..000000000 --- a/import/OpenXDK/include/xlibc/stdarg.h +++ /dev/null @@ -1,65 +0,0 @@ -// ****************************************************************** -// * -// * proj : openLIBC -// * -// * desc : Totally Free LIC replacement -// * -// * file : stdarg.h -// * -// * note : This LIBC is TOTALLY free - do what you like with it!! -// * -// ****************************************************************** -// a -#ifndef __OPENXDK_STDARG__ -#define __OPENXDK_STDARG__ - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef _MSC_VER -#pragma pack(push,8) -#endif - - -#ifndef _VA_LIST_DEFINED -#ifdef _M_ALPHA -typedef struct { - char *a0; // pointer to first argument - int offset; // byte offset of next arg -} va_list; -#else -typedef char * va_list; -#endif -#define _VA_LIST_DEFINED -#endif - - - -// GET rid of C4146 compiler warnings: unary minus operator applied to unsigned type, result still unsigned -#define NEGU32(a) ((u32) (-((s32)(a))) ) - - -#define _INTSIZEOF(n) ( (sizeof(n) + (sizeof(int) - 1)) & NEGU32(sizeof(int)) ) -#define va_start(ap,v) ( ap = (va_list)&v + _INTSIZEOF(v) ) -#define va_arg(ap,t) ( *(t *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) ) -#define va_end(ap) ( ap = (va_list)0 ) - - - - -#ifdef _MSC_VER -#pragma pack(pop) -#endif - - - - -#ifdef __cplusplus -}; -#endif -#endif // __OPENXDK_STDARG__ - - - - diff --git a/import/OpenXDK/include/xlibc/stdio.h b/import/OpenXDK/include/xlibc/stdio.h deleted file mode 100644 index 1f8002174..000000000 --- a/import/OpenXDK/include/xlibc/stdio.h +++ /dev/null @@ -1,112 +0,0 @@ -// ****************************************************************** -// * -// * proj : openLIBC -// * -// * desc : Totally Free LIC replacement -// * -// * file : stdio.h -// * -// ****************************************************************** - -#ifndef __STDIO_H__ -#define __STDIO_H__ 1 - - -# ifdef __cplusplus -extern "C" { -# endif - -#include - - -// ****************************************************************** -// Low level input/output functions -// ****************************************************************** - -#define _O_RDONLY (0x00000001) -#define _O_WRONLY (0x00000002) -#define _O_RDWR (0x00000003) -#define _O_NBLOCK (0x00000010) -#define _O_APPEND (0x00000100) -#define _O_CREAT (0x00000200) -#define _O_TRUNC (0x00000400) -#define _O_EXCL (0x00000800) -#define _O_TEMPORARY (0x00001000) -#define _O_TEXT (0x00004000) -#define _O_BINARY (0x00008000) - -#define O_RDONLY _O_RDONLY -#define O_WRONLY _O_WRONLY -#define O_RDWR _O_RDWR -#define O_NBLOCK _O_NBLOCK -#define O_APPEND _O_APPEND -#define O_CREAT _O_CREAT -#define O_EXCL _O_EXCL -#define O_TRUNC _O_TRUNC -#define O_TEMPORARY _O_TEMPORARY -#define O_TEXT _O_TEXT -#define O_BINARY _O_BINARY - - -#define SEEK_SET 0 -#define SEEK_CUR 1 -#define SEEK_END 2 - -extern u32 LastErrorCode; - -typedef unsigned int size_t; - -int _open( char *filename, int oflag, int permission ); -int _read( int handle, void *buffer, unsigned int count ); -int _write( int handle, void* buffer, unsigned int count ); -int _close( int handle ); -int _lseek( int handle, u32 offset, int base ); - -//int printf(const char *format, ...); -//int vsnprintf( char *buffer, unsigned int count, const char *format, va_list ap ); -int sprintf(char*, const char *format, ...); -int snprintf (char *str, size_t size, const char *format, ...); - - - -// ****************************************************************** -// Standard C file input/output functions -// (Which are just wrappers for the low level ones) -// ****************************************************************** - -#define EOF (-1) - -struct __stdio_file { - int fd; - int flags; - unsigned int bs; /* read: bytes in buffer */ - unsigned int bm; /* position in buffer */ - unsigned int buflen; /* length of buf */ - char *buf; - unsigned char ungetbuf; - char ungotten; -}; - -typedef struct __stdio_file FILE; - - -FILE *fopen(char *path, const char *mode); -size_t fread( void *ptr, size_t size, size_t nmemb, FILE *stream); -size_t fwrite( void *ptr, size_t size, size_t nmemb, FILE *stream); -int fclose(FILE *stream); - -int fprintf(FILE *f,const char *format,...); -int fseek(FILE *stream, long offset, int whence); -long ftell(FILE *stream) ; - - - - -# ifdef __cplusplus -} -# endif - -#endif // __STDIO_H__ - - - diff --git a/import/OpenXDK/include/xlibc/stdlib.h b/import/OpenXDK/include/xlibc/stdlib.h deleted file mode 100644 index 8e5936165..000000000 --- a/import/OpenXDK/include/xlibc/stdlib.h +++ /dev/null @@ -1,72 +0,0 @@ -// ****************************************************************** -// * -// * proj : openLIBC -// * -// * desc : Totally Free LIC replacement -// * -// * file : stdlib.h -// * -// * note : This LIBC is TOTALLY free - do what you like with it!! -// * -// ****************************************************************** - -#ifndef __OPENXDK_STDLIB__ -#define __OPENXDK_STDLIB__ - -#ifdef __cplusplus -extern "C" { -#endif - -#include - - -// ***************************************************************************** -// -// Defines etc. -// -// ***************************************************************************** -// we could just as well use any other randmax 2^x-1 but this seems to be the standard -#define RAND_MAX 32767 - -// ***************************************************************************** -// -// Structures -// -// ***************************************************************************** - - -typedef struct Sdiv_t{ // div structure - int quot; - int rem; -} div_t; - - -typedef struct Sldiv_t{ // ldiv structure - long int quot; - long int rem; -} ldiv_t; - - - -// ***************************************************************************** -// -// Functions -// -// ***************************************************************************** -int abs( int i ); -void abort( void ); -div_t div( int number, int divisor ); -ldiv_t ldiv( long int number, long int divisor ); -char* itoa( int value, char *string, int radix ); -char* ltoa( long value, char *string, int radix ); -int rand( void ); -void srand( unsigned int ); - - -#ifdef __cplusplus -}; -#endif - -#endif //__OPENXDK_STDLIB__ - - diff --git a/import/OpenXDK/include/xlibc/string.h b/import/OpenXDK/include/xlibc/string.h deleted file mode 100644 index f8a886635..000000000 --- a/import/OpenXDK/include/xlibc/string.h +++ /dev/null @@ -1,56 +0,0 @@ -// ****************************************************************** -// * -// * proj : openLIBC -// * -// * desc : Totally Free LIC replacement -// * -// * file : string.h -// * -// * note : This LIBC is TOTALLY free - do what you like with it!! -// * -// ****************************************************************** - -#ifndef __OPENXDK_STRING__ -#define __OPENXDK_STRING__ - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -// ***************************************************************************** -// -// Structures -// -// ***************************************************************************** - - -// ***************************************************************************** -// -// Functions -// -// ***************************************************************************** -char* strcat( char *dest, const char *src ); -char* strncpy( char *dest, const char *src, unsigned int count ); -char* strcpy( char *dest, const char *src ); -size_t strlen( const char *string ); -void* memcpy( void *dest, const void *src, int count ); -void* memccpy( void *dest, const void *src, int c, unsigned int count ); -int memcmp( const void *buff1, const void *buff2, size_t count ); -void *memset( void *Dest, int fill, size_t length ); - - - - - -#ifdef __cplusplus -}; -#endif - - -#endif // __OPENXDK_STRING__ - - - - diff --git a/import/OpenXDK/include/xusb/asm/bitops.h b/import/OpenXDK/include/xusb/asm/bitops.h deleted file mode 100644 index 702ae7531..000000000 --- a/import/OpenXDK/include/xusb/asm/bitops.h +++ /dev/null @@ -1,479 +0,0 @@ -#ifndef _I386_BITOPS_H -#define _I386_BITOPS_H - -/* - * Copyright 1992, Linus Torvalds. - */ - -// #include - -/* - * These have to be done with inline assembly: that way the bit-setting - * is guaranteed to be atomic. All bit operations return 0 if the bit - * was cleared before the operation and != 0 if it was not. - * - * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1). - */ - -#ifdef CONFIG_SMP -#define LOCK_PREFIX "lock ; " -#else -#define LOCK_PREFIX "" -#endif - -#define ADDR (*(volatile long *) addr) - -/** - * set_bit - Atomically set a bit in memory - * @nr: the bit to set - * @addr: the address to start counting from - * - * This function is atomic and may not be reordered. See __set_bit() - * if you do not require the atomic guarantees. - * Note that @nr may be almost arbitrarily large; this function is not - * restricted to acting on a single-word quantity. - */ -/*static __inline__ void set_bit(int nr, volatile void * addr) -{ - __asm__ __volatile__( LOCK_PREFIX - "btsl %1,%0" - :"=m" (ADDR) - :"Ir" (nr)); -} -*/ - -static __inline void set_bit(int nr, volatile void * addr) -{ - __asm - { - mov eax, nr - mov ebx, addr - lock bts [ebx], eax - sbb eax, eax - } -} - -/** - * __set_bit - Set a bit in memory - * @nr: the bit to set - * @addr: the address to start counting from - * - * Unlike set_bit(), this function is non-atomic and may be reordered. - * If it's called on the same region of memory simultaneously, the effect - * may be that only one operation succeeds. - */ -static __inline void __set_bit(int nr, volatile void * addr) -{ - __asm - { - mov eax, nr - mov ebx, addr - lock bts [ebx], eax - sbb eax, eax - } -} - -/** - * clear_bit - Clears a bit in memory - * @nr: Bit to clear - * @addr: Address to start counting from - * - * clear_bit() is atomic and may not be reordered. However, it does - * not contain a memory barrier, so if it is used for locking purposes, - * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit() - * in order to ensure changes are visible on other processors. - */ -static __inline void clear_bit(int nr, volatile void * addr) -{ - __asm - { - mov eax, nr - mov ebx, addr - lock btr [ebx], eax - sbb eax, eax - } -} -#define smp_mb__before_clear_bit() barrier() -#define smp_mb__after_clear_bit() barrier() - -/** - * __change_bit - Toggle a bit in memory - * @nr: the bit to set - * @addr: the address to start counting from - * - * Unlike change_bit(), this function is non-atomic and may be reordered. - * If it's called on the same region of memory simultaneously, the effect - * may be that only one operation succeeds. - */ -static __inline void __change_bit(int nr, volatile void * addr) -{ - __asm - { - mov eax, nr - mov ebx, addr - lock btc [ebx], eax - sbb eax, eax - } -} - -/** - * change_bit - Toggle a bit in memory - * @nr: Bit to clear - * @addr: Address to start counting from - * - * change_bit() is atomic and may not be reordered. - * Note that @nr may be almost arbitrarily large; this function is not - * restricted to acting on a single-word quantity. - */ -static __inline void change_bit(int nr, volatile void * addr) -{ - __asm - { - mov eax, nr - mov ebx, addr - lock btc [ebx], eax - sbb eax, eax - } -} - -/** - * test_and_set_bit - Set a bit and return its old value - * @nr: Bit to set - * @addr: Address to count from - * - * This operation is atomic and cannot be reordered. - * It also implies a memory barrier. - */ -static __inline int test_and_set_bit(int nr, volatile void * addr) -{ - int oldbit; - __asm - { - mov eax, nr - mov ebx, addr - lock bts [ebx], eax - sbb eax, eax // result into eax - mov oldbit,eax // store in oldbit for returning (0 or 1) - } -/* __asm__ __volatile__( LOCK_PREFIX - "btsl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit),"=m" (ADDR) - :"Ir" (nr) : "memory"); - */ - return oldbit; -} - -/** - * __test_and_set_bit - Set a bit and return its old value - * @nr: Bit to set - * @addr: Address to count from - * - * This operation is non-atomic and can be reordered. - * If two examples of this operation race, one can appear to succeed - * but actually fail. You must protect multiple accesses with a lock. - */ -static __inline int __test_and_set_bit(int nr, volatile void * addr) -{ - int oldbit; - __asm - { - mov eax, nr - mov ebx, addr - lock bts [ebx], eax - sbb eax, eax // result into eax - mov oldbit,eax // store in oldbit for returning (0 or 1) - } - /*__asm__( - "btsl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit),"=m" (ADDR) - :"Ir" (nr));*/ - return oldbit; -} - -/** - * test_and_clear_bit - Clear a bit and return its old value - * @nr: Bit to set - * @addr: Address to count from - * - * This operation is atomic and cannot be reordered. - * It also implies a memory barrier. - */ -static __inline int test_and_clear_bit(int nr, volatile void * addr) -{ - int oldbit; - - __asm - { - mov eax, nr - mov ebx, addr - lock btr [ebx], eax - sbb eax, eax // result into eax - mov oldbit,eax // store in oldbit for returning (0 or 1) - } - /* - __asm__ __volatile__( LOCK_PREFIX - "btrl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit),"=m" (ADDR) - :"Ir" (nr) : "memory"); - */ - return oldbit; -} - -/** - * __test_and_clear_bit - Clear a bit and return its old value - * @nr: Bit to set - * @addr: Address to count from - * - * This operation is non-atomic and can be reordered. - * If two examples of this operation race, one can appear to succeed - * but actually fail. You must protect multiple accesses with a lock. - */ -static __inline int __test_and_clear_bit(int nr, volatile void * addr) -{ - int oldbit; - - __asm - { - mov eax, nr - mov ebx, addr - lock btr [ebx], eax - sbb eax, eax // result into eax - mov oldbit,eax // store in oldbit for returning (0 or 1) - } -/* - __asm__( - "btrl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit),"=m" (ADDR) - :"Ir" (nr)); - */ - return oldbit; -} - -/* WARNING: non atomic and it can be reordered! */ -static __inline int __test_and_change_bit(int nr, volatile void * addr) -{ - int oldbit; - - __asm - { - mov eax, nr - mov ebx, addr - lock btc [ebx], eax - sbb eax, eax // result into eax - mov oldbit,eax // store in oldbit for returning (0 or 1) - } -/* - __asm__ __volatile__( - "btcl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit),"=m" (ADDR) - :"Ir" (nr) : "memory");*/ - return oldbit; -} - -/** - * test_and_change_bit - Change a bit and return its new value - * @nr: Bit to set - * @addr: Address to count from - * - * This operation is atomic and cannot be reordered. - * It also implies a memory barrier. - */ -static __inline int test_and_change_bit(int nr, volatile void * addr) -{ - int oldbit; - - __asm - { - mov eax, nr - mov ebx, addr - lock btc [ebx], eax - sbb eax, eax // result into eax - mov oldbit,eax // store in oldbit for returning (0 or 1) - } - /* - __asm__ __volatile__( LOCK_PREFIX - "btcl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit),"=m" (ADDR) - :"Ir" (nr) : "memory");*/ - return oldbit; -} - -#if 0 /* Fool kernel-doc since it doesn't do macros yet */ -/** - * test_bit - Determine whether a bit is set - * @nr: bit number to test - * @addr: Address to start counting from - */ -static int test_bit(int nr, const volatile void * addr); -#endif - -static __inline int constant_test_bit(int nr, const volatile void * addr) -{ - return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0; -} - -static __inline int variable_test_bit(int nr, volatile void * addr) -{ - int oldbit; - __asm - { - mov eax, nr - mov ebx, addr - lock bt [ebx], eax - sbb eax, eax // result into eax - mov oldbit,eax // store in oldbit for returning (0 or 1) - } - /* - __asm__ __volatile__( - "btl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit) - :"m" (ADDR),"Ir" (nr));*/ - return oldbit; -} - -#define test_bit(nr,addr) \ -(__builtin_constant_p(nr) ? \ - constant_test_bit((nr),(addr)) : \ - variable_test_bit((nr),(addr))) - -/** - * find_first_zero_bit - find the first zero bit in a memory region - * @addr: The address to start the search at - * @size: The maximum size to search - * - * Returns the bit-number of the first zero bit, not the number of the byte - * containing a bit. - */ -#if 0 -static __inline int find_first_zero_bit(void * addr, unsigned size) -{ - int d0, d1, d2; - int res; - - if (!size) - return 0; - /* This looks at memory. Mark it volatile to tell gcc not to move it around */ - __asm__ __volatile__( - "movl $-1,%%eax\n\t" - "xorl %%edx,%%edx\n\t" - "repe; scasl\n\t" - "je 1f\n\t" - "xorl -4(%%edi),%%eax\n\t" - "subl $4,%%edi\n\t" - "bsfl %%eax,%%edx\n" - "1:\tsubl %%ebx,%%edi\n\t" - "shll $3,%%edi\n\t" - "addl %%edi,%%edx" - :"=d" (res), "=&c" (d0), "=&D" (d1), "=&a" (d2) - :"1" ((size + 31) >> 5), "2" (addr), "b" (addr)); - return res; -} -#endif -/** - * find_next_zero_bit - find the first zero bit in a memory region - * @addr: The address to base the search on - * @offset: The bitnumber to start searching at - * @size: The maximum size to search - */ -#if 0 -static __inline__ int find_next_zero_bit (void * addr, int size, int offset) -{ - unsigned long * p = ((unsigned long *) addr) + (offset >> 5); - int set = 0, bit = offset & 31, res; - - if (bit) { - /* - * Look for zero in first byte - */ - __asm__("bsfl %1,%0\n\t" - "jne 1f\n\t" - "movl $32, %0\n" - "1:" - : "=r" (set) - : "r" (~(*p >> bit))); - if (set < (32 - bit)) - return set + offset; - set = 32 - bit; - p++; - } - /* - * No zero yet, search remaining full bytes for a zero - */ - res = find_first_zero_bit (p, size - 32 * (p - (unsigned long *) addr)); - return (offset + set + res); -} -#endif -/** - * ffz - find first zero in word. - * @word: The word to search - * - * Undefined if no zero exists, so code should check against ~0UL first. - */ -static __inline unsigned long ffz(unsigned long DWordValue ) -{ - unsigned long OutputData; - __asm - { - xor eax, eax - mov ebx, DWordValue - lock bsf eax, ebx - mov OutputData,eax // store in oldbit for returning (0 or 1) - } -/* __asm__("bsfl %1,%0" - :"=r" (word) - :"r" (~word));*/ - return OutputData; -} - -#ifdef __KERNEL__ - -/** - * ffs - find first bit set - * @x: the word to search - * - * This is defined the same way as - * the libc and compiler builtin ffs routines, therefore - * differs in spirit from the above ffz (man ffs). - */ -static __inline__ int ffs(int x) -{ - int r; - - __asm__("bsfl %1,%0\n\t" - "jnz 1f\n\t" - "movl $-1,%0\n" - "1:" : "=r" (r) : "rm" (x)); - return r+1; -} - -/** - * hweightN - returns the hamming weight of a N-bit word - * @x: the word to weigh - * - * The Hamming Weight of a number is the total number of bits set in it. - */ - -#define hweight32(x) generic_hweight32(x) -#define hweight16(x) generic_hweight16(x) -#define hweight8(x) generic_hweight8(x) - -#endif /* __KERNEL__ */ - -#ifdef __KERNEL__ - -#define ext2_set_bit __test_and_set_bit -#define ext2_clear_bit __test_and_clear_bit -#define ext2_test_bit test_bit -#define ext2_find_first_zero_bit find_first_zero_bit -#define ext2_find_next_zero_bit find_next_zero_bit - -/* Bitmap functions for the minix filesystem. */ -#define minix_test_and_set_bit(nr,addr) __test_and_set_bit(nr,addr) -#define minix_set_bit(nr,addr) __set_bit(nr,addr) -#define minix_test_and_clear_bit(nr,addr) __test_and_clear_bit(nr,addr) -#define minix_test_bit(nr,addr) test_bit(nr,addr) -#define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size) - -#endif /* __KERNEL__ */ - -#endif /* _I386_BITOPS_H */ diff --git a/import/OpenXDK/include/xusb/asm/errno.h b/import/OpenXDK/include/xusb/asm/errno.h deleted file mode 100644 index dcd2ede98..000000000 --- a/import/OpenXDK/include/xusb/asm/errno.h +++ /dev/null @@ -1,132 +0,0 @@ -#ifndef _I386_ERRNO_H -#define _I386_ERRNO_H - -#define EPERM 1 /* Operation not permitted */ -#define ENOENT 2 /* No such file or directory */ -#define ESRCH 3 /* No such process */ -#define EINTR 4 /* Interrupted system call */ -#define EIO 5 /* I/O error */ -#define ENXIO 6 /* No such device or address */ -#define E2BIG 7 /* Argument list too long */ -#define ENOEXEC 8 /* Exec format error */ -#define EBADF 9 /* Bad file number */ -#define ECHILD 10 /* No child processes */ -#define EAGAIN 11 /* Try again */ -#define ENOMEM 12 /* Out of memory */ -#define EACCES 13 /* Permission denied */ -#define EFAULT 14 /* Bad address */ -#define ENOTBLK 15 /* Block device required */ -#define EBUSY 16 /* Device or resource busy */ -#define EEXIST 17 /* File exists */ -#define EXDEV 18 /* Cross-device link */ -#define ENODEV 19 /* No such device */ -#define ENOTDIR 20 /* Not a directory */ -#define EISDIR 21 /* Is a directory */ -#define EINVAL 22 /* Invalid argument */ -#define ENFILE 23 /* File table overflow */ -#define EMFILE 24 /* Too many open files */ -#define ENOTTY 25 /* Not a typewriter */ -#define ETXTBSY 26 /* Text file busy */ -#define EFBIG 27 /* File too large */ -#define ENOSPC 28 /* No space left on device */ -#define ESPIPE 29 /* Illegal seek */ -#define EROFS 30 /* Read-only file system */ -#define EMLINK 31 /* Too many links */ -#define EPIPE 32 /* Broken pipe */ -#define EDOM 33 /* Math argument out of domain of func */ -#define ERANGE 34 /* Math result not representable */ -#define EDEADLK 35 /* Resource deadlock would occur */ -#define ENAMETOOLONG 36 /* File name too long */ -#define ENOLCK 37 /* No record locks available */ -#define ENOSYS 38 /* Function not implemented */ -#define ENOTEMPTY 39 /* Directory not empty */ -#define ELOOP 40 /* Too many symbolic links encountered */ -#define EWOULDBLOCK EAGAIN /* Operation would block */ -#define ENOMSG 42 /* No message of desired type */ -#define EIDRM 43 /* Identifier removed */ -#define ECHRNG 44 /* Channel number out of range */ -#define EL2NSYNC 45 /* Level 2 not synchronized */ -#define EL3HLT 46 /* Level 3 halted */ -#define EL3RST 47 /* Level 3 reset */ -#define ELNRNG 48 /* Link number out of range */ -#define EUNATCH 49 /* Protocol driver not attached */ -#define ENOCSI 50 /* No CSI structure available */ -#define EL2HLT 51 /* Level 2 halted */ -#define EBADE 52 /* Invalid exchange */ -#define EBADR 53 /* Invalid request descriptor */ -#define EXFULL 54 /* Exchange full */ -#define ENOANO 55 /* No anode */ -#define EBADRQC 56 /* Invalid request code */ -#define EBADSLT 57 /* Invalid slot */ - -#define EDEADLOCK EDEADLK - -#define EBFONT 59 /* Bad font file format */ -#define ENOSTR 60 /* Device not a stream */ -#define ENODATA 61 /* No data available */ -#define ETIME 62 /* Timer expired */ -#define ENOSR 63 /* Out of streams resources */ -#define ENONET 64 /* Machine is not on the network */ -#define ENOPKG 65 /* Package not installed */ -#define EREMOTE 66 /* Object is remote */ -#define ENOLINK 67 /* Link has been severed */ -#define EADV 68 /* Advertise error */ -#define ESRMNT 69 /* Srmount error */ -#define ECOMM 70 /* Communication error on send */ -#define EPROTO 71 /* Protocol error */ -#define EMULTIHOP 72 /* Multihop attempted */ -#define EDOTDOT 73 /* RFS specific error */ -#define EBADMSG 74 /* Not a data message */ -#define EOVERFLOW 75 /* Value too large for defined data type */ -#define ENOTUNIQ 76 /* Name not unique on network */ -#define EBADFD 77 /* File descriptor in bad state */ -#define EREMCHG 78 /* Remote address changed */ -#define ELIBACC 79 /* Can not access a needed shared library */ -#define ELIBBAD 80 /* Accessing a corrupted shared library */ -#define ELIBSCN 81 /* .lib section in a.out corrupted */ -#define ELIBMAX 82 /* Attempting to link in too many shared libraries */ -#define ELIBEXEC 83 /* Cannot exec a shared library directly */ -#define EILSEQ 84 /* Illegal byte sequence */ -#define ERESTART 85 /* Interrupted system call should be restarted */ -#define ESTRPIPE 86 /* Streams pipe error */ -#define EUSERS 87 /* Too many users */ -#define ENOTSOCK 88 /* Socket operation on non-socket */ -#define EDESTADDRREQ 89 /* Destination address required */ -#define EMSGSIZE 90 /* Message too long */ -#define EPROTOTYPE 91 /* Protocol wrong type for socket */ -#define ENOPROTOOPT 92 /* Protocol not available */ -#define EPROTONOSUPPORT 93 /* Protocol not supported */ -#define ESOCKTNOSUPPORT 94 /* Socket type not supported */ -#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ -#define EPFNOSUPPORT 96 /* Protocol family not supported */ -#define EAFNOSUPPORT 97 /* Address family not supported by protocol */ -#define EADDRINUSE 98 /* Address already in use */ -#define EADDRNOTAVAIL 99 /* Cannot assign requested address */ -#define ENETDOWN 100 /* Network is down */ -#define ENETUNREACH 101 /* Network is unreachable */ -#define ENETRESET 102 /* Network dropped connection because of reset */ -#define ECONNABORTED 103 /* Software caused connection abort */ -#define ECONNRESET 104 /* Connection reset by peer */ -#define ENOBUFS 105 /* No buffer space available */ -#define EISCONN 106 /* Transport endpoint is already connected */ -#define ENOTCONN 107 /* Transport endpoint is not connected */ -#define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */ -#define ETOOMANYREFS 109 /* Too many references: cannot splice */ -#define ETIMEDOUT 110 /* Connection timed out */ -#define ECONNREFUSED 111 /* Connection refused */ -#define EHOSTDOWN 112 /* Host is down */ -#define EHOSTUNREACH 113 /* No route to host */ -#define EALREADY 114 /* Operation already in progress */ -#define EINPROGRESS 115 /* Operation now in progress */ -#define ESTALE 116 /* Stale NFS file handle */ -#define EUCLEAN 117 /* Structure needs cleaning */ -#define ENOTNAM 118 /* Not a XENIX named type file */ -#define ENAVAIL 119 /* No XENIX semaphores available */ -#define EISNAM 120 /* Is a named type file */ -#define EREMOTEIO 121 /* Remote I/O error */ -#define EDQUOT 122 /* Quota exceeded */ - -#define ENOMEDIUM 123 /* No medium found */ -#define EMEDIUMTYPE 124 /* Wrong medium type */ - -#endif diff --git a/import/OpenXDK/include/xusb/asm/pci_ids.h b/import/OpenXDK/include/xusb/asm/pci_ids.h deleted file mode 100644 index 136c0516d..000000000 --- a/import/OpenXDK/include/xusb/asm/pci_ids.h +++ /dev/null @@ -1,1884 +0,0 @@ -/* - * PCI Class, Vendor and Device IDs - * - * Please keep sorted. - */ - -/* Device classes and subclasses */ - -#define PCI_CLASS_NOT_DEFINED 0x0000 -#define PCI_CLASS_NOT_DEFINED_VGA 0x0001 - -#define PCI_BASE_CLASS_STORAGE 0x01 -#define PCI_CLASS_STORAGE_SCSI 0x0100 -#define PCI_CLASS_STORAGE_IDE 0x0101 -#define PCI_CLASS_STORAGE_FLOPPY 0x0102 -#define PCI_CLASS_STORAGE_IPI 0x0103 -#define PCI_CLASS_STORAGE_RAID 0x0104 -#define PCI_CLASS_STORAGE_OTHER 0x0180 - -#define PCI_BASE_CLASS_NETWORK 0x02 -#define PCI_CLASS_NETWORK_ETHERNET 0x0200 -#define PCI_CLASS_NETWORK_TOKEN_RING 0x0201 -#define PCI_CLASS_NETWORK_FDDI 0x0202 -#define PCI_CLASS_NETWORK_ATM 0x0203 -#define PCI_CLASS_NETWORK_OTHER 0x0280 - -#define PCI_BASE_CLASS_DISPLAY 0x03 -#define PCI_CLASS_DISPLAY_VGA 0x0300 -#define PCI_CLASS_DISPLAY_XGA 0x0301 -#define PCI_CLASS_DISPLAY_3D 0x0302 -#define PCI_CLASS_DISPLAY_OTHER 0x0380 - -#define PCI_BASE_CLASS_MULTIMEDIA 0x04 -#define PCI_CLASS_MULTIMEDIA_VIDEO 0x0400 -#define PCI_CLASS_MULTIMEDIA_AUDIO 0x0401 -#define PCI_CLASS_MULTIMEDIA_PHONE 0x0402 -#define PCI_CLASS_MULTIMEDIA_OTHER 0x0480 - -#define PCI_BASE_CLASS_MEMORY 0x05 -#define PCI_CLASS_MEMORY_RAM 0x0500 -#define PCI_CLASS_MEMORY_FLASH 0x0501 -#define PCI_CLASS_MEMORY_OTHER 0x0580 - -#define PCI_BASE_CLASS_BRIDGE 0x06 -#define PCI_CLASS_BRIDGE_HOST 0x0600 -#define PCI_CLASS_BRIDGE_ISA 0x0601 -#define PCI_CLASS_BRIDGE_EISA 0x0602 -#define PCI_CLASS_BRIDGE_MC 0x0603 -#define PCI_CLASS_BRIDGE_PCI 0x0604 -#define PCI_CLASS_BRIDGE_PCMCIA 0x0605 -#define PCI_CLASS_BRIDGE_NUBUS 0x0606 -#define PCI_CLASS_BRIDGE_CARDBUS 0x0607 -#define PCI_CLASS_BRIDGE_RACEWAY 0x0608 -#define PCI_CLASS_BRIDGE_OTHER 0x0680 - -#define PCI_BASE_CLASS_COMMUNICATION 0x07 -#define PCI_CLASS_COMMUNICATION_SERIAL 0x0700 -#define PCI_CLASS_COMMUNICATION_PARALLEL 0x0701 -#define PCI_CLASS_COMMUNICATION_MULTISERIAL 0x0702 -#define PCI_CLASS_COMMUNICATION_MODEM 0x0703 -#define PCI_CLASS_COMMUNICATION_OTHER 0x0780 - -#define PCI_BASE_CLASS_SYSTEM 0x08 -#define PCI_CLASS_SYSTEM_PIC 0x0800 -#define PCI_CLASS_SYSTEM_DMA 0x0801 -#define PCI_CLASS_SYSTEM_TIMER 0x0802 -#define PCI_CLASS_SYSTEM_RTC 0x0803 -#define PCI_CLASS_SYSTEM_PCI_HOTPLUG 0x0804 -#define PCI_CLASS_SYSTEM_OTHER 0x0880 - -#define PCI_BASE_CLASS_INPUT 0x09 -#define PCI_CLASS_INPUT_KEYBOARD 0x0900 -#define PCI_CLASS_INPUT_PEN 0x0901 -#define PCI_CLASS_INPUT_MOUSE 0x0902 -#define PCI_CLASS_INPUT_SCANNER 0x0903 -#define PCI_CLASS_INPUT_GAMEPORT 0x0904 -#define PCI_CLASS_INPUT_OTHER 0x0980 - -#define PCI_BASE_CLASS_DOCKING 0x0a -#define PCI_CLASS_DOCKING_GENERIC 0x0a00 -#define PCI_CLASS_DOCKING_OTHER 0x0a80 - -#define PCI_BASE_CLASS_PROCESSOR 0x0b -#define PCI_CLASS_PROCESSOR_386 0x0b00 -#define PCI_CLASS_PROCESSOR_486 0x0b01 -#define PCI_CLASS_PROCESSOR_PENTIUM 0x0b02 -#define PCI_CLASS_PROCESSOR_ALPHA 0x0b10 -#define PCI_CLASS_PROCESSOR_POWERPC 0x0b20 -#define PCI_CLASS_PROCESSOR_MIPS 0x0b30 -#define PCI_CLASS_PROCESSOR_CO 0x0b40 - -#define PCI_BASE_CLASS_SERIAL 0x0c -#define PCI_CLASS_SERIAL_FIREWIRE 0x0c00 -#define PCI_CLASS_SERIAL_ACCESS 0x0c01 -#define PCI_CLASS_SERIAL_SSA 0x0c02 -#define PCI_CLASS_SERIAL_USB 0x0c03 -#define PCI_CLASS_SERIAL_FIBER 0x0c04 -#define PCI_CLASS_SERIAL_SMBUS 0x0c05 - -#define PCI_BASE_CLASS_INTELLIGENT 0x0e -#define PCI_CLASS_INTELLIGENT_I2O 0x0e00 - -#define PCI_BASE_CLASS_SATELLITE 0x0f -#define PCI_CLASS_SATELLITE_TV 0x0f00 -#define PCI_CLASS_SATELLITE_AUDIO 0x0f01 -#define PCI_CLASS_SATELLITE_VOICE 0x0f03 -#define PCI_CLASS_SATELLITE_DATA 0x0f04 - -#define PCI_BASE_CLASS_CRYPT 0x10 -#define PCI_CLASS_CRYPT_NETWORK 0x1000 -#define PCI_CLASS_CRYPT_ENTERTAINMENT 0x1001 -#define PCI_CLASS_CRYPT_OTHER 0x1080 - -#define PCI_BASE_CLASS_SIGNAL_PROCESSING 0x11 -#define PCI_CLASS_SP_DPIO 0x1100 -#define PCI_CLASS_SP_OTHER 0x1180 - -#define PCI_CLASS_OTHERS 0xff - -/* Vendors and devices. Sort key: vendor first, device next. */ - -#define PCI_VENDOR_ID_DYNALINK 0x0675 -#define PCI_DEVICE_ID_DYNALINK_IS64PH 0x1702 - -#define PCI_VENDOR_ID_BERKOM 0x0871 -#define PCI_DEVICE_ID_BERKOM_A1T 0xffa1 -#define PCI_DEVICE_ID_BERKOM_T_CONCEPT 0xffa2 -#define PCI_DEVICE_ID_BERKOM_A4T 0xffa4 -#define PCI_DEVICE_ID_BERKOM_SCITEL_QUADRO 0xffa8 - -#define PCI_VENDOR_ID_COMPAQ 0x0e11 -#define PCI_DEVICE_ID_COMPAQ_TOKENRING 0x0508 -#define PCI_DEVICE_ID_COMPAQ_1280 0x3033 -#define PCI_DEVICE_ID_COMPAQ_TRIFLEX 0x4000 -#define PCI_DEVICE_ID_COMPAQ_6010 0x6010 -#define PCI_DEVICE_ID_COMPAQ_TACHYON 0xa0fc -#define PCI_DEVICE_ID_COMPAQ_SMART2P 0xae10 -#define PCI_DEVICE_ID_COMPAQ_NETEL100 0xae32 -#define PCI_DEVICE_ID_COMPAQ_TRIFLEX_IDE 0xae33 -#define PCI_DEVICE_ID_COMPAQ_NETEL10 0xae34 -#define PCI_DEVICE_ID_COMPAQ_NETFLEX3I 0xae35 -#define PCI_DEVICE_ID_COMPAQ_NETEL100D 0xae40 -#define PCI_DEVICE_ID_COMPAQ_NETEL100PI 0xae43 -#define PCI_DEVICE_ID_COMPAQ_NETEL100I 0xb011 -#define PCI_DEVICE_ID_COMPAQ_CISS 0xb060 -#define PCI_DEVICE_ID_COMPAQ_CISSB 0xb178 -#define PCI_DEVICE_ID_COMPAQ_CISSC 0x0046 -#define PCI_DEVICE_ID_COMPAQ_THUNDER 0xf130 -#define PCI_DEVICE_ID_COMPAQ_NETFLEX3B 0xf150 - -#define PCI_VENDOR_ID_NCR 0x1000 -#define PCI_VENDOR_ID_LSI_LOGIC 0x1000 -#define PCI_DEVICE_ID_NCR_53C810 0x0001 -#define PCI_DEVICE_ID_NCR_53C820 0x0002 -#define PCI_DEVICE_ID_NCR_53C825 0x0003 -#define PCI_DEVICE_ID_NCR_53C815 0x0004 -#define PCI_DEVICE_ID_LSI_53C810AP 0x0005 -#define PCI_DEVICE_ID_NCR_53C860 0x0006 -#define PCI_DEVICE_ID_LSI_53C1510 0x000a -#define PCI_DEVICE_ID_NCR_53C896 0x000b -#define PCI_DEVICE_ID_NCR_53C895 0x000c -#define PCI_DEVICE_ID_NCR_53C885 0x000d -#define PCI_DEVICE_ID_NCR_53C875 0x000f -#define PCI_DEVICE_ID_NCR_53C1510 0x0010 -#define PCI_DEVICE_ID_LSI_53C895A 0x0012 -#define PCI_DEVICE_ID_LSI_53C875A 0x0013 -#define PCI_DEVICE_ID_LSI_53C1010_33 0x0020 -#define PCI_DEVICE_ID_LSI_53C1010_66 0x0021 -#define PCI_DEVICE_ID_LSI_53C1030 0x0030 -#define PCI_DEVICE_ID_LSI_53C1035 0x0040 -#define PCI_DEVICE_ID_NCR_53C875J 0x008f -#define PCI_DEVICE_ID_LSI_FC909 0x0621 -#define PCI_DEVICE_ID_LSI_FC929 0x0622 -#define PCI_DEVICE_ID_LSI_FC929_LAN 0x0623 -#define PCI_DEVICE_ID_LSI_FC919 0x0624 -#define PCI_DEVICE_ID_LSI_FC919_LAN 0x0625 -#define PCI_DEVICE_ID_LSI_FC929X 0x0626 -#define PCI_DEVICE_ID_LSI_FC919X 0x0628 -#define PCI_DEVICE_ID_NCR_YELLOWFIN 0x0701 -#define PCI_DEVICE_ID_LSI_61C102 0x0901 -#define PCI_DEVICE_ID_LSI_63C815 0x1000 - -#define PCI_VENDOR_ID_ATI 0x1002 -/* Mach64 */ -#define PCI_DEVICE_ID_ATI_68800 0x4158 -#define PCI_DEVICE_ID_ATI_215CT222 0x4354 -#define PCI_DEVICE_ID_ATI_210888CX 0x4358 -#define PCI_DEVICE_ID_ATI_215ET222 0x4554 -/* Mach64 / Rage */ -#define PCI_DEVICE_ID_ATI_215GB 0x4742 -#define PCI_DEVICE_ID_ATI_215GD 0x4744 -#define PCI_DEVICE_ID_ATI_215GI 0x4749 -#define PCI_DEVICE_ID_ATI_215GP 0x4750 -#define PCI_DEVICE_ID_ATI_215GQ 0x4751 -#define PCI_DEVICE_ID_ATI_215XL 0x4752 -#define PCI_DEVICE_ID_ATI_215GT 0x4754 -#define PCI_DEVICE_ID_ATI_215GTB 0x4755 -#define PCI_DEVICE_ID_ATI_215_IV 0x4756 -#define PCI_DEVICE_ID_ATI_215_IW 0x4757 -#define PCI_DEVICE_ID_ATI_215_IZ 0x475A -#define PCI_DEVICE_ID_ATI_210888GX 0x4758 -#define PCI_DEVICE_ID_ATI_215_LB 0x4c42 -#define PCI_DEVICE_ID_ATI_215_LD 0x4c44 -#define PCI_DEVICE_ID_ATI_215_LG 0x4c47 -#define PCI_DEVICE_ID_ATI_215_LI 0x4c49 -#define PCI_DEVICE_ID_ATI_215_LM 0x4c4D -#define PCI_DEVICE_ID_ATI_215_LN 0x4c4E -#define PCI_DEVICE_ID_ATI_215_LR 0x4c52 -#define PCI_DEVICE_ID_ATI_215_LS 0x4c53 -#define PCI_DEVICE_ID_ATI_264_LT 0x4c54 -/* Mach64 VT */ -#define PCI_DEVICE_ID_ATI_264VT 0x5654 -#define PCI_DEVICE_ID_ATI_264VU 0x5655 -#define PCI_DEVICE_ID_ATI_264VV 0x5656 -/* Rage128 Pro GL */ -#define PCI_DEVICE_ID_ATI_Rage128_PA 0x5041 -#define PCI_DEVICE_ID_ATI_Rage128_PB 0x5042 -#define PCI_DEVICE_ID_ATI_Rage128_PC 0x5043 -#define PCI_DEVICE_ID_ATI_Rage128_PD 0x5044 -#define PCI_DEVICE_ID_ATI_Rage128_PE 0x5045 -#define PCI_DEVICE_ID_ATI_RAGE128_PF 0x5046 -/* Rage128 Pro VR */ -#define PCI_DEVICE_ID_ATI_RAGE128_PG 0x5047 -#define PCI_DEVICE_ID_ATI_RAGE128_PH 0x5048 -#define PCI_DEVICE_ID_ATI_RAGE128_PI 0x5049 -#define PCI_DEVICE_ID_ATI_RAGE128_PJ 0x504A -#define PCI_DEVICE_ID_ATI_RAGE128_PK 0x504B -#define PCI_DEVICE_ID_ATI_RAGE128_PL 0x504C -#define PCI_DEVICE_ID_ATI_RAGE128_PM 0x504D -#define PCI_DEVICE_ID_ATI_RAGE128_PN 0x504E -#define PCI_DEVICE_ID_ATI_RAGE128_PO 0x504F -#define PCI_DEVICE_ID_ATI_RAGE128_PP 0x5050 -#define PCI_DEVICE_ID_ATI_RAGE128_PQ 0x5051 -#define PCI_DEVICE_ID_ATI_RAGE128_PR 0x5052 -#define PCI_DEVICE_ID_ATI_RAGE128_TR 0x5452 -#define PCI_DEVICE_ID_ATI_RAGE128_PS 0x5053 -#define PCI_DEVICE_ID_ATI_RAGE128_PT 0x5054 -#define PCI_DEVICE_ID_ATI_RAGE128_PU 0x5055 -#define PCI_DEVICE_ID_ATI_RAGE128_PV 0x5056 -#define PCI_DEVICE_ID_ATI_RAGE128_PW 0x5057 -#define PCI_DEVICE_ID_ATI_RAGE128_PX 0x5058 -/* Rage128 GL */ -#define PCI_DEVICE_ID_ATI_RAGE128_RE 0x5245 -#define PCI_DEVICE_ID_ATI_RAGE128_RF 0x5246 -#define PCI_DEVICE_ID_ATI_RAGE128_RG 0x534b -#define PCI_DEVICE_ID_ATI_RAGE128_RH 0x534c -#define PCI_DEVICE_ID_ATI_RAGE128_RI 0x534d -/* Rage128 VR */ -#define PCI_DEVICE_ID_ATI_RAGE128_RK 0x524b -#define PCI_DEVICE_ID_ATI_RAGE128_RL 0x524c -#define PCI_DEVICE_ID_ATI_RAGE128_RM 0x5345 -#define PCI_DEVICE_ID_ATI_RAGE128_RN 0x5346 -#define PCI_DEVICE_ID_ATI_RAGE128_RO 0x5347 -/* Rage128 M3 */ -#define PCI_DEVICE_ID_ATI_RAGE128_LE 0x4c45 -#define PCI_DEVICE_ID_ATI_RAGE128_LF 0x4c46 -/* Rage128 Pro Ultra */ -#define PCI_DEVICE_ID_ATI_RAGE128_U1 0x5446 -#define PCI_DEVICE_ID_ATI_RAGE128_U2 0x544C -#define PCI_DEVICE_ID_ATI_RAGE128_U3 0x5452 -/* Radeon M4 */ -#define PCI_DEVICE_ID_ATI_RADEON_LE 0x4d45 -#define PCI_DEVICE_ID_ATI_RADEON_LF 0x4d46 -/* Radeon NV-100 */ -#define PCI_DEVICE_ID_ATI_RADEON_N1 0x5159 -#define PCI_DEVICE_ID_ATI_RADEON_N2 0x515a -/* Radeon */ -#define PCI_DEVICE_ID_ATI_RADEON_RA 0x5144 -#define PCI_DEVICE_ID_ATI_RADEON_RB 0x5145 -#define PCI_DEVICE_ID_ATI_RADEON_RC 0x5146 -#define PCI_DEVICE_ID_ATI_RADEON_RD 0x5147 -/* RadeonIGP */ -#define PCI_DEVICE_ID_ATI_RADEON_IGP 0xCAB0 - -#define PCI_VENDOR_ID_VLSI 0x1004 -#define PCI_DEVICE_ID_VLSI_82C592 0x0005 -#define PCI_DEVICE_ID_VLSI_82C593 0x0006 -#define PCI_DEVICE_ID_VLSI_82C594 0x0007 -#define PCI_DEVICE_ID_VLSI_82C597 0x0009 -#define PCI_DEVICE_ID_VLSI_82C541 0x000c -#define PCI_DEVICE_ID_VLSI_82C543 0x000d -#define PCI_DEVICE_ID_VLSI_82C532 0x0101 -#define PCI_DEVICE_ID_VLSI_82C534 0x0102 -#define PCI_DEVICE_ID_VLSI_82C535 0x0104 -#define PCI_DEVICE_ID_VLSI_82C147 0x0105 -#define PCI_DEVICE_ID_VLSI_VAS96011 0x0702 - -#define PCI_VENDOR_ID_ADL 0x1005 -#define PCI_DEVICE_ID_ADL_2301 0x2301 - -#define PCI_VENDOR_ID_NS 0x100b -#define PCI_DEVICE_ID_NS_87415 0x0002 -#define PCI_DEVICE_ID_NS_87560_LIO 0x000e -#define PCI_DEVICE_ID_NS_87560_USB 0x0012 -#define PCI_DEVICE_ID_NS_83815 0x0020 -#define PCI_DEVICE_ID_NS_83820 0x0022 -#define PCI_DEVICE_ID_NS_SCx200_BRIDGE 0x0500 -#define PCI_DEVICE_ID_NS_SCx200_SMI 0x0501 -#define PCI_DEVICE_ID_NS_SCx200_IDE 0x0502 -#define PCI_DEVICE_ID_NS_SCx200_AUDIO 0x0503 -#define PCI_DEVICE_ID_NS_SCx200_VIDEO 0x0504 -#define PCI_DEVICE_ID_NS_SCx200_XBUS 0x0505 -#define PCI_DEVICE_ID_NS_87410 0xd001 - -#define PCI_VENDOR_ID_TSENG 0x100c -#define PCI_DEVICE_ID_TSENG_W32P_2 0x3202 -#define PCI_DEVICE_ID_TSENG_W32P_b 0x3205 -#define PCI_DEVICE_ID_TSENG_W32P_c 0x3206 -#define PCI_DEVICE_ID_TSENG_W32P_d 0x3207 -#define PCI_DEVICE_ID_TSENG_ET6000 0x3208 - -#define PCI_VENDOR_ID_WEITEK 0x100e -#define PCI_DEVICE_ID_WEITEK_P9000 0x9001 -#define PCI_DEVICE_ID_WEITEK_P9100 0x9100 - -#define PCI_VENDOR_ID_DEC 0x1011 -#define PCI_DEVICE_ID_DEC_BRD 0x0001 -#define PCI_DEVICE_ID_DEC_TULIP 0x0002 -#define PCI_DEVICE_ID_DEC_TGA 0x0004 -#define PCI_DEVICE_ID_DEC_TULIP_FAST 0x0009 -#define PCI_DEVICE_ID_DEC_TGA2 0x000D -#define PCI_DEVICE_ID_DEC_FDDI 0x000F -#define PCI_DEVICE_ID_DEC_TULIP_PLUS 0x0014 -#define PCI_DEVICE_ID_DEC_21142 0x0019 -#define PCI_DEVICE_ID_DEC_21052 0x0021 -#define PCI_DEVICE_ID_DEC_21150 0x0022 -#define PCI_DEVICE_ID_DEC_21152 0x0024 -#define PCI_DEVICE_ID_DEC_21153 0x0025 -#define PCI_DEVICE_ID_DEC_21154 0x0026 -#define PCI_DEVICE_ID_DEC_21285 0x1065 -#define PCI_DEVICE_ID_COMPAQ_42XX 0x0046 - -#define PCI_VENDOR_ID_CIRRUS 0x1013 -#define PCI_DEVICE_ID_CIRRUS_7548 0x0038 -#define PCI_DEVICE_ID_CIRRUS_5430 0x00a0 -#define PCI_DEVICE_ID_CIRRUS_5434_4 0x00a4 -#define PCI_DEVICE_ID_CIRRUS_5434_8 0x00a8 -#define PCI_DEVICE_ID_CIRRUS_5436 0x00ac -#define PCI_DEVICE_ID_CIRRUS_5446 0x00b8 -#define PCI_DEVICE_ID_CIRRUS_5480 0x00bc -#define PCI_DEVICE_ID_CIRRUS_5462 0x00d0 -#define PCI_DEVICE_ID_CIRRUS_5464 0x00d4 -#define PCI_DEVICE_ID_CIRRUS_5465 0x00d6 -#define PCI_DEVICE_ID_CIRRUS_6729 0x1100 -#define PCI_DEVICE_ID_CIRRUS_6832 0x1110 -#define PCI_DEVICE_ID_CIRRUS_7542 0x1200 -#define PCI_DEVICE_ID_CIRRUS_7543 0x1202 -#define PCI_DEVICE_ID_CIRRUS_7541 0x1204 - -#define PCI_VENDOR_ID_IBM 0x1014 -#define PCI_DEVICE_ID_IBM_FIRE_CORAL 0x000a -#define PCI_DEVICE_ID_IBM_TR 0x0018 -#define PCI_DEVICE_ID_IBM_82G2675 0x001d -#define PCI_DEVICE_ID_IBM_MCA 0x0020 -#define PCI_DEVICE_ID_IBM_82351 0x0022 -#define PCI_DEVICE_ID_IBM_PYTHON 0x002d -#define PCI_DEVICE_ID_IBM_SERVERAID 0x002e -#define PCI_DEVICE_ID_IBM_TR_WAKE 0x003e -#define PCI_DEVICE_ID_IBM_MPIC 0x0046 -#define PCI_DEVICE_ID_IBM_3780IDSP 0x007d -#define PCI_DEVICE_ID_IBM_CHUKAR 0x0096 -#define PCI_DEVICE_ID_IBM_CPC710_PCI64 0x00fc -#define PCI_DEVICE_ID_IBM_CPC710_PCI32 0x0105 -#define PCI_DEVICE_ID_IBM_405GP 0x0156 -#define PCI_DEVICE_ID_IBM_SERVERAIDI960 0x01bd -#define PCI_DEVICE_ID_IBM_MPIC_2 0xffff - -#define PCI_VENDOR_ID_COMPEX2 0x101a // pci.ids says "AT&T GIS (NCR)" -#define PCI_DEVICE_ID_COMPEX2_100VG 0x0005 - -#define PCI_VENDOR_ID_WD 0x101c -#define PCI_DEVICE_ID_WD_7197 0x3296 -#define PCI_DEVICE_ID_WD_90C 0xc24a - -#define PCI_VENDOR_ID_AMI 0x101e -#define PCI_DEVICE_ID_AMI_MEGARAID3 0x1960 -#define PCI_DEVICE_ID_AMI_MEGARAID 0x9010 -#define PCI_DEVICE_ID_AMI_MEGARAID2 0x9060 - -#define PCI_VENDOR_ID_AMD 0x1022 -#define PCI_DEVICE_ID_AMD_LANCE 0x2000 -#define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 -#define PCI_DEVICE_ID_AMD_SCSI 0x2020 -#define PCI_DEVICE_ID_AMD_FE_GATE_7006 0x7006 -#define PCI_DEVICE_ID_AMD_FE_GATE_7007 0x7007 -#define PCI_DEVICE_ID_AMD_FE_GATE_700C 0x700C -#define PCI_DEVICE_ID_AMD_FE_GATE_700D 0x700D -#define PCI_DEVICE_ID_AMD_FE_GATE_700E 0x700E -#define PCI_DEVICE_ID_AMD_FE_GATE_700F 0x700F -#define PCI_DEVICE_ID_AMD_COBRA_7400 0x7400 -#define PCI_DEVICE_ID_AMD_COBRA_7401 0x7401 -#define PCI_DEVICE_ID_AMD_COBRA_7403 0x7403 -#define PCI_DEVICE_ID_AMD_COBRA_7404 0x7404 -#define PCI_DEVICE_ID_AMD_VIPER_7408 0x7408 -#define PCI_DEVICE_ID_AMD_VIPER_7409 0x7409 -#define PCI_DEVICE_ID_AMD_VIPER_740B 0x740B -#define PCI_DEVICE_ID_AMD_VIPER_740C 0x740C -#define PCI_DEVICE_ID_AMD_VIPER_7410 0x7410 -#define PCI_DEVICE_ID_AMD_VIPER_7411 0x7411 -#define PCI_DEVICE_ID_AMD_VIPER_7413 0x7413 -#define PCI_DEVICE_ID_AMD_VIPER_7414 0x7414 -#define PCI_DEVICE_ID_AMD_OPUS_7440 0x7440 -# define PCI_DEVICE_ID_AMD_VIPER_7440 PCI_DEVICE_ID_AMD_OPUS_7440 -#define PCI_DEVICE_ID_AMD_OPUS_7441 0x7441 -# define PCI_DEVICE_ID_AMD_VIPER_7441 PCI_DEVICE_ID_AMD_OPUS_7441 -#define PCI_DEVICE_ID_AMD_OPUS_7443 0x7443 -# define PCI_DEVICE_ID_AMD_VIPER_7443 PCI_DEVICE_ID_AMD_OPUS_7443 -#define PCI_DEVICE_ID_AMD_OPUS_7448 0x7448 -# define PCI_DEVICE_ID_AMD_VIPER_7448 PCI_DEVICE_ID_AMD_OPUS_7448 -#define PCI_DEVICE_ID_AMD_OPUS_7449 0x7449 -# define PCI_DEVICE_ID_AMD_VIPER_7449 PCI_DEVICE_ID_AMD_OPUS_7449 -#define PCI_DEVICE_ID_AMD_8111_LAN 0x7462 -#define PCI_DEVICE_ID_AMD_8111_IDE 0x7469 -#define PCI_DEVICE_ID_AMD_8111_AC97 0x746d -#define PCI_DEVICE_ID_AMD_8131_APIC 0x7450 - -#define PCI_VENDOR_ID_TRIDENT 0x1023 -#define PCI_DEVICE_ID_TRIDENT_4DWAVE_DX 0x2000 -#define PCI_DEVICE_ID_TRIDENT_4DWAVE_NX 0x2001 -#define PCI_DEVICE_ID_TRIDENT_9320 0x9320 -#define PCI_DEVICE_ID_TRIDENT_9388 0x9388 -#define PCI_DEVICE_ID_TRIDENT_9397 0x9397 -#define PCI_DEVICE_ID_TRIDENT_939A 0x939A -#define PCI_DEVICE_ID_TRIDENT_9520 0x9520 -#define PCI_DEVICE_ID_TRIDENT_9525 0x9525 -#define PCI_DEVICE_ID_TRIDENT_9420 0x9420 -#define PCI_DEVICE_ID_TRIDENT_9440 0x9440 -#define PCI_DEVICE_ID_TRIDENT_9660 0x9660 -#define PCI_DEVICE_ID_TRIDENT_9750 0x9750 -#define PCI_DEVICE_ID_TRIDENT_9850 0x9850 -#define PCI_DEVICE_ID_TRIDENT_9880 0x9880 -#define PCI_DEVICE_ID_TRIDENT_8400 0x8400 -#define PCI_DEVICE_ID_TRIDENT_8420 0x8420 -#define PCI_DEVICE_ID_TRIDENT_8500 0x8500 - -#define PCI_VENDOR_ID_AI 0x1025 -#define PCI_DEVICE_ID_AI_M1435 0x1435 - -#define PCI_VENDOR_ID_DELL 0x1028 - -#define PCI_VENDOR_ID_MATROX 0x102B -#define PCI_DEVICE_ID_MATROX_MGA_2 0x0518 -#define PCI_DEVICE_ID_MATROX_MIL 0x0519 -#define PCI_DEVICE_ID_MATROX_MYS 0x051A -#define PCI_DEVICE_ID_MATROX_MIL_2 0x051b -#define PCI_DEVICE_ID_MATROX_MIL_2_AGP 0x051f -#define PCI_DEVICE_ID_MATROX_MGA_IMP 0x0d10 -#define PCI_DEVICE_ID_MATROX_G100_MM 0x1000 -#define PCI_DEVICE_ID_MATROX_G100_AGP 0x1001 -#define PCI_DEVICE_ID_MATROX_G200_PCI 0x0520 -#define PCI_DEVICE_ID_MATROX_G200_AGP 0x0521 -#define PCI_DEVICE_ID_MATROX_G400 0x0525 -#define PCI_DEVICE_ID_MATROX_G550 0x2527 -#define PCI_DEVICE_ID_MATROX_VIA 0x4536 - -#define PCI_VENDOR_ID_CT 0x102c -#define PCI_DEVICE_ID_CT_65545 0x00d8 -#define PCI_DEVICE_ID_CT_65548 0x00dc -#define PCI_DEVICE_ID_CT_65550 0x00e0 -#define PCI_DEVICE_ID_CT_65554 0x00e4 -#define PCI_DEVICE_ID_CT_65555 0x00e5 - -#define PCI_VENDOR_ID_MIRO 0x1031 -#define PCI_DEVICE_ID_MIRO_36050 0x5601 - -#define PCI_VENDOR_ID_NEC 0x1033 -#define PCI_DEVICE_ID_NEC_PCX2 0x0046 -#define PCI_DEVICE_ID_NEC_NILE4 0x005a -#define PCI_DEVICE_ID_NEC_VRC5476 0x009b -#define PCI_DEVICE_ID_NEC_VRC5477_AC97 0x00a6 - -#define PCI_VENDOR_ID_FD 0x1036 -#define PCI_DEVICE_ID_FD_36C70 0x0000 - -#define PCI_VENDOR_ID_SI 0x1039 -#define PCI_DEVICE_ID_SI_5591_AGP 0x0001 -#define PCI_DEVICE_ID_SI_6202 0x0002 -#define PCI_DEVICE_ID_SI_503 0x0008 -#define PCI_DEVICE_ID_SI_ACPI 0x0009 -#define PCI_DEVICE_ID_SI_5597_VGA 0x0200 -#define PCI_DEVICE_ID_SI_6205 0x0205 -#define PCI_DEVICE_ID_SI_501 0x0406 -#define PCI_DEVICE_ID_SI_496 0x0496 -#define PCI_DEVICE_ID_SI_300 0x0300 -#define PCI_DEVICE_ID_SI_315H 0x0310 -#define PCI_DEVICE_ID_SI_315 0x0315 -#define PCI_DEVICE_ID_SI_315PRO 0x0325 -#define PCI_DEVICE_ID_SI_530 0x0530 -#define PCI_DEVICE_ID_SI_540 0x0540 -#define PCI_DEVICE_ID_SI_550 0x0550 -#define PCI_DEVICE_ID_SI_540_VGA 0x5300 -#define PCI_DEVICE_ID_SI_550_VGA 0x5315 -#define PCI_DEVICE_ID_SI_601 0x0601 -#define PCI_DEVICE_ID_SI_620 0x0620 -#define PCI_DEVICE_ID_SI_630 0x0630 -#define PCI_DEVICE_ID_SI_635 0x0635 -#define PCI_DEVICE_ID_SI_640 0x0640 -#define PCI_DEVICE_ID_SI_645 0x0645 -#define PCI_DEVICE_ID_SI_646 0x0646 -#define PCI_DEVICE_ID_SI_648 0x0648 -#define PCI_DEVICE_ID_SI_650 0x0650 -#define PCI_DEVICE_ID_SI_651 0x0651 -#define PCI_DEVICE_ID_SI_652 0x0652 -#define PCI_DEVICE_ID_SI_730 0x0730 -#define PCI_DEVICE_ID_SI_630_VGA 0x6300 -#define PCI_DEVICE_ID_SI_730_VGA 0x7300 -#define PCI_DEVICE_ID_SI_735 0x0735 -#define PCI_DEVICE_ID_SI_740 0x0740 -#define PCI_DEVICE_ID_SI_745 0x0745 -#define PCI_DEVICE_ID_SI_746 0x0746 -#define PCI_DEVICE_ID_SI_748 0x0748 -#define PCI_DEVICE_ID_SI_750 0x0750 -#define PCI_DEVICE_ID_SI_751 0x0751 -#define PCI_DEVICE_ID_SI_752 0x0752 -#define PCI_DEVICE_ID_SI_900 0x0900 -#define PCI_DEVICE_ID_SI_5107 0x5107 -#define PCI_DEVICE_ID_SI_5300 0x5300 -#define PCI_DEVICE_ID_SI_5511 0x5511 -#define PCI_DEVICE_ID_SI_5513 0x5513 -#define PCI_DEVICE_ID_SI_5518 0x5518 -#define PCI_DEVICE_ID_SI_5571 0x5571 -#define PCI_DEVICE_ID_SI_5591 0x5591 -#define PCI_DEVICE_ID_SI_5597 0x5597 -#define PCI_DEVICE_ID_SI_5598 0x5598 -#define PCI_DEVICE_ID_SI_5600 0x5600 -#define PCI_DEVICE_ID_SI_6300 0x6300 -#define PCI_DEVICE_ID_SI_6306 0x6306 -#define PCI_DEVICE_ID_SI_6326 0x6326 -#define PCI_DEVICE_ID_SI_7001 0x7001 -#define PCI_DEVICE_ID_SI_7016 0x7016 - -#define PCI_VENDOR_ID_HP 0x103c -#define PCI_DEVICE_ID_HP_DONNER_GFX 0x1008 -#define PCI_DEVICE_ID_HP_TACHYON 0x1028 -#define PCI_DEVICE_ID_HP_TACHLITE 0x1029 -#define PCI_DEVICE_ID_HP_J2585A 0x1030 -#define PCI_DEVICE_ID_HP_J2585B 0x1031 -#define PCI_DEVICE_ID_HP_SAS 0x1048 -#define PCI_DEVICE_ID_HP_DIVA1 0x1049 -#define PCI_DEVICE_ID_HP_DIVA2 0x104A -#define PCI_DEVICE_ID_HP_SP2_0 0x104B -#define PCI_DEVICE_ID_HP_REO_SBA 0x10f0 -#define PCI_DEVICE_ID_HP_REO_IOC 0x10f1 -#define PCI_DEVICE_ID_HP_ZX1_SBA 0x1229 -#define PCI_DEVICE_ID_HP_ZX1_IOC 0x122a -#define PCI_DEVICE_ID_HP_ZX1_LBA 0x122e - -#define PCI_VENDOR_ID_PCTECH 0x1042 -#define PCI_DEVICE_ID_PCTECH_RZ1000 0x1000 -#define PCI_DEVICE_ID_PCTECH_RZ1001 0x1001 -#define PCI_DEVICE_ID_PCTECH_SAMURAI_0 0x3000 -#define PCI_DEVICE_ID_PCTECH_SAMURAI_1 0x3010 -#define PCI_DEVICE_ID_PCTECH_SAMURAI_IDE 0x3020 - -#define PCI_VENDOR_ID_ASUSTEK 0x1043 -#define PCI_DEVICE_ID_ASUSTEK_0675 0x0675 - -#define PCI_VENDOR_ID_DPT 0x1044 -#define PCI_DEVICE_ID_DPT 0xa400 - -#define PCI_VENDOR_ID_OPTI 0x1045 -#define PCI_DEVICE_ID_OPTI_92C178 0xc178 -#define PCI_DEVICE_ID_OPTI_82C557 0xc557 -#define PCI_DEVICE_ID_OPTI_82C558 0xc558 -#define PCI_DEVICE_ID_OPTI_82C621 0xc621 -#define PCI_DEVICE_ID_OPTI_82C700 0xc700 -#define PCI_DEVICE_ID_OPTI_82C701 0xc701 -#define PCI_DEVICE_ID_OPTI_82C814 0xc814 -#define PCI_DEVICE_ID_OPTI_82C822 0xc822 -#define PCI_DEVICE_ID_OPTI_82C861 0xc861 -#define PCI_DEVICE_ID_OPTI_82C825 0xd568 - -#define PCI_VENDOR_ID_ELSA 0x1048 -#define PCI_DEVICE_ID_ELSA_MICROLINK 0x1000 -#define PCI_DEVICE_ID_ELSA_QS3000 0x3000 - -#define PCI_VENDOR_ID_SGS 0x104a -#define PCI_DEVICE_ID_SGS_2000 0x0008 -#define PCI_DEVICE_ID_SGS_1764 0x0009 - -#define PCI_VENDOR_ID_BUSLOGIC 0x104B -#define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC 0x0140 -#define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER 0x1040 -#define PCI_DEVICE_ID_BUSLOGIC_FLASHPOINT 0x8130 - -#define PCI_VENDOR_ID_TI 0x104c -#define PCI_DEVICE_ID_TI_TVP4010 0x3d04 -#define PCI_DEVICE_ID_TI_TVP4020 0x3d07 -#define PCI_DEVICE_ID_TI_1130 0xac12 -#define PCI_DEVICE_ID_TI_1031 0xac13 -#define PCI_DEVICE_ID_TI_1131 0xac15 -#define PCI_DEVICE_ID_TI_1250 0xac16 -#define PCI_DEVICE_ID_TI_1220 0xac17 -#define PCI_DEVICE_ID_TI_1221 0xac19 -#define PCI_DEVICE_ID_TI_1210 0xac1a -#define PCI_DEVICE_ID_TI_1410 0xac50 -#define PCI_DEVICE_ID_TI_1450 0xac1b -#define PCI_DEVICE_ID_TI_1225 0xac1c -#define PCI_DEVICE_ID_TI_1251A 0xac1d -#define PCI_DEVICE_ID_TI_1211 0xac1e -#define PCI_DEVICE_ID_TI_1251B 0xac1f -#define PCI_DEVICE_ID_TI_4410 0xac41 -#define PCI_DEVICE_ID_TI_4451 0xac42 -#define PCI_DEVICE_ID_TI_1420 0xac51 - -#define PCI_VENDOR_ID_SONY 0x104d -#define PCI_DEVICE_ID_SONY_CXD3222 0x8039 - -#define PCI_VENDOR_ID_OAK 0x104e -#define PCI_DEVICE_ID_OAK_OTI107 0x0107 - -/* Winbond have two vendor IDs! See 0x10ad as well */ -#define PCI_VENDOR_ID_WINBOND2 0x1050 -#define PCI_DEVICE_ID_WINBOND2_89C940 0x0940 -#define PCI_DEVICE_ID_WINBOND2_89C940F 0x5a5a -#define PCI_DEVICE_ID_WINBOND2_6692 0x6692 - -#define PCI_VENDOR_ID_ANIGMA 0x1051 -#define PCI_DEVICE_ID_ANIGMA_MC145575 0x0100 - -#define PCI_VENDOR_ID_EFAR 0x1055 -#define PCI_DEVICE_ID_EFAR_SLC90E66_1 0x9130 -#define PCI_DEVICE_ID_EFAR_SLC90E66_0 0x9460 -#define PCI_DEVICE_ID_EFAR_SLC90E66_2 0x9462 -#define PCI_DEVICE_ID_EFAR_SLC90E66_3 0x9463 - -#define PCI_VENDOR_ID_MOTOROLA 0x1057 -#define PCI_VENDOR_ID_MOTOROLA_OOPS 0x1507 -#define PCI_DEVICE_ID_MOTOROLA_MPC105 0x0001 -#define PCI_DEVICE_ID_MOTOROLA_MPC106 0x0002 -#define PCI_DEVICE_ID_MOTOROLA_MPC107 0x0004 -#define PCI_DEVICE_ID_MOTOROLA_RAVEN 0x4801 -#define PCI_DEVICE_ID_MOTOROLA_FALCON 0x4802 -#define PCI_DEVICE_ID_MOTOROLA_HAWK 0x4803 -#define PCI_DEVICE_ID_MOTOROLA_CPX8216 0x4806 - -#define PCI_VENDOR_ID_PROMISE 0x105a -#define PCI_DEVICE_ID_PROMISE_20265 0x0d30 -#define PCI_DEVICE_ID_PROMISE_20267 0x4d30 -#define PCI_DEVICE_ID_PROMISE_20246 0x4d33 -#define PCI_DEVICE_ID_PROMISE_20262 0x4d38 -#define PCI_DEVICE_ID_PROMISE_20263 0x0D38 -#define PCI_DEVICE_ID_PROMISE_20268 0x4d68 -#define PCI_DEVICE_ID_PROMISE_20270 0x6268 -#define PCI_DEVICE_ID_PROMISE_20269 0x4d69 -#define PCI_DEVICE_ID_PROMISE_20271 0x6269 -#define PCI_DEVICE_ID_PROMISE_20275 0x1275 -#define PCI_DEVICE_ID_PROMISE_20276 0x5275 -#define PCI_DEVICE_ID_PROMISE_20277 0x7275 -#define PCI_DEVICE_ID_PROMISE_5300 0x5300 - -#define PCI_VENDOR_ID_N9 0x105d -#define PCI_DEVICE_ID_N9_I128 0x2309 -#define PCI_DEVICE_ID_N9_I128_2 0x2339 -#define PCI_DEVICE_ID_N9_I128_T2R 0x493d - -#define PCI_VENDOR_ID_UMC 0x1060 -#define PCI_DEVICE_ID_UMC_UM8673F 0x0101 -#define PCI_DEVICE_ID_UMC_UM8891A 0x0891 -#define PCI_DEVICE_ID_UMC_UM8886BF 0x673a -#define PCI_DEVICE_ID_UMC_UM8886A 0x886a -#define PCI_DEVICE_ID_UMC_UM8881F 0x8881 -#define PCI_DEVICE_ID_UMC_UM8886F 0x8886 -#define PCI_DEVICE_ID_UMC_UM9017F 0x9017 -#define PCI_DEVICE_ID_UMC_UM8886N 0xe886 -#define PCI_DEVICE_ID_UMC_UM8891N 0xe891 - -#define PCI_VENDOR_ID_X 0x1061 -#define PCI_DEVICE_ID_X_AGX016 0x0001 - -#define PCI_VENDOR_ID_MYLEX 0x1069 -#define PCI_DEVICE_ID_MYLEX_DAC960_P 0x0001 -#define PCI_DEVICE_ID_MYLEX_DAC960_PD 0x0002 -#define PCI_DEVICE_ID_MYLEX_DAC960_PG 0x0010 -#define PCI_DEVICE_ID_MYLEX_DAC960_LA 0x0020 -#define PCI_DEVICE_ID_MYLEX_DAC960_LP 0x0050 -#define PCI_DEVICE_ID_MYLEX_DAC960_BA 0xBA56 - -#define PCI_VENDOR_ID_PICOP 0x1066 -#define PCI_DEVICE_ID_PICOP_PT86C52X 0x0001 -#define PCI_DEVICE_ID_PICOP_PT80C524 0x8002 - -#define PCI_VENDOR_ID_APPLE 0x106b -#define PCI_DEVICE_ID_APPLE_BANDIT 0x0001 -#define PCI_DEVICE_ID_APPLE_GC 0x0002 -#define PCI_DEVICE_ID_APPLE_HYDRA 0x000e -#define PCI_DEVICE_ID_APPLE_UNI_N_FW 0x0018 -#define PCI_DEVICE_ID_APPLE_KL_USB 0x0019 -#define PCI_DEVICE_ID_APPLE_UNI_N_AGP 0x0020 -#define PCI_DEVICE_ID_APPLE_UNI_N_GMAC 0x0021 -#define PCI_DEVICE_ID_APPLE_KEYLARGO 0x0022 -#define PCI_DEVICE_ID_APPLE_UNI_N_GMACP 0x0024 -#define PCI_DEVICE_ID_APPLE_KEYLARGO_P 0x0025 -#define PCI_DEVICE_ID_APPLE_KL_USB_P 0x0026 -#define PCI_DEVICE_ID_APPLE_UNI_N_AGP_P 0x0027 -#define PCI_DEVICE_ID_APPLE_UNI_N_AGP15 0x002d -#define PCI_DEVICE_ID_APPLE_UNI_N_FW2 0x0030 - -#define PCI_VENDOR_ID_YAMAHA 0x1073 -#define PCI_DEVICE_ID_YAMAHA_724 0x0004 -#define PCI_DEVICE_ID_YAMAHA_724F 0x000d -#define PCI_DEVICE_ID_YAMAHA_740 0x000a -#define PCI_DEVICE_ID_YAMAHA_740C 0x000c -#define PCI_DEVICE_ID_YAMAHA_744 0x0010 -#define PCI_DEVICE_ID_YAMAHA_754 0x0012 - -#define PCI_VENDOR_ID_NEXGEN 0x1074 -#define PCI_DEVICE_ID_NEXGEN_82C501 0x4e78 - -#define PCI_VENDOR_ID_QLOGIC 0x1077 -#define PCI_DEVICE_ID_QLOGIC_ISP1020 0x1020 -#define PCI_DEVICE_ID_QLOGIC_ISP1022 0x1022 -#define PCI_DEVICE_ID_QLOGIC_ISP2100 0x2100 -#define PCI_DEVICE_ID_QLOGIC_ISP2200 0x2200 - -#define PCI_VENDOR_ID_CYRIX 0x1078 -#define PCI_DEVICE_ID_CYRIX_5510 0x0000 -#define PCI_DEVICE_ID_CYRIX_PCI_MASTER 0x0001 -#define PCI_DEVICE_ID_CYRIX_5520 0x0002 -#define PCI_DEVICE_ID_CYRIX_5530_LEGACY 0x0100 -#define PCI_DEVICE_ID_CYRIX_5530_SMI 0x0101 -#define PCI_DEVICE_ID_CYRIX_5530_IDE 0x0102 -#define PCI_DEVICE_ID_CYRIX_5530_AUDIO 0x0103 -#define PCI_DEVICE_ID_CYRIX_5530_VIDEO 0x0104 - -#define PCI_VENDOR_ID_LEADTEK 0x107d -#define PCI_DEVICE_ID_LEADTEK_805 0x0000 - -#define PCI_VENDOR_ID_INTERPHASE 0x107e -#define PCI_DEVICE_ID_INTERPHASE_5526 0x0004 -#define PCI_DEVICE_ID_INTERPHASE_55x6 0x0005 -#define PCI_DEVICE_ID_INTERPHASE_5575 0x0008 - -#define PCI_VENDOR_ID_CONTAQ 0x1080 -#define PCI_DEVICE_ID_CONTAQ_82C599 0x0600 -#define PCI_DEVICE_ID_CONTAQ_82C693 0xc693 - -#define PCI_VENDOR_ID_FOREX 0x1083 - -#define PCI_VENDOR_ID_OLICOM 0x108d -#define PCI_DEVICE_ID_OLICOM_OC3136 0x0001 -#define PCI_DEVICE_ID_OLICOM_OC2315 0x0011 -#define PCI_DEVICE_ID_OLICOM_OC2325 0x0012 -#define PCI_DEVICE_ID_OLICOM_OC2183 0x0013 -#define PCI_DEVICE_ID_OLICOM_OC2326 0x0014 -#define PCI_DEVICE_ID_OLICOM_OC6151 0x0021 - -#define PCI_VENDOR_ID_SUN 0x108e -#define PCI_DEVICE_ID_SUN_EBUS 0x1000 -#define PCI_DEVICE_ID_SUN_HAPPYMEAL 0x1001 -#define PCI_DEVICE_ID_SUN_RIO_EBUS 0x1100 -#define PCI_DEVICE_ID_SUN_RIO_GEM 0x1101 -#define PCI_DEVICE_ID_SUN_RIO_1394 0x1102 -#define PCI_DEVICE_ID_SUN_RIO_USB 0x1103 -#define PCI_DEVICE_ID_SUN_GEM 0x2bad -#define PCI_DEVICE_ID_SUN_SIMBA 0x5000 -#define PCI_DEVICE_ID_SUN_PBM 0x8000 -#define PCI_DEVICE_ID_SUN_SCHIZO 0x8001 -#define PCI_DEVICE_ID_SUN_SABRE 0xa000 -#define PCI_DEVICE_ID_SUN_HUMMINGBIRD 0xa001 - -#define PCI_VENDOR_ID_CMD 0x1095 -#define PCI_DEVICE_ID_CMD_640 0x0640 -#define PCI_DEVICE_ID_CMD_643 0x0643 -#define PCI_DEVICE_ID_CMD_646 0x0646 -#define PCI_DEVICE_ID_CMD_647 0x0647 -#define PCI_DEVICE_ID_CMD_648 0x0648 -#define PCI_DEVICE_ID_CMD_649 0x0649 -#define PCI_DEVICE_ID_CMD_670 0x0670 - -#define PCI_DEVICE_ID_SII_680 0x0680 -#define PCI_DEVICE_ID_SII_3112 0x3112 - -#define PCI_VENDOR_ID_VISION 0x1098 -#define PCI_DEVICE_ID_VISION_QD8500 0x0001 -#define PCI_DEVICE_ID_VISION_QD8580 0x0002 - -#define PCI_VENDOR_ID_BROOKTREE 0x109e -#define PCI_DEVICE_ID_BROOKTREE_848 0x0350 -#define PCI_DEVICE_ID_BROOKTREE_849A 0x0351 -#define PCI_DEVICE_ID_BROOKTREE_878_1 0x036e -#define PCI_DEVICE_ID_BROOKTREE_878 0x0878 -#define PCI_DEVICE_ID_BROOKTREE_8474 0x8474 - -#define PCI_VENDOR_ID_SIERRA 0x10a8 -#define PCI_DEVICE_ID_SIERRA_STB 0x0000 - -#define PCI_VENDOR_ID_SGI 0x10a9 -#define PCI_DEVICE_ID_SGI_IOC3 0x0003 - -#define PCI_VENDOR_ID_ACC 0x10aa -#define PCI_DEVICE_ID_ACC_2056 0x0000 - -#define PCI_VENDOR_ID_WINBOND 0x10ad -#define PCI_DEVICE_ID_WINBOND_83769 0x0001 -#define PCI_DEVICE_ID_WINBOND_82C105 0x0105 -#define PCI_DEVICE_ID_WINBOND_83C553 0x0565 - -#define PCI_VENDOR_ID_DATABOOK 0x10b3 -#define PCI_DEVICE_ID_DATABOOK_87144 0xb106 - -#define PCI_VENDOR_ID_PLX 0x10b5 -#define PCI_DEVICE_ID_PLX_R685 0x1030 -#define PCI_DEVICE_ID_PLX_ROMULUS 0x106a -#define PCI_DEVICE_ID_PLX_SPCOM800 0x1076 -#define PCI_DEVICE_ID_PLX_1077 0x1077 -#define PCI_DEVICE_ID_PLX_SPCOM200 0x1103 -#define PCI_DEVICE_ID_PLX_DJINN_ITOO 0x1151 -#define PCI_DEVICE_ID_PLX_R753 0x1152 -#define PCI_DEVICE_ID_PLX_9050 0x9050 -#define PCI_DEVICE_ID_PLX_9060 0x9060 -#define PCI_DEVICE_ID_PLX_9060ES 0x906E -#define PCI_DEVICE_ID_PLX_9060SD 0x906D -#define PCI_DEVICE_ID_PLX_9080 0x9080 -#define PCI_DEVICE_ID_PLX_GTEK_SERIAL2 0xa001 - -#define PCI_VENDOR_ID_MADGE 0x10b6 -#define PCI_DEVICE_ID_MADGE_MK2 0x0002 -#define PCI_DEVICE_ID_MADGE_C155S 0x1001 - -#define PCI_VENDOR_ID_3COM 0x10b7 -#define PCI_DEVICE_ID_3COM_3C985 0x0001 -#define PCI_DEVICE_ID_3COM_3C339 0x3390 -#define PCI_DEVICE_ID_3COM_3C590 0x5900 -#define PCI_DEVICE_ID_3COM_3C595TX 0x5950 -#define PCI_DEVICE_ID_3COM_3C595T4 0x5951 -#define PCI_DEVICE_ID_3COM_3C595MII 0x5952 -#define PCI_DEVICE_ID_3COM_3C900TPO 0x9000 -#define PCI_DEVICE_ID_3COM_3C900COMBO 0x9001 -#define PCI_DEVICE_ID_3COM_3C905TX 0x9050 -#define PCI_DEVICE_ID_3COM_3C905T4 0x9051 -#define PCI_DEVICE_ID_3COM_3C905B_TX 0x9055 -#define PCI_DEVICE_ID_3COM_3CR990 0x9900 -#define PCI_DEVICE_ID_3COM_3CR990_TX_95 0x9902 -#define PCI_DEVICE_ID_3COM_3CR990_TX_97 0x9903 -#define PCI_DEVICE_ID_3COM_3CR990B 0x9904 -#define PCI_DEVICE_ID_3COM_3CR990_FX 0x9905 -#define PCI_DEVICE_ID_3COM_3CR990SVR95 0x9908 -#define PCI_DEVICE_ID_3COM_3CR990SVR97 0x9909 -#define PCI_DEVICE_ID_3COM_3CR990SVR 0x990a - -#define PCI_VENDOR_ID_SMC 0x10b8 -#define PCI_DEVICE_ID_SMC_EPIC100 0x0005 - -#define PCI_VENDOR_ID_AL 0x10b9 -#define PCI_DEVICE_ID_AL_M1445 0x1445 -#define PCI_DEVICE_ID_AL_M1449 0x1449 -#define PCI_DEVICE_ID_AL_M1451 0x1451 -#define PCI_DEVICE_ID_AL_M1461 0x1461 -#define PCI_DEVICE_ID_AL_M1489 0x1489 -#define PCI_DEVICE_ID_AL_M1511 0x1511 -#define PCI_DEVICE_ID_AL_M1513 0x1513 -#define PCI_DEVICE_ID_AL_M1521 0x1521 -#define PCI_DEVICE_ID_AL_M1523 0x1523 -#define PCI_DEVICE_ID_AL_M1531 0x1531 -#define PCI_DEVICE_ID_AL_M1533 0x1533 -#define PCI_DEVICE_ID_AL_M1535 0x1535 -#define PCI_DEVICE_ID_AL_M1541 0x1541 -#define PCI_DEVICE_ID_AL_M1621 0x1621 -#define PCI_DEVICE_ID_AL_M1631 0x1631 -#define PCI_DEVICE_ID_AL_M1641 0x1641 -#define PCI_DEVICE_ID_AL_M1644 0x1644 -#define PCI_DEVICE_ID_AL_M1647 0x1647 -#define PCI_DEVICE_ID_AL_M1651 0x1651 -#define PCI_DEVICE_ID_AL_M1543 0x1543 -#define PCI_DEVICE_ID_AL_M3307 0x3307 -#define PCI_DEVICE_ID_AL_M4803 0x5215 -#define PCI_DEVICE_ID_AL_M5219 0x5219 -#define PCI_DEVICE_ID_AL_M5229 0x5229 -#define PCI_DEVICE_ID_AL_M5237 0x5237 -#define PCI_DEVICE_ID_AL_M5243 0x5243 -#define PCI_DEVICE_ID_AL_M5451 0x5451 -#define PCI_DEVICE_ID_AL_M7101 0x7101 - -#define PCI_VENDOR_ID_MITSUBISHI 0x10ba - -#define PCI_VENDOR_ID_SURECOM 0x10bd -#define PCI_DEVICE_ID_SURECOM_NE34 0x0e34 - -#define PCI_VENDOR_ID_NEOMAGIC 0x10c8 -#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_NM2070 0x0001 -#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_128V 0x0002 -#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_128ZV 0x0003 -#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_NM2160 0x0004 -#define PCI_DEVICE_ID_NEOMAGIC_MAGICMEDIA_256AV 0x0005 -#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_128ZVPLUS 0x0083 - -#define PCI_VENDOR_ID_ASP 0x10cd -#define PCI_DEVICE_ID_ASP_ABP940 0x1200 -#define PCI_DEVICE_ID_ASP_ABP940U 0x1300 -#define PCI_DEVICE_ID_ASP_ABP940UW 0x2300 - -#define PCI_VENDOR_ID_MACRONIX 0x10d9 -#define PCI_DEVICE_ID_MACRONIX_MX98713 0x0512 -#define PCI_DEVICE_ID_MACRONIX_MX987x5 0x0531 - -#define PCI_VENDOR_ID_TCONRAD 0x10da -#define PCI_DEVICE_ID_TCONRAD_TOKENRING 0x0508 - -#define PCI_VENDOR_ID_CERN 0x10dc -#define PCI_DEVICE_ID_CERN_SPSB_PMC 0x0001 -#define PCI_DEVICE_ID_CERN_SPSB_PCI 0x0002 -#define PCI_DEVICE_ID_CERN_HIPPI_DST 0x0021 -#define PCI_DEVICE_ID_CERN_HIPPI_SRC 0x0022 - -#define PCI_VENDOR_ID_NVIDIA 0x10de -#define PCI_DEVICE_ID_NVIDIA_TNT 0x0020 -#define PCI_DEVICE_ID_NVIDIA_TNT2 0x0028 -#define PCI_DEVICE_ID_NVIDIA_UTNT2 0x0029 -#define PCI_DEVICE_ID_NVIDIA_VTNT2 0x002C -#define PCI_DEVICE_ID_NVIDIA_UVTNT2 0x002D -#define PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE 0x0065 -#define PCI_DEVICE_ID_NVIDIA_ITNT2 0x00A0 -#define PCI_DEVICE_ID_NVIDIA_GEFORCE_SDR 0x0100 -#define PCI_DEVICE_ID_NVIDIA_GEFORCE_DDR 0x0101 -#define PCI_DEVICE_ID_NVIDIA_QUADRO 0x0103 -#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_MX 0x0110 -#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_MX2 0x0111 -#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_GO 0x0112 -#define PCI_DEVICE_ID_NVIDIA_QUADRO2_MXR 0x0113 -#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_GTS 0x0150 -#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_GTS2 0x0151 -#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_ULTRA 0x0152 -#define PCI_DEVICE_ID_NVIDIA_QUADRO2_PRO 0x0153 -#define PCI_DEVICE_ID_NVIDIA_IGEFORCE2 0x01a0 -#define PCI_DEVICE_ID_NVIDIA_NFORCE_IDE 0x01bc -#define PCI_DEVICE_ID_NVIDIA_GEFORCE3 0x0200 -#define PCI_DEVICE_ID_NVIDIA_GEFORCE3_1 0x0201 -#define PCI_DEVICE_ID_NVIDIA_GEFORCE3_2 0x0202 -#define PCI_DEVICE_ID_NVIDIA_QUADRO_DDC 0x0203 - -#define PCI_VENDOR_ID_IMS 0x10e0 -#define PCI_DEVICE_ID_IMS_8849 0x8849 -#define PCI_DEVICE_ID_IMS_TT128 0x9128 -#define PCI_DEVICE_ID_IMS_TT3D 0x9135 - -#define PCI_VENDOR_ID_TEKRAM2 0x10e1 -#define PCI_DEVICE_ID_TEKRAM2_690c 0x690c - -#define PCI_VENDOR_ID_TUNDRA 0x10e3 -#define PCI_DEVICE_ID_TUNDRA_CA91C042 0x0000 - -#define PCI_VENDOR_ID_AMCC 0x10e8 -#define PCI_DEVICE_ID_AMCC_MYRINET 0x8043 -#define PCI_DEVICE_ID_AMCC_PARASTATION 0x8062 -#define PCI_DEVICE_ID_AMCC_S5933 0x807d -#define PCI_DEVICE_ID_AMCC_S5933_HEPC3 0x809c - -#define PCI_VENDOR_ID_INTERG 0x10ea -#define PCI_DEVICE_ID_INTERG_1680 0x1680 -#define PCI_DEVICE_ID_INTERG_1682 0x1682 -#define PCI_DEVICE_ID_INTERG_2000 0x2000 -#define PCI_DEVICE_ID_INTERG_2010 0x2010 -#define PCI_DEVICE_ID_INTERG_5000 0x5000 -#define PCI_DEVICE_ID_INTERG_5050 0x5050 - -#define PCI_VENDOR_ID_REALTEK 0x10ec -#define PCI_DEVICE_ID_REALTEK_8029 0x8029 -#define PCI_DEVICE_ID_REALTEK_8129 0x8129 -#define PCI_DEVICE_ID_REALTEK_8139 0x8139 -#define PCI_DEVICE_ID_REALTEK_8169 0x8169 - -#define PCI_VENDOR_ID_XILINX 0x10ee -#define PCI_DEVICE_ID_TURBOPAM 0x4020 - -#define PCI_VENDOR_ID_TRUEVISION 0x10fa -#define PCI_DEVICE_ID_TRUEVISION_T1000 0x000c - -#define PCI_VENDOR_ID_INIT 0x1101 -#define PCI_DEVICE_ID_INIT_320P 0x9100 -#define PCI_DEVICE_ID_INIT_360P 0x9500 - -#define PCI_VENDOR_ID_CREATIVE 0x1102 // duplicate: ECTIVA -#define PCI_DEVICE_ID_CREATIVE_EMU10K1 0x0002 - -#define PCI_VENDOR_ID_ECTIVA 0x1102 // duplicate: CREATIVE -#define PCI_DEVICE_ID_ECTIVA_EV1938 0x8938 - -#define PCI_VENDOR_ID_TTI 0x1103 -#define PCI_DEVICE_ID_TTI_HPT343 0x0003 -#define PCI_DEVICE_ID_TTI_HPT366 0x0004 -#define PCI_DEVICE_ID_TTI_HPT372 0x0005 -#define PCI_DEVICE_ID_TTI_HPT302 0x0006 -#define PCI_DEVICE_ID_TTI_HPT371 0x0007 -#define PCI_DEVICE_ID_TTI_HPT374 0x0008 -#define PCI_DEVICE_ID_TTI_HPT372N 0x0009 // appoarently a 372N variant? - -#define PCI_VENDOR_ID_VIA 0x1106 -#define PCI_DEVICE_ID_VIA_8363_0 0x0305 -#define PCI_DEVICE_ID_VIA_8371_0 0x0391 -#define PCI_DEVICE_ID_VIA_8501_0 0x0501 -#define PCI_DEVICE_ID_VIA_82C505 0x0505 -#define PCI_DEVICE_ID_VIA_82C561 0x0561 -#define PCI_DEVICE_ID_VIA_82C586_1 0x0571 -#define PCI_DEVICE_ID_VIA_82C576 0x0576 -#define PCI_DEVICE_ID_VIA_82C585 0x0585 -#define PCI_DEVICE_ID_VIA_82C586_0 0x0586 -#define PCI_DEVICE_ID_VIA_82C595 0x0595 -#define PCI_DEVICE_ID_VIA_82C596 0x0596 -#define PCI_DEVICE_ID_VIA_82C597_0 0x0597 -#define PCI_DEVICE_ID_VIA_82C598_0 0x0598 -#define PCI_DEVICE_ID_VIA_8601_0 0x0601 -#define PCI_DEVICE_ID_VIA_8605_0 0x0605 -#define PCI_DEVICE_ID_VIA_82C680 0x0680 -#define PCI_DEVICE_ID_VIA_82C686 0x0686 -#define PCI_DEVICE_ID_VIA_82C691 0x0691 -#define PCI_DEVICE_ID_VIA_82C693 0x0693 -#define PCI_DEVICE_ID_VIA_82C693_1 0x0698 -#define PCI_DEVICE_ID_VIA_82C926 0x0926 -#define PCI_DEVICE_ID_VIA_82C576_1 0x1571 -#define PCI_DEVICE_ID_VIA_82C595_97 0x1595 -#define PCI_DEVICE_ID_VIA_82C586_2 0x3038 -#define PCI_DEVICE_ID_VIA_82C586_3 0x3040 -#define PCI_DEVICE_ID_VIA_6305 0x3044 -#define PCI_DEVICE_ID_VIA_82C596_3 0x3050 -#define PCI_DEVICE_ID_VIA_82C596B_3 0x3051 -#define PCI_DEVICE_ID_VIA_82C686_4 0x3057 -#define PCI_DEVICE_ID_VIA_82C686_5 0x3058 -#define PCI_DEVICE_ID_VIA_8233_5 0x3059 -#define PCI_DEVICE_ID_VIA_8233_7 0x3065 -#define PCI_DEVICE_ID_VIA_82C686_6 0x3068 -#define PCI_DEVICE_ID_VIA_8233_0 0x3074 -#define PCI_DEVICE_ID_VIA_8633_0 0x3091 -#define PCI_DEVICE_ID_VIA_8367_0 0x3099 -#define PCI_DEVICE_ID_VIA_8622 0x3102 -#define PCI_DEVICE_ID_VIA_8233C_0 0x3109 -#define PCI_DEVICE_ID_VIA_8361 0x3112 -#define PCI_DEVICE_ID_VIA_8375 0x3116 -#define PCI_DEVICE_ID_VIA_8233A 0x3147 -#define PCI_DEVICE_ID_VIA_P4X333 0x3168 -#define PCI_DEVICE_ID_VIA_8235 0x3177 -#define PCI_DEVICE_ID_VIA_8377_0 0x3189 -#define PCI_DEVICE_ID_VIA_8377_0 0x3189 -#define PCI_DEVICE_ID_VIA_8237 0x3227 -#define PCI_DEVICE_ID_VIA_86C100A 0x6100 -#define PCI_DEVICE_ID_VIA_8231 0x8231 -#define PCI_DEVICE_ID_VIA_8231_4 0x8235 -#define PCI_DEVICE_ID_VIA_8365_1 0x8305 -#define PCI_DEVICE_ID_VIA_8371_1 0x8391 -#define PCI_DEVICE_ID_VIA_8501_1 0x8501 -#define PCI_DEVICE_ID_VIA_82C597_1 0x8597 -#define PCI_DEVICE_ID_VIA_82C598_1 0x8598 -#define PCI_DEVICE_ID_VIA_8601_1 0x8601 -#define PCI_DEVICE_ID_VIA_8505_1 0x8605 -#define PCI_DEVICE_ID_VIA_8633_1 0xB091 -#define PCI_DEVICE_ID_VIA_8367_1 0xB099 - -#define PCI_VENDOR_ID_SIEMENS 0x110A -#define PCI_DEVICE_ID_SIEMENS_DSCC4 0x2102 - -#define PCI_VENDOR_ID_SMC2 0x1113 -#define PCI_DEVICE_ID_SMC2_1211TX 0x1211 - -#define PCI_VENDOR_ID_VORTEX 0x1119 -#define PCI_DEVICE_ID_VORTEX_GDT60x0 0x0000 -#define PCI_DEVICE_ID_VORTEX_GDT6000B 0x0001 -#define PCI_DEVICE_ID_VORTEX_GDT6x10 0x0002 -#define PCI_DEVICE_ID_VORTEX_GDT6x20 0x0003 -#define PCI_DEVICE_ID_VORTEX_GDT6530 0x0004 -#define PCI_DEVICE_ID_VORTEX_GDT6550 0x0005 -#define PCI_DEVICE_ID_VORTEX_GDT6x17 0x0006 -#define PCI_DEVICE_ID_VORTEX_GDT6x27 0x0007 -#define PCI_DEVICE_ID_VORTEX_GDT6537 0x0008 -#define PCI_DEVICE_ID_VORTEX_GDT6557 0x0009 -#define PCI_DEVICE_ID_VORTEX_GDT6x15 0x000a -#define PCI_DEVICE_ID_VORTEX_GDT6x25 0x000b -#define PCI_DEVICE_ID_VORTEX_GDT6535 0x000c -#define PCI_DEVICE_ID_VORTEX_GDT6555 0x000d -#define PCI_DEVICE_ID_VORTEX_GDT6x17RP 0x0100 -#define PCI_DEVICE_ID_VORTEX_GDT6x27RP 0x0101 -#define PCI_DEVICE_ID_VORTEX_GDT6537RP 0x0102 -#define PCI_DEVICE_ID_VORTEX_GDT6557RP 0x0103 -#define PCI_DEVICE_ID_VORTEX_GDT6x11RP 0x0104 -#define PCI_DEVICE_ID_VORTEX_GDT6x21RP 0x0105 -#define PCI_DEVICE_ID_VORTEX_GDT6x17RP1 0x0110 -#define PCI_DEVICE_ID_VORTEX_GDT6x27RP1 0x0111 -#define PCI_DEVICE_ID_VORTEX_GDT6537RP1 0x0112 -#define PCI_DEVICE_ID_VORTEX_GDT6557RP1 0x0113 -#define PCI_DEVICE_ID_VORTEX_GDT6x11RP1 0x0114 -#define PCI_DEVICE_ID_VORTEX_GDT6x21RP1 0x0115 -#define PCI_DEVICE_ID_VORTEX_GDT6x17RP2 0x0120 -#define PCI_DEVICE_ID_VORTEX_GDT6x27RP2 0x0121 -#define PCI_DEVICE_ID_VORTEX_GDT6537RP2 0x0122 -#define PCI_DEVICE_ID_VORTEX_GDT6557RP2 0x0123 -#define PCI_DEVICE_ID_VORTEX_GDT6x11RP2 0x0124 -#define PCI_DEVICE_ID_VORTEX_GDT6x21RP2 0x0125 - -#define PCI_VENDOR_ID_EF 0x111a -#define PCI_DEVICE_ID_EF_ATM_FPGA 0x0000 -#define PCI_DEVICE_ID_EF_ATM_ASIC 0x0002 - -#define PCI_VENDOR_ID_IDT 0x111d -#define PCI_DEVICE_ID_IDT_IDT77201 0x0001 - -#define PCI_VENDOR_ID_FORE 0x1127 -#define PCI_DEVICE_ID_FORE_PCA200PC 0x0210 -#define PCI_DEVICE_ID_FORE_PCA200E 0x0300 - -#define PCI_VENDOR_ID_IMAGINGTECH 0x112f -#define PCI_DEVICE_ID_IMAGINGTECH_ICPCI 0x0000 - -#define PCI_VENDOR_ID_PHILIPS 0x1131 -#define PCI_DEVICE_ID_PHILIPS_SAA7145 0x7145 -#define PCI_DEVICE_ID_PHILIPS_SAA7146 0x7146 -#define PCI_DEVICE_ID_PHILIPS_SAA9730 0x9730 - -#define PCI_VENDOR_ID_EICON 0x1133 -#define PCI_DEVICE_ID_EICON_DIVA20PRO 0xe001 -#define PCI_DEVICE_ID_EICON_DIVA20 0xe002 -#define PCI_DEVICE_ID_EICON_DIVA20PRO_U 0xe003 -#define PCI_DEVICE_ID_EICON_DIVA20_U 0xe004 -#define PCI_DEVICE_ID_EICON_DIVA201 0xe005 -#define PCI_DEVICE_ID_EICON_DIVA202 0xe00b -#define PCI_DEVICE_ID_EICON_MAESTRA 0xe010 -#define PCI_DEVICE_ID_EICON_MAESTRAQ 0xe012 -#define PCI_DEVICE_ID_EICON_MAESTRAQ_U 0xe013 -#define PCI_DEVICE_ID_EICON_MAESTRAP 0xe014 - -#define PCI_VENDOR_ID_CYCLONE 0x113c -#define PCI_DEVICE_ID_CYCLONE_SDK 0x0001 - -#define PCI_VENDOR_ID_ALLIANCE 0x1142 -#define PCI_DEVICE_ID_ALLIANCE_PROMOTIO 0x3210 -#define PCI_DEVICE_ID_ALLIANCE_PROVIDEO 0x6422 -#define PCI_DEVICE_ID_ALLIANCE_AT24 0x6424 -#define PCI_DEVICE_ID_ALLIANCE_AT3D 0x643d - -#define PCI_VENDOR_ID_SYSKONNECT 0x1148 -#define PCI_DEVICE_ID_SYSKONNECT_FP 0x4000 -#define PCI_DEVICE_ID_SYSKONNECT_TR 0x4200 -#define PCI_DEVICE_ID_SYSKONNECT_GE 0x4300 -#define PCI_DEVICE_ID_SYSKONNECT_YU 0x4320 - -#define PCI_VENDOR_ID_VMIC 0x114a -#define PCI_DEVICE_ID_VMIC_VME 0x7587 - -#define PCI_VENDOR_ID_DIGI 0x114f -#define PCI_DEVICE_ID_DIGI_EPC 0x0002 -#define PCI_DEVICE_ID_DIGI_RIGHTSWITCH 0x0003 -#define PCI_DEVICE_ID_DIGI_XEM 0x0004 -#define PCI_DEVICE_ID_DIGI_XR 0x0005 -#define PCI_DEVICE_ID_DIGI_CX 0x0006 -#define PCI_DEVICE_ID_DIGI_XRJ 0x0009 -#define PCI_DEVICE_ID_DIGI_EPCJ 0x000a -#define PCI_DEVICE_ID_DIGI_XR_920 0x0027 -#define PCI_DEVICE_ID_DIGI_DF_M_IOM2_E 0x0070 -#define PCI_DEVICE_ID_DIGI_DF_M_E 0x0071 -#define PCI_DEVICE_ID_DIGI_DF_M_IOM2_A 0x0072 -#define PCI_DEVICE_ID_DIGI_DF_M_A 0x0073 - -#define PCI_VENDOR_ID_MUTECH 0x1159 -#define PCI_DEVICE_ID_MUTECH_MV1000 0x0001 - -#define PCI_VENDOR_ID_XIRCOM 0x115d -#define PCI_DEVICE_ID_XIRCOM_X3201_ETH 0x0003 -#define PCI_DEVICE_ID_XIRCOM_X3201_MDM 0x0103 - -#define PCI_VENDOR_ID_RENDITION 0x1163 -#define PCI_DEVICE_ID_RENDITION_VERITE 0x0001 -#define PCI_DEVICE_ID_RENDITION_VERITE2100 0x2000 - -#define PCI_VENDOR_ID_SERVERWORKS 0x1166 -#define PCI_DEVICE_ID_SERVERWORKS_HE 0x0008 -#define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009 -#define PCI_DEVICE_ID_SERVERWORKS_CIOB30 0x0010 -#define PCI_DEVICE_ID_SERVERWORKS_CMIC_HE 0x0011 -#define PCI_DEVICE_ID_SERVERWORKS_GCNB_LE 0x0017 -#define PCI_DEVICE_ID_SERVERWORKS_OSB4 0x0200 -#define PCI_DEVICE_ID_SERVERWORKS_CSB5 0x0201 -#define PCI_DEVICE_ID_SERVERWORKS_CSB6 0x0203 -#define PCI_DEVICE_ID_SERVERWORKS_OSB4IDE 0x0211 -#define PCI_DEVICE_ID_SERVERWORKS_CSB5IDE 0x0212 -#define PCI_DEVICE_ID_SERVERWORKS_CSB6IDE 0x0213 -#define PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2 0x0217 -#define PCI_DEVICE_ID_SERVERWORKS_OSB4USB 0x0220 -#define PCI_DEVICE_ID_SERVERWORKS_CSB5USB PCI_DEVICE_ID_SERVERWORKS_OSB4USB -#define PCI_DEVICE_ID_SERVERWORKS_CSB6USB 0x0221 -#define PCI_DEVICE_ID_SERVERWORKS_GCLE 0x0225 -#define PCI_DEVICE_ID_SERVERWORKS_GCLE2 0x0227 -#define PCI_DEVICE_ID_SERVERWORKS_CSB5ISA 0x0230 - -#define PCI_VENDOR_ID_SBE 0x1176 -#define PCI_DEVICE_ID_SBE_WANXL100 0x0301 -#define PCI_DEVICE_ID_SBE_WANXL200 0x0302 -#define PCI_DEVICE_ID_SBE_WANXL400 0x0104 - -#define PCI_VENDOR_ID_TOSHIBA 0x1179 -#define PCI_DEVICE_ID_TOSHIBA_601 0x0601 -#define PCI_DEVICE_ID_TOSHIBA_TOPIC95 0x060a -#define PCI_DEVICE_ID_TOSHIBA_TOPIC97 0x060f - -#define PCI_VENDOR_ID_TOSHIBA_2 0x102f -#define PCI_DEVICE_ID_TOSHIBA_TX3927 0x000a -#define PCI_DEVICE_ID_TOSHIBA_TC35815CF 0x0030 -#define PCI_DEVICE_ID_TOSHIBA_TX4927 0x0180 - -#define PCI_VENDOR_ID_RICOH 0x1180 -#define PCI_DEVICE_ID_RICOH_RL5C465 0x0465 -#define PCI_DEVICE_ID_RICOH_RL5C466 0x0466 -#define PCI_DEVICE_ID_RICOH_RL5C475 0x0475 -#define PCI_DEVICE_ID_RICOH_RL5C476 0x0476 -#define PCI_DEVICE_ID_RICOH_RL5C478 0x0478 - -#define PCI_VENDOR_ID_ARTOP 0x1191 -#define PCI_DEVICE_ID_ARTOP_ATP8400 0x0004 -#define PCI_DEVICE_ID_ARTOP_ATP850UF 0x0005 -#define PCI_DEVICE_ID_ARTOP_ATP860 0x0006 -#define PCI_DEVICE_ID_ARTOP_ATP860R 0x0007 -#define PCI_DEVICE_ID_ARTOP_ATP865 0x0008 -#define PCI_DEVICE_ID_ARTOP_ATP865R 0x0009 -#define PCI_DEVICE_ID_ARTOP_AEC7610 0x8002 -#define PCI_DEVICE_ID_ARTOP_AEC7612UW 0x8010 -#define PCI_DEVICE_ID_ARTOP_AEC7612U 0x8020 -#define PCI_DEVICE_ID_ARTOP_AEC7612S 0x8030 -#define PCI_DEVICE_ID_ARTOP_AEC7612D 0x8040 -#define PCI_DEVICE_ID_ARTOP_AEC7612SUW 0x8050 -#define PCI_DEVICE_ID_ARTOP_8060 0x8060 - -#define PCI_VENDOR_ID_ZEITNET 0x1193 -#define PCI_DEVICE_ID_ZEITNET_1221 0x0001 -#define PCI_DEVICE_ID_ZEITNET_1225 0x0002 - -#define PCI_VENDOR_ID_OMEGA 0x119b -#define PCI_DEVICE_ID_OMEGA_82C092G 0x1221 - -#define PCI_VENDOR_ID_FUJITSU_ME 0x119e -#define PCI_DEVICE_ID_FUJITSU_FS155 0x0001 -#define PCI_DEVICE_ID_FUJITSU_FS50 0x0003 - -#define PCI_SUBVENDOR_ID_KEYSPAN 0x11a9 -#define PCI_SUBDEVICE_ID_KEYSPAN_SX2 0x5334 - -#define PCI_VENDOR_ID_GALILEO 0x11ab -#define PCI_DEVICE_ID_GALILEO_GT64011 0x4146 -#define PCI_DEVICE_ID_GALILEO_GT64111 0x4146 -#define PCI_DEVICE_ID_GALILEO_GT96100 0x9652 -#define PCI_DEVICE_ID_GALILEO_GT96100A 0x9653 - -#define PCI_VENDOR_ID_LITEON 0x11ad -#define PCI_DEVICE_ID_LITEON_LNE100TX 0x0002 - -#define PCI_VENDOR_ID_V3 0x11b0 -#define PCI_DEVICE_ID_V3_V960 0x0001 -#define PCI_DEVICE_ID_V3_V350 0x0001 -#define PCI_DEVICE_ID_V3_V961 0x0002 -#define PCI_DEVICE_ID_V3_V351 0x0002 - -#define PCI_VENDOR_ID_NP 0x11bc -#define PCI_DEVICE_ID_NP_PCI_FDDI 0x0001 - -#define PCI_VENDOR_ID_ATT 0x11c1 -#define PCI_DEVICE_ID_ATT_L56XMF 0x0440 -#define PCI_DEVICE_ID_ATT_VENUS_MODEM 0x480 - -#define PCI_VENDOR_ID_SPECIALIX 0x11cb -#define PCI_DEVICE_ID_SPECIALIX_IO8 0x2000 -#define PCI_DEVICE_ID_SPECIALIX_XIO 0x4000 -#define PCI_DEVICE_ID_SPECIALIX_RIO 0x8000 -#define PCI_SUBDEVICE_ID_SPECIALIX_SPEED4 0xa004 - -#define PCI_VENDOR_ID_AURAVISION 0x11d1 -#define PCI_DEVICE_ID_AURAVISION_VXP524 0x01f7 - -#define PCI_VENDOR_ID_ANALOG_DEVICES 0x11d4 -#define PCI_DEVICE_ID_AD1889JS 0x1889 - -#define PCI_VENDOR_ID_IKON 0x11d5 -#define PCI_DEVICE_ID_IKON_10115 0x0115 -#define PCI_DEVICE_ID_IKON_10117 0x0117 - -#define PCI_VENDOR_ID_ZORAN 0x11de -#define PCI_DEVICE_ID_ZORAN_36057 0x6057 -#define PCI_DEVICE_ID_ZORAN_36120 0x6120 - -#define PCI_VENDOR_ID_KINETIC 0x11f4 -#define PCI_DEVICE_ID_KINETIC_2915 0x2915 - -#define PCI_VENDOR_ID_COMPEX 0x11f6 -#define PCI_DEVICE_ID_COMPEX_ENET100VG4 0x0112 -#define PCI_DEVICE_ID_COMPEX_RL2000 0x1401 - -#define PCI_VENDOR_ID_RP 0x11fe -#define PCI_DEVICE_ID_RP32INTF 0x0001 -#define PCI_DEVICE_ID_RP8INTF 0x0002 -#define PCI_DEVICE_ID_RP16INTF 0x0003 -#define PCI_DEVICE_ID_RP4QUAD 0x0004 -#define PCI_DEVICE_ID_RP8OCTA 0x0005 -#define PCI_DEVICE_ID_RP8J 0x0006 -#define PCI_DEVICE_ID_RPP4 0x000A -#define PCI_DEVICE_ID_RPP8 0x000B -#define PCI_DEVICE_ID_RP8M 0x000C - -#define PCI_VENDOR_ID_CYCLADES 0x120e -#define PCI_DEVICE_ID_CYCLOM_Y_Lo 0x0100 -#define PCI_DEVICE_ID_CYCLOM_Y_Hi 0x0101 -#define PCI_DEVICE_ID_CYCLOM_4Y_Lo 0x0102 -#define PCI_DEVICE_ID_CYCLOM_4Y_Hi 0x0103 -#define PCI_DEVICE_ID_CYCLOM_8Y_Lo 0x0104 -#define PCI_DEVICE_ID_CYCLOM_8Y_Hi 0x0105 -#define PCI_DEVICE_ID_CYCLOM_Z_Lo 0x0200 -#define PCI_DEVICE_ID_CYCLOM_Z_Hi 0x0201 -#define PCI_DEVICE_ID_PC300_RX_2 0x0300 -#define PCI_DEVICE_ID_PC300_RX_1 0x0301 -#define PCI_DEVICE_ID_PC300_TE_2 0x0310 -#define PCI_DEVICE_ID_PC300_TE_1 0x0311 - -#define PCI_VENDOR_ID_ESSENTIAL 0x120f -#define PCI_DEVICE_ID_ESSENTIAL_ROADRUNNER 0x0001 - -#define PCI_VENDOR_ID_O2 0x1217 -#define PCI_DEVICE_ID_O2_6729 0x6729 -#define PCI_DEVICE_ID_O2_6730 0x673a -#define PCI_DEVICE_ID_O2_6832 0x6832 -#define PCI_DEVICE_ID_O2_6836 0x6836 - -#define PCI_VENDOR_ID_3DFX 0x121a -#define PCI_DEVICE_ID_3DFX_VOODOO 0x0001 -#define PCI_DEVICE_ID_3DFX_VOODOO2 0x0002 -#define PCI_DEVICE_ID_3DFX_BANSHEE 0x0003 -#define PCI_DEVICE_ID_3DFX_VOODOO3 0x0005 - -#define PCI_VENDOR_ID_SIGMADES 0x1236 -#define PCI_DEVICE_ID_SIGMADES_6425 0x6401 - -#define PCI_VENDOR_ID_CCUBE 0x123f - -#define PCI_VENDOR_ID_AVM 0x1244 -#define PCI_DEVICE_ID_AVM_B1 0x0700 -#define PCI_DEVICE_ID_AVM_C4 0x0800 -#define PCI_DEVICE_ID_AVM_A1 0x0a00 -#define PCI_DEVICE_ID_AVM_A1_V2 0x0e00 -#define PCI_DEVICE_ID_AVM_C2 0x1100 -#define PCI_DEVICE_ID_AVM_T1 0x1200 - -#define PCI_VENDOR_ID_DIPIX 0x1246 - -#define PCI_VENDOR_ID_STALLION 0x124d -#define PCI_DEVICE_ID_STALLION_ECHPCI832 0x0000 -#define PCI_DEVICE_ID_STALLION_ECHPCI864 0x0002 -#define PCI_DEVICE_ID_STALLION_EIOPCI 0x0003 - -#define PCI_VENDOR_ID_OPTIBASE 0x1255 -#define PCI_DEVICE_ID_OPTIBASE_FORGE 0x1110 -#define PCI_DEVICE_ID_OPTIBASE_FUSION 0x1210 -#define PCI_DEVICE_ID_OPTIBASE_VPLEX 0x2110 -#define PCI_DEVICE_ID_OPTIBASE_VPLEXCC 0x2120 -#define PCI_DEVICE_ID_OPTIBASE_VQUEST 0x2130 - -#define PCI_VENDOR_ID_ESS 0x125d -#define PCI_DEVICE_ID_ESS_ESS1968 0x1968 -#define PCI_DEVICE_ID_ESS_AUDIOPCI 0x1969 -#define PCI_DEVICE_ID_ESS_ESS1978 0x1978 - -#define PCI_VENDOR_ID_SATSAGEM 0x1267 -#define PCI_DEVICE_ID_SATSAGEM_NICCY 0x1016 -#define PCI_DEVICE_ID_SATSAGEM_PCR2101 0x5352 -#define PCI_DEVICE_ID_SATSAGEM_TELSATTURBO 0x5a4b - -#define PCI_VENDOR_ID_HUGHES 0x1273 -#define PCI_DEVICE_ID_HUGHES_DIRECPC 0x0002 - -#define PCI_VENDOR_ID_ENSONIQ 0x1274 -#define PCI_DEVICE_ID_ENSONIQ_CT5880 0x5880 -#define PCI_DEVICE_ID_ENSONIQ_ES1370 0x5000 -#define PCI_DEVICE_ID_ENSONIQ_ES1371 0x1371 - -#define PCI_VENDOR_ID_ROCKWELL 0x127A - -#define PCI_VENDOR_ID_ITE 0x1283 -#define PCI_DEVICE_ID_ITE_IT8172G 0x8172 -#define PCI_DEVICE_ID_ITE_IT8172G_AUDIO 0x0801 -#define PCI_DEVICE_ID_ITE_8872 0x8872 - -#define PCI_DEVICE_ID_ITE_IT8330G_0 0xe886 - -/* formerly Platform Tech */ -#define PCI_VENDOR_ID_ESS_OLD 0x1285 -#define PCI_DEVICE_ID_ESS_ESS0100 0x0100 - -#define PCI_VENDOR_ID_ALTEON 0x12ae -#define PCI_DEVICE_ID_ALTEON_ACENIC 0x0001 - -#define PCI_VENDOR_ID_USR 0x12B9 - -#define PCI_SUBVENDOR_ID_CONNECT_TECH 0x12c4 -#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232 0x0001 -#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232 0x0002 -#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_232 0x0003 -#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485 0x0004 -#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485_4_4 0x0005 -#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_485 0x0006 -#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_485_2_2 0x0007 -#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_485 0x0008 -#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485_2_6 0x0009 -#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH081101V1 0x000A -#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH041101V1 0x000B - -#define PCI_VENDOR_ID_PICTUREL 0x12c5 -#define PCI_DEVICE_ID_PICTUREL_PCIVST 0x0081 - -#define PCI_VENDOR_ID_NVIDIA_SGS 0x12d2 -#define PCI_DEVICE_ID_NVIDIA_SGS_RIVA128 0x0018 - -#define PCI_SUBVENDOR_ID_CHASE_PCIFAST 0x12E0 -#define PCI_SUBDEVICE_ID_CHASE_PCIFAST4 0x0031 -#define PCI_SUBDEVICE_ID_CHASE_PCIFAST8 0x0021 -#define PCI_SUBDEVICE_ID_CHASE_PCIFAST16 0x0011 -#define PCI_SUBDEVICE_ID_CHASE_PCIFAST16FMC 0x0041 -#define PCI_SUBVENDOR_ID_CHASE_PCIRAS 0x124D -#define PCI_SUBDEVICE_ID_CHASE_PCIRAS4 0xF001 -#define PCI_SUBDEVICE_ID_CHASE_PCIRAS8 0xF010 - -#define PCI_VENDOR_ID_AUREAL 0x12eb -#define PCI_DEVICE_ID_AUREAL_VORTEX_1 0x0001 -#define PCI_DEVICE_ID_AUREAL_VORTEX_2 0x0002 - -#define PCI_VENDOR_ID_CBOARDS 0x1307 -#define PCI_DEVICE_ID_CBOARDS_DAS1602_16 0x0001 - -#define PCI_VENDOR_ID_SIIG 0x131f -#define PCI_DEVICE_ID_SIIG_1S_10x_550 0x1000 -#define PCI_DEVICE_ID_SIIG_1S_10x_650 0x1001 -#define PCI_DEVICE_ID_SIIG_1S_10x_850 0x1002 -#define PCI_DEVICE_ID_SIIG_1S1P_10x_550 0x1010 -#define PCI_DEVICE_ID_SIIG_1S1P_10x_650 0x1011 -#define PCI_DEVICE_ID_SIIG_1S1P_10x_850 0x1012 -#define PCI_DEVICE_ID_SIIG_1P_10x 0x1020 -#define PCI_DEVICE_ID_SIIG_2P_10x 0x1021 -#define PCI_DEVICE_ID_SIIG_2S_10x_550 0x1030 -#define PCI_DEVICE_ID_SIIG_2S_10x_650 0x1031 -#define PCI_DEVICE_ID_SIIG_2S_10x_850 0x1032 -#define PCI_DEVICE_ID_SIIG_2S1P_10x_550 0x1034 -#define PCI_DEVICE_ID_SIIG_2S1P_10x_650 0x1035 -#define PCI_DEVICE_ID_SIIG_2S1P_10x_850 0x1036 -#define PCI_DEVICE_ID_SIIG_4S_10x_550 0x1050 -#define PCI_DEVICE_ID_SIIG_4S_10x_650 0x1051 -#define PCI_DEVICE_ID_SIIG_4S_10x_850 0x1052 -#define PCI_DEVICE_ID_SIIG_1S_20x_550 0x2000 -#define PCI_DEVICE_ID_SIIG_1S_20x_650 0x2001 -#define PCI_DEVICE_ID_SIIG_1S_20x_850 0x2002 -#define PCI_DEVICE_ID_SIIG_1P_20x 0x2020 -#define PCI_DEVICE_ID_SIIG_2P_20x 0x2021 -#define PCI_DEVICE_ID_SIIG_2S_20x_550 0x2030 -#define PCI_DEVICE_ID_SIIG_2S_20x_650 0x2031 -#define PCI_DEVICE_ID_SIIG_2S_20x_850 0x2032 -#define PCI_DEVICE_ID_SIIG_2P1S_20x_550 0x2040 -#define PCI_DEVICE_ID_SIIG_2P1S_20x_650 0x2041 -#define PCI_DEVICE_ID_SIIG_2P1S_20x_850 0x2042 -#define PCI_DEVICE_ID_SIIG_1S1P_20x_550 0x2010 -#define PCI_DEVICE_ID_SIIG_1S1P_20x_650 0x2011 -#define PCI_DEVICE_ID_SIIG_1S1P_20x_850 0x2012 -#define PCI_DEVICE_ID_SIIG_4S_20x_550 0x2050 -#define PCI_DEVICE_ID_SIIG_4S_20x_650 0x2051 -#define PCI_DEVICE_ID_SIIG_4S_20x_850 0x2052 -#define PCI_DEVICE_ID_SIIG_2S1P_20x_550 0x2060 -#define PCI_DEVICE_ID_SIIG_2S1P_20x_650 0x2061 -#define PCI_DEVICE_ID_SIIG_2S1P_20x_850 0x2062 - -#define PCI_VENDOR_ID_DOMEX 0x134a -#define PCI_DEVICE_ID_DOMEX_DMX3191D 0x0001 - -#define PCI_VENDOR_ID_QUATECH 0x135C -#define PCI_DEVICE_ID_QUATECH_QSC100 0x0010 -#define PCI_DEVICE_ID_QUATECH_DSC100 0x0020 -#define PCI_DEVICE_ID_QUATECH_DSC200 0x0030 -#define PCI_DEVICE_ID_QUATECH_QSC200 0x0040 -#define PCI_DEVICE_ID_QUATECH_ESC100D 0x0050 -#define PCI_DEVICE_ID_QUATECH_ESC100M 0x0060 - -#define PCI_VENDOR_ID_SEALEVEL 0x135e -#define PCI_DEVICE_ID_SEALEVEL_U530 0x7101 -#define PCI_DEVICE_ID_SEALEVEL_UCOMM2 0x7201 -#define PCI_DEVICE_ID_SEALEVEL_UCOMM422 0x7402 -#define PCI_DEVICE_ID_SEALEVEL_UCOMM232 0x7202 -#define PCI_DEVICE_ID_SEALEVEL_COMM4 0x7401 -#define PCI_DEVICE_ID_SEALEVEL_COMM8 0x7801 - -#define PCI_VENDOR_ID_HYPERCOPE 0x1365 -#define PCI_DEVICE_ID_HYPERCOPE_PLX 0x9050 -#define PCI_SUBDEVICE_ID_HYPERCOPE_OLD_ERGO 0x0104 -#define PCI_SUBDEVICE_ID_HYPERCOPE_ERGO 0x0106 -#define PCI_SUBDEVICE_ID_HYPERCOPE_METRO 0x0107 -#define PCI_SUBDEVICE_ID_HYPERCOPE_CHAMP2 0x0108 -#define PCI_SUBDEVICE_ID_HYPERCOPE_PLEXUS 0x0109 - -#define PCI_VENDOR_ID_KAWASAKI 0x136b -#define PCI_DEVICE_ID_MCHIP_KL5A72002 0xff01 - -#define PCI_VENDOR_ID_LMC 0x1376 -#define PCI_DEVICE_ID_LMC_HSSI 0x0003 -#define PCI_DEVICE_ID_LMC_DS3 0x0004 -#define PCI_DEVICE_ID_LMC_SSI 0x0005 -#define PCI_DEVICE_ID_LMC_T1 0x0006 - -#define PCI_VENDOR_ID_NETGEAR 0x1385 -#define PCI_DEVICE_ID_NETGEAR_GA620 0x620a -#define PCI_DEVICE_ID_NETGEAR_GA622 0x622a - -#define PCI_VENDOR_ID_APPLICOM 0x1389 -#define PCI_DEVICE_ID_APPLICOM_PCIGENERIC 0x0001 -#define PCI_DEVICE_ID_APPLICOM_PCI2000IBS_CAN 0x0002 -#define PCI_DEVICE_ID_APPLICOM_PCI2000PFB 0x0003 - -#define PCI_VENDOR_ID_MOXA 0x1393 -#define PCI_DEVICE_ID_MOXA_C104 0x1040 -#define PCI_DEVICE_ID_MOXA_C168 0x1680 -#define PCI_DEVICE_ID_MOXA_CP204J 0x2040 -#define PCI_DEVICE_ID_MOXA_C218 0x2180 -#define PCI_DEVICE_ID_MOXA_C320 0x3200 - -#define PCI_VENDOR_ID_CCD 0x1397 -#define PCI_DEVICE_ID_CCD_2BD0 0x2bd0 -#define PCI_DEVICE_ID_CCD_B000 0xb000 -#define PCI_DEVICE_ID_CCD_B006 0xb006 -#define PCI_DEVICE_ID_CCD_B007 0xb007 -#define PCI_DEVICE_ID_CCD_B008 0xb008 -#define PCI_DEVICE_ID_CCD_B009 0xb009 -#define PCI_DEVICE_ID_CCD_B00A 0xb00a -#define PCI_DEVICE_ID_CCD_B00B 0xb00b -#define PCI_DEVICE_ID_CCD_B00C 0xb00c -#define PCI_DEVICE_ID_CCD_B100 0xb100 - -#define PCI_VENDOR_ID_3WARE 0x13C1 -#define PCI_DEVICE_ID_3WARE_1000 0x1000 - -#define PCI_VENDOR_ID_ABOCOM 0x13D1 -#define PCI_DEVICE_ID_ABOCOM_2BD1 0x2BD1 - -#define PCI_VENDOR_ID_CMEDIA 0x13f6 -#define PCI_DEVICE_ID_CMEDIA_CM8338A 0x0100 -#define PCI_DEVICE_ID_CMEDIA_CM8338B 0x0101 -#define PCI_DEVICE_ID_CMEDIA_CM8738 0x0111 -#define PCI_DEVICE_ID_CMEDIA_CM8738B 0x0112 - -#define PCI_VENDOR_ID_LAVA 0x1407 -#define PCI_DEVICE_ID_LAVA_DSERIAL 0x0100 /* 2x 16550 */ -#define PCI_DEVICE_ID_LAVA_QUATRO_A 0x0101 /* 2x 16550, half of 4 port */ -#define PCI_DEVICE_ID_LAVA_QUATRO_B 0x0102 /* 2x 16550, half of 4 port */ -#define PCI_DEVICE_ID_LAVA_OCTO_A 0x0180 /* 4x 16550A, half of 8 port */ -#define PCI_DEVICE_ID_LAVA_OCTO_B 0x0181 /* 4x 16550A, half of 8 port */ -#define PCI_DEVICE_ID_LAVA_PORT_PLUS 0x0200 /* 2x 16650 */ -#define PCI_DEVICE_ID_LAVA_QUAD_A 0x0201 /* 2x 16650, half of 4 port */ -#define PCI_DEVICE_ID_LAVA_QUAD_B 0x0202 /* 2x 16650, half of 4 port */ -#define PCI_DEVICE_ID_LAVA_SSERIAL 0x0500 /* 1x 16550 */ -#define PCI_DEVICE_ID_LAVA_PORT_650 0x0600 /* 1x 16650 */ -#define PCI_DEVICE_ID_LAVA_PARALLEL 0x8000 -#define PCI_DEVICE_ID_LAVA_DUAL_PAR_A 0x8002 /* The Lava Dual Parallel is */ -#define PCI_DEVICE_ID_LAVA_DUAL_PAR_B 0x8003 /* two PCI devices on a card */ -#define PCI_DEVICE_ID_LAVA_BOCA_IOPPAR 0x8800 - -#define PCI_VENDOR_ID_TIMEDIA 0x1409 -#define PCI_DEVICE_ID_TIMEDIA_1889 0x7168 - -#define PCI_VENDOR_ID_OXSEMI 0x1415 -#define PCI_DEVICE_ID_OXSEMI_12PCI840 0x8403 -#define PCI_DEVICE_ID_OXSEMI_16PCI954 0x9501 -#define PCI_DEVICE_ID_OXSEMI_16PCI95N 0x9511 -#define PCI_DEVICE_ID_OXSEMI_16PCI954PP 0x9513 -#define PCI_DEVICE_ID_OXSEMI_16PCI952 0x9521 - -#define PCI_VENDOR_ID_AIRONET 0x14b9 -#define PCI_DEVICE_ID_AIRONET_4800_1 0x0001 -#define PCI_DEVICE_ID_AIRONET_4800 0x4500 // values switched? see -#define PCI_DEVICE_ID_AIRONET_4500 0x4800 // drivers/net/aironet4500_card.c - -#define PCI_VENDOR_ID_TITAN 0x14D2 -#define PCI_DEVICE_ID_TITAN_010L 0x8001 -#define PCI_DEVICE_ID_TITAN_100L 0x8010 -#define PCI_DEVICE_ID_TITAN_110L 0x8011 -#define PCI_DEVICE_ID_TITAN_200L 0x8020 -#define PCI_DEVICE_ID_TITAN_210L 0x8021 -#define PCI_DEVICE_ID_TITAN_400L 0x8040 -#define PCI_DEVICE_ID_TITAN_800L 0x8080 -#define PCI_DEVICE_ID_TITAN_100 0xA001 -#define PCI_DEVICE_ID_TITAN_200 0xA005 -#define PCI_DEVICE_ID_TITAN_400 0xA003 -#define PCI_DEVICE_ID_TITAN_800B 0xA004 - -#define PCI_VENDOR_ID_PANACOM 0x14d4 -#define PCI_DEVICE_ID_PANACOM_QUADMODEM 0x0400 -#define PCI_DEVICE_ID_PANACOM_DUALMODEM 0x0402 - -#define PCI_VENDOR_ID_AFAVLAB 0x14db -#define PCI_DEVICE_ID_AFAVLAB_P028 0x2180 - -#define PCI_VENDOR_ID_BROADCOM 0x14e4 -#define PCI_DEVICE_ID_TIGON3_5700 0x1644 -#define PCI_DEVICE_ID_TIGON3_5701 0x1645 -#define PCI_DEVICE_ID_TIGON3_5702 0x1646 -#define PCI_DEVICE_ID_TIGON3_5703 0x1647 -#define PCI_DEVICE_ID_TIGON3_5704 0x1648 -#define PCI_DEVICE_ID_TIGON3_5702FE 0x164d -#define PCI_DEVICE_ID_TIGON3_5702X 0x16a6 -#define PCI_DEVICE_ID_TIGON3_5703X 0x16a7 -#define PCI_DEVICE_ID_TIGON3_5704S 0x16a8 -#define PCI_DEVICE_ID_TIGON3_5702A3 0x16c6 -#define PCI_DEVICE_ID_TIGON3_5703A3 0x16c7 - -#define PCI_VENDOR_ID_SYBA 0x1592 -#define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782 -#define PCI_DEVICE_ID_SYBA_1P_ECP 0x0783 - -#define PCI_VENDOR_ID_MORETON 0x15aa -#define PCI_DEVICE_ID_RASTEL_2PORT 0x2000 - -#define PCI_VENDOR_ID_ZOLTRIX 0x15b0 -#define PCI_DEVICE_ID_ZOLTRIX_2BD0 0x2bd0 - -#define PCI_VENDOR_ID_PDC 0x15e9 -#define PCI_DEVICE_ID_PDC_ADMA100 0x1841 - -#define PCI_VENDOR_ID_ALTIMA 0x173b -#define PCI_DEVICE_ID_ALTIMA_AC1000 0x03e8 -#define PCI_DEVICE_ID_ALTIMA_AC9100 0x03ea - -#define PCI_VENDOR_ID_SYMPHONY 0x1c1c -#define PCI_DEVICE_ID_SYMPHONY_101 0x0001 - -#define PCI_VENDOR_ID_TEKRAM 0x1de1 -#define PCI_DEVICE_ID_TEKRAM_DC290 0xdc29 - -#define PCI_VENDOR_ID_HINT 0x3388 -#define PCI_DEVICE_ID_HINT_VXPROII_IDE 0x8013 - -#define PCI_VENDOR_ID_3DLABS 0x3d3d -#define PCI_DEVICE_ID_3DLABS_300SX 0x0001 -#define PCI_DEVICE_ID_3DLABS_500TX 0x0002 -#define PCI_DEVICE_ID_3DLABS_DELTA 0x0003 -#define PCI_DEVICE_ID_3DLABS_PERMEDIA 0x0004 -#define PCI_DEVICE_ID_3DLABS_MX 0x0006 -#define PCI_DEVICE_ID_3DLABS_PERMEDIA2 0x0007 -#define PCI_DEVICE_ID_3DLABS_GAMMA 0x0008 -#define PCI_DEVICE_ID_3DLABS_PERMEDIA2V 0x0009 - -#define PCI_VENDOR_ID_AVANCE 0x4005 -#define PCI_DEVICE_ID_AVANCE_ALG2064 0x2064 -#define PCI_DEVICE_ID_AVANCE_2302 0x2302 - -#define PCI_VENDOR_ID_AKS 0x416c -#define PCI_DEVICE_ID_AKS_ALADDINCARD 0x0100 -#define PCI_DEVICE_ID_AKS_CPC 0x0200 - -#define PCI_VENDOR_ID_NETVIN 0x4a14 -#define PCI_DEVICE_ID_NETVIN_NV5000SC 0x5000 - -#define PCI_VENDOR_ID_S3 0x5333 -#define PCI_DEVICE_ID_S3_PLATO_PXS 0x0551 -#define PCI_DEVICE_ID_S3_ViRGE 0x5631 -#define PCI_DEVICE_ID_S3_TRIO 0x8811 -#define PCI_DEVICE_ID_S3_AURORA64VP 0x8812 -#define PCI_DEVICE_ID_S3_TRIO64UVP 0x8814 -#define PCI_DEVICE_ID_S3_ViRGE_VX 0x883d -#define PCI_DEVICE_ID_S3_868 0x8880 -#define PCI_DEVICE_ID_S3_928 0x88b0 -#define PCI_DEVICE_ID_S3_864_1 0x88c0 -#define PCI_DEVICE_ID_S3_864_2 0x88c1 -#define PCI_DEVICE_ID_S3_964_1 0x88d0 -#define PCI_DEVICE_ID_S3_964_2 0x88d1 -#define PCI_DEVICE_ID_S3_968 0x88f0 -#define PCI_DEVICE_ID_S3_TRIO64V2 0x8901 -#define PCI_DEVICE_ID_S3_PLATO_PXG 0x8902 -#define PCI_DEVICE_ID_S3_ViRGE_DXGX 0x8a01 -#define PCI_DEVICE_ID_S3_ViRGE_GX2 0x8a10 -#define PCI_DEVICE_ID_S3_ViRGE_MX 0x8c01 -#define PCI_DEVICE_ID_S3_ViRGE_MXP 0x8c02 -#define PCI_DEVICE_ID_S3_ViRGE_MXPMV 0x8c03 -#define PCI_DEVICE_ID_S3_SONICVIBES 0xca00 - -#define PCI_VENDOR_ID_DUNORD 0x5544 -#define PCI_DEVICE_ID_DUNORD_I3000 0x0001 -#define PCI_VENDOR_ID_GENROCO 0x5555 -#define PCI_DEVICE_ID_GENROCO_HFP832 0x0003 - -#define PCI_VENDOR_ID_DCI 0x6666 -#define PCI_DEVICE_ID_DCI_PCCOM4 0x0001 -#define PCI_DEVICE_ID_DCI_PCCOM8 0x0002 - -#define PCI_VENDOR_ID_INTEL 0x8086 -#define PCI_DEVICE_ID_INTEL_21145 0x0039 -#define PCI_DEVICE_ID_INTEL_82375 0x0482 -#define PCI_DEVICE_ID_INTEL_82424 0x0483 -#define PCI_DEVICE_ID_INTEL_82378 0x0484 -#define PCI_DEVICE_ID_INTEL_82430 0x0486 -#define PCI_DEVICE_ID_INTEL_82434 0x04a3 -#define PCI_DEVICE_ID_INTEL_I960 0x0960 -#define PCI_DEVICE_ID_INTEL_I960RM 0x0962 -#define PCI_DEVICE_ID_INTEL_82562ET 0x1031 - -#define PCI_DEVICE_ID_INTEL_82815_MC 0x1130 - -#define PCI_DEVICE_ID_INTEL_82559ER 0x1209 -#define PCI_DEVICE_ID_INTEL_82092AA_0 0x1221 -#define PCI_DEVICE_ID_INTEL_82092AA_1 0x1222 -#define PCI_DEVICE_ID_INTEL_7116 0x1223 -#define PCI_DEVICE_ID_INTEL_82596 0x1226 -#define PCI_DEVICE_ID_INTEL_82865 0x1227 -#define PCI_DEVICE_ID_INTEL_82557 0x1229 -#define PCI_DEVICE_ID_INTEL_82437 0x122d -#define PCI_DEVICE_ID_INTEL_82371FB_0 0x122e -#define PCI_DEVICE_ID_INTEL_82371FB_1 0x1230 -#define PCI_DEVICE_ID_INTEL_82371MX 0x1234 -#define PCI_DEVICE_ID_INTEL_82437MX 0x1235 -#define PCI_DEVICE_ID_INTEL_82441 0x1237 -#define PCI_DEVICE_ID_INTEL_82380FB 0x124b -#define PCI_DEVICE_ID_INTEL_82439 0x1250 -#define PCI_DEVICE_ID_INTEL_80960_RP 0x1960 -#define PCI_DEVICE_ID_INTEL_82371SB_0 0x7000 -#define PCI_DEVICE_ID_INTEL_82371SB_1 0x7010 -#define PCI_DEVICE_ID_INTEL_82371SB_2 0x7020 -#define PCI_DEVICE_ID_INTEL_82437VX 0x7030 -#define PCI_DEVICE_ID_INTEL_82439TX 0x7100 -#define PCI_DEVICE_ID_INTEL_82371AB_0 0x7110 -#define PCI_DEVICE_ID_INTEL_82371AB 0x7111 -#define PCI_DEVICE_ID_INTEL_82371AB_2 0x7112 -#define PCI_DEVICE_ID_INTEL_82371AB_3 0x7113 -#define PCI_DEVICE_ID_INTEL_82801AA_0 0x2410 -#define PCI_DEVICE_ID_INTEL_82801AA_1 0x2411 -#define PCI_DEVICE_ID_INTEL_82801AA_2 0x2412 -#define PCI_DEVICE_ID_INTEL_82801AA_3 0x2413 -#define PCI_DEVICE_ID_INTEL_82801AA_5 0x2415 -#define PCI_DEVICE_ID_INTEL_82801AA_6 0x2416 -#define PCI_DEVICE_ID_INTEL_82801AA_8 0x2418 -#define PCI_DEVICE_ID_INTEL_82801AB_0 0x2420 -#define PCI_DEVICE_ID_INTEL_82801AB_1 0x2421 -#define PCI_DEVICE_ID_INTEL_82801AB_2 0x2422 -#define PCI_DEVICE_ID_INTEL_82801AB_3 0x2423 -#define PCI_DEVICE_ID_INTEL_82801AB_5 0x2425 -#define PCI_DEVICE_ID_INTEL_82801AB_6 0x2426 -#define PCI_DEVICE_ID_INTEL_82801AB_8 0x2428 -#define PCI_DEVICE_ID_INTEL_82801BA_0 0x2440 -#define PCI_DEVICE_ID_INTEL_82801BA_1 0x2442 -#define PCI_DEVICE_ID_INTEL_82801BA_2 0x2443 -#define PCI_DEVICE_ID_INTEL_82801BA_3 0x2444 -#define PCI_DEVICE_ID_INTEL_82801BA_4 0x2445 -#define PCI_DEVICE_ID_INTEL_82801BA_5 0x2446 -#define PCI_DEVICE_ID_INTEL_82801BA_6 0x2448 -#define PCI_DEVICE_ID_INTEL_82801BA_7 0x2449 -#define PCI_DEVICE_ID_INTEL_82801BA_8 0x244a -#define PCI_DEVICE_ID_INTEL_82801BA_9 0x244b -#define PCI_DEVICE_ID_INTEL_82801BA_10 0x244c -#define PCI_DEVICE_ID_INTEL_82801BA_11 0x244e -#define PCI_DEVICE_ID_INTEL_82801E_0 0x2450 -#define PCI_DEVICE_ID_INTEL_82801E_2 0x2452 -#define PCI_DEVICE_ID_INTEL_82801E_3 0x2453 -#define PCI_DEVICE_ID_INTEL_82801E_9 0x2459 -#define PCI_DEVICE_ID_INTEL_82801E_11 0x245B -#define PCI_DEVICE_ID_INTEL_82801E_14 0x245D -#define PCI_DEVICE_ID_INTEL_82801E_15 0x245E -#define PCI_DEVICE_ID_INTEL_82801CA_0 0x2480 -#define PCI_DEVICE_ID_INTEL_82801CA_2 0x2482 -#define PCI_DEVICE_ID_INTEL_82801CA_3 0x2483 -#define PCI_DEVICE_ID_INTEL_82801CA_4 0x2484 -#define PCI_DEVICE_ID_INTEL_82801CA_5 0x2485 -#define PCI_DEVICE_ID_INTEL_82801CA_6 0x2486 -#define PCI_DEVICE_ID_INTEL_82801CA_7 0x2487 -#define PCI_DEVICE_ID_INTEL_82801CA_10 0x248a -#define PCI_DEVICE_ID_INTEL_82801CA_11 0x248b -#define PCI_DEVICE_ID_INTEL_82801CA_12 0x248c -#define PCI_DEVICE_ID_INTEL_82801DB_0 0x24c0 -#define PCI_DEVICE_ID_INTEL_82801DB_2 0x24c2 -#define PCI_DEVICE_ID_INTEL_82801DB_3 0x24c3 -#define PCI_DEVICE_ID_INTEL_82801DB_4 0x24c4 -#define PCI_DEVICE_ID_INTEL_82801DB_5 0x24c5 -#define PCI_DEVICE_ID_INTEL_82801DB_6 0x24c6 -#define PCI_DEVICE_ID_INTEL_82801DB_7 0x24c7 -#define PCI_DEVICE_ID_INTEL_82801DB_10 0x24ca -#define PCI_DEVICE_ID_INTEL_82801DB_11 0x24cb -#define PCI_DEVICE_ID_INTEL_82801DB_13 0x24cd -#define PCI_DEVICE_ID_INTEL_82801EB_0 0x24d0 -#define PCI_DEVICE_ID_INTEL_82801EB_1 0x24d1 -#define PCI_DEVICE_ID_INTEL_82801EB_2 0x24d2 -#define PCI_DEVICE_ID_INTEL_82801EB_3 0x24d3 -#define PCI_DEVICE_ID_INTEL_82801EB_4 0x24d4 -#define PCI_DEVICE_ID_INTEL_82801EB_5 0x24d5 -#define PCI_DEVICE_ID_INTEL_82801EB_6 0x24d6 -#define PCI_DEVICE_ID_INTEL_82801EB_7 0x24d7 -#define PCI_DEVICE_ID_INTEL_82801DB_10 0x24ca -#define PCI_DEVICE_ID_INTEL_82801EB_11 0x24db -#define PCI_DEVICE_ID_INTEL_82801EB_13 0x24dd -#define PCI_DEVICE_ID_INTEL_80310 0x530d -#define PCI_DEVICE_ID_INTEL_82810_MC1 0x7120 -#define PCI_DEVICE_ID_INTEL_82810_IG1 0x7121 -#define PCI_DEVICE_ID_INTEL_82810_MC3 0x7122 -#define PCI_DEVICE_ID_INTEL_82810_IG3 0x7123 -#define PCI_DEVICE_ID_INTEL_82443LX_0 0x7180 -#define PCI_DEVICE_ID_INTEL_82443LX_1 0x7181 -#define PCI_DEVICE_ID_INTEL_82443BX_0 0x7190 -#define PCI_DEVICE_ID_INTEL_82443BX_1 0x7191 -#define PCI_DEVICE_ID_INTEL_82443BX_2 0x7192 -#define PCI_DEVICE_ID_INTEL_82443MX_0 0x7198 -#define PCI_DEVICE_ID_INTEL_82443MX_1 0x7199 -#define PCI_DEVICE_ID_INTEL_82443MX_2 0x719a -#define PCI_DEVICE_ID_INTEL_82443MX_3 0x719b -#define PCI_DEVICE_ID_INTEL_82372FB_0 0x7600 -#define PCI_DEVICE_ID_INTEL_82372FB_1 0x7601 -#define PCI_DEVICE_ID_INTEL_82372FB_2 0x7602 -#define PCI_DEVICE_ID_INTEL_82372FB_3 0x7603 -#define PCI_DEVICE_ID_INTEL_82454GX 0x84c4 -#define PCI_DEVICE_ID_INTEL_82450GX 0x84c5 -#define PCI_DEVICE_ID_INTEL_82451NX 0x84ca -#define PCI_DEVICE_ID_INTEL_82454NX 0x84cb - -#define PCI_VENDOR_ID_COMPUTONE 0x8e0e -#define PCI_DEVICE_ID_COMPUTONE_IP2EX 0x0291 -#define PCI_DEVICE_ID_COMPUTONE_PG 0x0302 -#define PCI_SUBVENDOR_ID_COMPUTONE 0x8e0e -#define PCI_SUBDEVICE_ID_COMPUTONE_PG4 0x0001 -#define PCI_SUBDEVICE_ID_COMPUTONE_PG8 0x0002 -#define PCI_SUBDEVICE_ID_COMPUTONE_PG6 0x0003 - -#define PCI_VENDOR_ID_KTI 0x8e2e -#define PCI_DEVICE_ID_KTI_ET32P2 0x3000 - -#define PCI_VENDOR_ID_ADAPTEC 0x9004 -#define PCI_DEVICE_ID_ADAPTEC_7810 0x1078 -#define PCI_DEVICE_ID_ADAPTEC_7821 0x2178 -#define PCI_DEVICE_ID_ADAPTEC_38602 0x3860 -#define PCI_DEVICE_ID_ADAPTEC_7850 0x5078 -#define PCI_DEVICE_ID_ADAPTEC_7855 0x5578 -#define PCI_DEVICE_ID_ADAPTEC_5800 0x5800 -#define PCI_DEVICE_ID_ADAPTEC_3860 0x6038 -#define PCI_DEVICE_ID_ADAPTEC_1480A 0x6075 -#define PCI_DEVICE_ID_ADAPTEC_7860 0x6078 -#define PCI_DEVICE_ID_ADAPTEC_7861 0x6178 -#define PCI_DEVICE_ID_ADAPTEC_7870 0x7078 -#define PCI_DEVICE_ID_ADAPTEC_7871 0x7178 -#define PCI_DEVICE_ID_ADAPTEC_7872 0x7278 -#define PCI_DEVICE_ID_ADAPTEC_7873 0x7378 -#define PCI_DEVICE_ID_ADAPTEC_7874 0x7478 -#define PCI_DEVICE_ID_ADAPTEC_7895 0x7895 -#define PCI_DEVICE_ID_ADAPTEC_7880 0x8078 -#define PCI_DEVICE_ID_ADAPTEC_7881 0x8178 -#define PCI_DEVICE_ID_ADAPTEC_7882 0x8278 -#define PCI_DEVICE_ID_ADAPTEC_7883 0x8378 -#define PCI_DEVICE_ID_ADAPTEC_7884 0x8478 -#define PCI_DEVICE_ID_ADAPTEC_7885 0x8578 -#define PCI_DEVICE_ID_ADAPTEC_7886 0x8678 -#define PCI_DEVICE_ID_ADAPTEC_7887 0x8778 -#define PCI_DEVICE_ID_ADAPTEC_7888 0x8878 -#define PCI_DEVICE_ID_ADAPTEC_1030 0x8b78 - -#define PCI_VENDOR_ID_ADAPTEC2 0x9005 -#define PCI_DEVICE_ID_ADAPTEC2_2940U2 0x0010 -#define PCI_DEVICE_ID_ADAPTEC2_2930U2 0x0011 -#define PCI_DEVICE_ID_ADAPTEC2_7890B 0x0013 -#define PCI_DEVICE_ID_ADAPTEC2_7890 0x001f -#define PCI_DEVICE_ID_ADAPTEC2_3940U2 0x0050 -#define PCI_DEVICE_ID_ADAPTEC2_3950U2D 0x0051 -#define PCI_DEVICE_ID_ADAPTEC2_7896 0x005f -#define PCI_DEVICE_ID_ADAPTEC2_7892A 0x0080 -#define PCI_DEVICE_ID_ADAPTEC2_7892B 0x0081 -#define PCI_DEVICE_ID_ADAPTEC2_7892D 0x0083 -#define PCI_DEVICE_ID_ADAPTEC2_7892P 0x008f -#define PCI_DEVICE_ID_ADAPTEC2_7899A 0x00c0 -#define PCI_DEVICE_ID_ADAPTEC2_7899B 0x00c1 -#define PCI_DEVICE_ID_ADAPTEC2_7899D 0x00c3 -#define PCI_DEVICE_ID_ADAPTEC2_7899P 0x00cf - -#define PCI_VENDOR_ID_ATRONICS 0x907f -#define PCI_DEVICE_ID_ATRONICS_2015 0x2015 - -#define PCI_VENDOR_ID_HOLTEK 0x9412 -#define PCI_DEVICE_ID_HOLTEK_6565 0x6565 - -#define PCI_VENDOR_ID_NETMOS 0x9710 -#define PCI_DEVICE_ID_NETMOS_9735 0x9735 -#define PCI_DEVICE_ID_NETMOS_9835 0x9835 - -#define PCI_SUBVENDOR_ID_EXSYS 0xd84d -#define PCI_SUBDEVICE_ID_EXSYS_4014 0x4014 - -#define PCI_VENDOR_ID_TIGERJET 0xe159 -#define PCI_DEVICE_ID_TIGERJET_300 0x0001 -#define PCI_DEVICE_ID_TIGERJET_100 0x0002 - -#define PCI_VENDOR_ID_ARK 0xedd8 -#define PCI_DEVICE_ID_ARK_STING 0xa091 -#define PCI_DEVICE_ID_ARK_STINGARK 0xa099 -#define PCI_DEVICE_ID_ARK_2000MT 0xa0a1 - -#define PCI_VENDOR_ID_MICROGATE 0x13c0 -#define PCI_DEVICE_ID_MICROGATE_USC 0x0010 -#define PCI_DEVICE_ID_MICROGATE_SCC 0x0020 -#define PCI_DEVICE_ID_MICROGATE_SCA 0x0030 diff --git a/import/OpenXDK/include/xusb/boot.h b/import/OpenXDK/include/xusb/boot.h deleted file mode 100644 index 3ec58d602..000000000 --- a/import/OpenXDK/include/xusb/boot.h +++ /dev/null @@ -1,624 +0,0 @@ -#ifndef _Boot_H_ -#define _Boot_H_ - -/*************************************************************************** - Includes used by XBox boot code - ***************************************************************************/ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -///////////////////////////////// -// configuration - - -#include -#include -#include "consts.h" -// BB -#if 0 -#include "jpeglib.h" -#endif - -unsigned int cromwell_config; -unsigned int cromwell_retryload; -unsigned int cromwell_loadbank; -unsigned int cromwell_Biostype; -unsigned int xbox_ram; - - -#define XROMWELL 0 -#define CROMWELL 1 - -#define ICON_WIDTH 64 -#define ICON_HEIGH 64 - -static _inline double min (double a, double b) -{ - if (a < b) return a; else return b; -} - -static _inline double max (double a, double b) -{ - if (a > b) return a; else return b; -} - -// filtror is a debugging device designed to make code available over LPC and allow a debug shell -// details are at http://warmcat.com/milksop -// if you don't have one, or are building a final ROM image, keep this at zero - -#define INCLUDE_FILTROR 0 - -// enable logging to serial port. You probably don't have this. - -#define INCLUDE_SERIAL 0 - -// enable trace message printing for debugging - with filtror or serial only -#define PRINT_TRACE 0 -#if PRINT_TRACE -#define TRACE bprintf(__FILE__ " :%d\n\r",__LINE__); -#else -#define TRACE -#endif - -#define INITRD_POS 0x02000000 - -///////////////////////////////// -// some typedefs to make for easy sizing - -typedef unsigned long ULONG; -typedef unsigned int DWORD; -typedef unsigned short WORD; -typedef unsigned char BYTE; -#ifndef bool_already_defined_ - typedef int bool; -#endif -typedef unsigned long RGBA; // LSB=R -> MSB = A -//typedef long long __int64; - -#define guint int -#define guint8 unsigned char - -#define true 1 -#define false 0 - -#ifndef NULL -#define NULL ((void *)0) -#endif - -#define ASSERT(exp) { if(!(exp)) { bprintf("Assert failed file " __FILE__ " line %d\n", __LINE__); } } - -// BB -#if 0 -#include "BootFilesystemIso9660.h" -#endif - -extern void WATCHDOG(void); - -#include "BootVideo.h" - -extern volatile CURRENT_VIDEO_MODE_DETAILS currentvideomodedetails; - -volatile DWORD VIDEO_CURSOR_POSX; -volatile DWORD VIDEO_CURSOR_POSY; -volatile DWORD VIDEO_ATTR; -volatile DWORD VIDEO_LUMASCALING; -volatile DWORD VIDEO_RSCALING; -volatile DWORD VIDEO_BSCALING; -volatile DWORD VIDEO_VSYNC_COUNT; -volatile DWORD BIOS_TICK_COUNT; -volatile DWORD VIDEO_VSYNC_POSITION; -volatile DWORD VIDEO_VSYNC_DIR; -volatile DWORD DVD_TRAY_STATE; - -#define DVD_CLOSED 0 -#define DVD_CLOSING 1 -#define DVD_OPEN 2 -#define DVD_OPENING 3 - -///////////////////////////////// -// Superfunky i386 internal structures - -typedef struct gdt_t { - unsigned short m_wSize __attribute__ ((packed)); - unsigned long m_dwBase32 __attribute__ ((packed)); - unsigned short m_wDummy __attribute__ ((packed)); -} ts_descriptor_pointer; - -typedef struct { // inside an 8-byte protected mode interrupt vector - WORD m_wHandlerHighAddressLow16; - WORD m_wSelector; - WORD m_wType; - WORD m_wHandlerLinearAddressHigh16; -} ts_pm_interrupt; - -typedef enum { - EDT_UNKNOWN= 0, - EDT_XBOXFS -} enumDriveType; - -typedef struct tsHarddiskInfo { // this is the retained knowledge about an IDE device after init - unsigned short m_fwPortBase; - unsigned short m_wCountHeads; - unsigned short m_wCountCylinders; - unsigned short m_wCountSectorsPerTrack; - unsigned long m_dwCountSectorsTotal; /* total */ - unsigned char m_bLbaMode; /* am i lba (0x40) or chs (0x00) */ - unsigned char m_szIdentityModelNumber[40]; - unsigned char term_space_1[2]; - unsigned char m_szSerial[20]; - unsigned char term_space_2[2]; - char m_szFirmware[8]; - unsigned char term_space_3[2]; - unsigned char m_fDriveExists; - unsigned char m_fAtapi; // true if a CDROM, etc - enumDriveType m_enumDriveType; - unsigned char m_bCableConductors; // valid for device 0 if present - unsigned short m_wAtaRevisionSupported; - unsigned char s_length; - unsigned char m_length; - unsigned char m_fHasMbr; -} tsHarddiskInfo; - - -/* a retail Xbox has 64 MB of RAM */ -#define RAMSIZE (64 * 1024*1024) -/* the size of the framebuffer (defaults to 4 MB) */ -#define FRAMEBUFFER_SIZE 0x00400000 -/* the start of the framebuffer */ -#define FRAMEBUFFER_START (0xf0000000 | (RAMSIZE - FRAMEBUFFER_SIZE)) -/* the protected mode part of the kernel has to reside at 1 MB in RAM */ -#define PM_KERNEL_DEST 0x100000 -/* parameters for the kernel have to be here */ -#define KERNEL_SETUP 0x90000 -/* the GDT must not be overwritten, so we place it into an unused - area within KERNEL_SETUP */ -#define GDT_LOC (KERNEL_SETUP+0x800) -/* same with the command line */ -#define CMD_LINE_LOC (KERNEL_SETUP+0x1000) - -/* let's reserve 4 MB at the top for the framebuffer */ -#define RAMSIZE_USE (RAMSIZE - FRAMEBUFFER_SIZE) -/* the initrd resides at 1 MB from the top of RAM */ -#define INITRD_DEST (RAMSIZE_USE - 1024*1024) - -//#define LPCFlashadress 0xFFF00000 -#define LPCFlashadress 0xFF000000 - -///////////////////////////////// -// LED-flashing codes -// or these together as argument to I2cSetFrontpanelLed - -enum { - I2C_LED_RED0 = 0x80, - I2C_LED_RED1 = 0x40, - I2C_LED_RED2 = 0x20, - I2C_LED_RED3 = 0x10, - I2C_LED_GREEN0 = 0x08, - I2C_LED_GREEN1 = 0x04, - I2C_LED_GREEN2 = 0x02, - I2C_LED_GREEN3 = 0x01 -}; - -/////////////////////////////// -/* BIOS-wide error codes all have b31 set */ - -enum { - ERR_SUCCESS = 0, // completed without error - - ERR_I2C_ERROR_TIMEOUT = 0x80000001, // I2C action failed because it did not complete in a reasonable time - ERR_I2C_ERROR_BUS = 0x80000002, // I2C action failed due to non retryable bus error - - ERR_BOOT_PIC_ALG_BROKEN = 0x80000101 // PIC algorithm did not pass its self-test -}; - -///////////////////////////////// -// some Boot API prototypes - -//////// BootPerformPicChallengeResponseAction.c - -/* ---------------------------- IO primitives ----------------------------------------------------------- -*/ - -static __inline void IoOutputByte(WORD wAds, BYTE bValue) { -// __asm__ (" out %%al,%%dx" : : "edx" (dwAds), "al" (bValue) ); - __asm__ __volatile__ ("outb %b0,%w1": :"a" (bValue), "Nd" (wAds)); -} - -static __inline void IoOutputWord(WORD wAds, WORD wValue) { -// __asm__ (" out %%ax,%%dx " : : "edx" (dwAds), "ax" (wValue) ); - __asm__ __volatile__ ("outw %0,%w1": :"a" (wValue), "Nd" (wAds)); - } - -static __inline void IoOutputDword(WORD wAds, DWORD dwValue) { -// __asm__ (" out %%eax,%%dx " : : "edx" (dwAds), "ax" (wValue) ); - __asm__ __volatile__ ("outl %0,%w1": :"a" (dwValue), "Nd" (wAds)); -} - - -static __inline BYTE IoInputByte(WORD wAds) { - unsigned char _v; - - __asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (wAds)); - return _v; -} - -static __inline WORD IoInputWord(WORD wAds) { - WORD _v; - - __asm__ __volatile__ ("inw %w1,%0":"=a" (_v):"Nd" (wAds)); - return _v; -} - -static __inline DWORD IoInputDword(WORD wAds) { - DWORD _v; - - __asm__ __volatile__ ("inl %w1,%0":"=a" (_v):"Nd" (wAds)); - return _v; -} - -#define rdmsr(msr,val1,val2) \ - __asm__ __volatile__("rdmsr" \ - : "=a" (val1), "=d" (val2) \ - : "c" (msr)) - -#define wrmsr(msr,val1,val2) \ - __asm__ __volatile__("wrmsr" \ - : /* no outputs */ \ - : "c" (msr), "a" (val1), "d" (val2)) - - -void BootPciInterruptEnable(void); - - // boot process -int BootPerformPicChallengeResponseAction(void); - // LED control (see associated enum above) -int I2cSetFrontpanelLed(BYTE b); - -//////// filtror.c - -#if INCLUDE_FILTROR - - typedef struct { - DWORD m_dwBlocksFromPc; - DWORD m_dwCountChecksumErrorsSeenFromPc; - DWORD m_dwBlocksToPc; - DWORD m_dwCountTimeoutErrorsSeenToPc; // this member should be incremented by the higher-level protocol when expected response does not happen - } BOOTFILTROR_CHANNEL_QUALITY_STATS; - - extern BOOTFILTROR_CHANNEL_QUALITY_STATS bfcqs; - - // helpers - int BootFiltrorGetIncomingMessageLength(void); - void BootFiltrorMarkIncomingMessageAsHavingBeenRead(void) ; - bool BootFiltrorDoesPcHaveAMessageWaitingForItToRead(void); - void BootFiltrorSetMessageLengthForPcToRead(WORD wChecksum, WORD wLength) ; - int DumpAddressAndData(DWORD dwAds, const BYTE * baData, DWORD dwCountBytesUsable); - // main functions - int BootFiltrorSendArrayToPc(const BYTE * pba, WORD wLength); - int BootFiltrorGetArrayFromPc( BYTE * pba, WORD wLengthMax); - int BootFiltrorSendArrayToPcModal(const BYTE * pba, WORD wLength); - int BootFiltrorSendStringToPcModal(const char *szFormat, ...); - // alias -#define bprintf BootFiltrorSendStringToPcModal -#else -#if INCLUDE_SERIAL -#define bprintf serialprint -#else -#define bprintf(...) -#endif -#endif - -#if INCLUDE_SERIAL - int serialprint(const char *szFormat, ...); -#endif - -#define SPAMI2C() __asm__ __volatile__ (\ - "retry: ; "\ - "movb $0x55, %al ;"\ - "movl $0xc004, %edx ;"\ - "shl $1, %al ;"\ - "out %al, %dx ;"\ -\ - "movb $0xaa, %al ;"\ - "add $4, %edx ;"\ - "out %al, %dx ;"\ -\ - "movb $0xbb, %al ;"\ - "sub $0x2, %edx ;"\ - "out %al, %dx ;"\ -\ - "sub $6, %edx ;"\ - "in %dx, %ax ;"\ - "out %ax, %dx ;"\ - "add $2, %edx ;"\ - "movb $0xa, %al ;"\ - "out %al, %dx ;"\ - "sub $0x2, %dx ;"\ -"spin: ;"\ - "in %dx, %al ;"\ - "test $8, %al ;"\ - "jnz spin ;"\ - "test $8, %al ;"\ - "jnz retry ;"\ - "test $0x24, %al ;"\ -\ - "jmp retry"\ -); - - -typedef struct _LIST_ENTRY { - struct _LIST_ENTRY *m_plistentryNext; - struct _LIST_ENTRY *m_plistentryPrevious; -} LIST_ENTRY; - -void ListEntryInsertAfterCurrent(LIST_ENTRY *plistentryCurrent, LIST_ENTRY *plistentryNew); -void ListEntryRemove(LIST_ENTRY *plistentryCurrent); - -////////// BootPerformXCodeActions.c - -int BootPerformXCodeActions(void); - -#include "BootEEPROM.h" - -///////// BootParser.c -#define MAX_LINE 1024 -typedef struct _CONFIGENTRY { - int nValid; - char szPath[MAX_LINE]; - char szKernel[MAX_LINE]; - char szInitrd[MAX_LINE]; - char szAppend[MAX_LINE]; - int nRivaFB; - int nVesaFB; -} CONFIGENTRY, *LPCONFIGENTRY; - -int ParseConfig(char *szBuffer, CONFIGENTRY *entry, EEPROMDATA *eeprom); - -////////// BootStartBios.c - -void StartBios(CONFIGENTRY *config,int nActivePartition, int nFATXPresent,int bootfrom); -int BootMenue(CONFIGENTRY *config,int nDrive,int nActivePartition, int nFATXPresent); - -////////// BootResetActions.c -void ClearIDT (void); -void BootResetAction(void); -void BootCpuCache(bool fEnable) ; -int printk(const char *szFormat, ...); -void BiosCmosWrite(BYTE bAds, BYTE bData); -BYTE BiosCmosRead(BYTE bAds); - - -///////// BootPciPeripheralInitialization.c -void BootPciPeripheralInitialization(void); -extern void ReadPCIByte(unsigned int bus, unsigned int dev, unsigned intfunc, unsigned int reg_off, unsigned char *pbyteval); -extern void WritePCIByte(unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg_off, unsigned char byteval); -extern void ReadPCIDword(unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg_off, unsigned int *pdwordval); -extern void WritePCIDword(unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg_off, unsigned int dwordval); -extern void ReadPCIBlock(unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg_off, unsigned char *buf, unsigned int nbytes); -extern void WritePCIBlock(unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg_off, unsigned char *buf, unsigned int nbytes); - -void PciWriteByte (unsigned int bus, unsigned int dev, unsigned int func, - unsigned int reg_off, unsigned char byteval); -BYTE PciReadByte(unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg_off); -DWORD PciWriteDword(unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg_off, DWORD dw); -DWORD PciReadDword(unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg_off); - -///////// BootPerformPicChallengeResponseAction.c - -int I2CTransmitWord(BYTE bPicAddressI2cFormat, WORD wDataToWrite); -int I2CTransmitByteGetReturn(BYTE bPicAddressI2cFormat, BYTE bDataToWrite); -bool I2CGetTemperature(int *, int *); -void I2CModifyBits(BYTE bAds, BYTE bReg, BYTE bData, BYTE bMask); - -///////// BootIde.c - -extern tsHarddiskInfo tsaHarddiskInfo[]; // static struct stores data about attached drives -int BootIdeInit(void); -int BootIdeReadSector(int nDriveIndex, void * pbBuffer, unsigned int block, int byte_offset, int n_bytes); -int BootIdeBootSectorHddOrElTorito(int nDriveIndex, BYTE * pbaResult); -int BootIdeAtapiAdditionalSenseCode(int nDrive, BYTE * pba, int nLengthMaxReturn); -BYTE BootIdeGetTrayState(void); -int BootIdeSetTransferMode(int nIndexDrive, int nMode); -int BootIdeWaitNotBusy(unsigned uIoBase); -bool BootIdeAtapiReportFriendlyError(int nDriveIndex, char * szErrorReturn, int nMaxLengthError); -void BootIdeAtapiPrintkFriendlyError(int nDriveIndex); - -///////// BootUSB.c - -void BootStopUSB(void); -void BootStartUSB(void); -void USBGetEvents(void); - -#include "xpad.h" - -extern struct xpad_data XPAD_current[4]; -extern struct xpad_data XPAD_last[4]; - -///////// BootEthernet.c - -int BootStartUpEthernet(void); - -///////// BootAudio.c - -typedef struct { - WORD m_wTimeStartmS; - WORD m_wTimeDurationmS; - DWORD m_dwFrequency; -} SONG_NOTE; - - -typedef enum { - AET_SINE=0, - AET_NOISE -} AUDIO_ELEMENT_TYPES; - -typedef void (*CALLBACK_AFTER_BLOCK)(void * pvoidAc97Device, void * pvoidaudioelement); - - -typedef struct _AUDIO_ELEMENT { // represents a kind of generated sound, needs a derived object to be usable - struct _AUDIO_ELEMENT * m_paudioelementNext; - short m_sPanZeroIsAllLeft7FFFIsAllRight; - AUDIO_ELEMENT_TYPES m_aetType; - DWORD m_dwVolumeElementMaster7fff0000Max; - DWORD m_dwVolumeAttackRate; - DWORD m_dwVolumeAttackLimit; - DWORD m_dwVolumeSustainRate; - DWORD m_dwVolumeSustainLimit; - DWORD m_dwVolumeDecayRate; - BYTE m_bStageZeroIsAttack; - void * m_pvPayload; - DWORD m_dwPayload2; - CALLBACK_AFTER_BLOCK m_callbackEveryBufferFill; - DWORD m_dwCount48kHzSamplesRendered; -} AUDIO_ELEMENT; - -typedef struct _AUDIO_ELEMENT_SINE { // derived object composed from base object AUDIO_ELEMENT represents a sine wave with harmonics - AUDIO_ELEMENT m_paudioelement; - DWORD m_dwComputedFundamentalPhaseIncrementFor48kHzSamples; - short m_saVolumePerHarmonicZeroIsNone7FFFIsFull[5]; // first entry is fundamental, then 2nd harmonic, etc - DWORD m_dwPhaseAccumilator[5]; -} AUDIO_ELEMENT_SINE; - -typedef struct _AUDIO_ELEMENT_NOISE { // derived object composed from base object AUDIO_ELEMENT represents a whitish noise source - AUDIO_ELEMENT m_paudioelement; - short m_sVolumeZeroIsNone7FFFIsFull; - union { - DWORD m_dwShifter; - short m_saSamples[2]; - } shifter; - short m_sLastSample; -} AUDIO_ELEMENT_NOISE; - -typedef struct { // descriptor from AC97 specification - DWORD m_dwBufferStartAddress; - WORD m_wBufferLengthInSamples; // 0=no smaples - WORD m_wBufferControl; // b15=1=issue IRQ on completion, b14=1=last in stream -} AC97_DESCRIPTOR __attribute__ ((aligned (8))); - - -typedef struct { - AC97_DESCRIPTOR m_aac97descriptorPcmSpdif[32]; - AC97_DESCRIPTOR m_aac97descriptorPcmOut[32]; - volatile DWORD * m_pdwMMIO; - volatile DWORD m_dwCount48kHzSamplesRendered; - volatile DWORD m_dwNextDescriptorMod31; - AUDIO_ELEMENT * m_paudioelementFirst; -} AC97_DEVICE __attribute__ ((aligned (8))) ; - -void wait_ms(DWORD ticks); -void wait_smalldelay(void); -void BootAudioInit(volatile AC97_DEVICE * pac97device); -void BootAudioInterrupt(volatile AC97_DEVICE * pac97device); -void BootAudioSilence(volatile AC97_DEVICE * pac97device); -void BootAudioOutBufferToDescriptor(volatile AC97_DEVICE * pac97device, DWORD * pdwBuffer, WORD wLengthInSamples, bool fFinal); -short BootAudioInterpolatedSine(DWORD dwPhase4GIs2PiRadians); -void BootAudioPlayDescriptors(volatile AC97_DEVICE * pac97device); -void BootAudioAttachAudioElement(volatile AC97_DEVICE * pac97device, AUDIO_ELEMENT * paudioelement); -void BootAudioDetachAudioElement(volatile AC97_DEVICE * pac97device, AUDIO_ELEMENT * paudioelement); -void ConstructAUDIO_ELEMENT_SINE(volatile AUDIO_ELEMENT_SINE *, int nFrequencyFundamental); -void DestructAUDIO_ELEMENT_SINE(volatile AC97_DEVICE * pac97device, AUDIO_ELEMENT_SINE * paes); -void ConstructAUDIO_ELEMENT_NOISE(volatile AUDIO_ELEMENT_NOISE *); -void DestructAUDIO_ELEMENT_NOISE(volatile AC97_DEVICE * pac97device, AUDIO_ELEMENT_NOISE * paen); -WORD BootAudioGetMixerSetting(volatile AC97_DEVICE * pac97device, int nSettingIndex); -void BootAudioSetMixerSetting(volatile AC97_DEVICE * pac97device, int nSettingIndex, WORD wValue); - - - // video helpers - -void BootVideoBlit( - DWORD * pdwTopLeftDestination, - DWORD dwCountBytesPerLineDestination, - DWORD * pdwTopLeftSource, - DWORD dwCountBytesPerLineSource, - DWORD dwCountLines -); - -void BootVideoVignette( - DWORD * pdwaTopLeftDestination, - DWORD m_dwCountBytesPerLineDestination, - DWORD m_dwCountLines, - RGBA rgbaColour1, - RGBA rgbaColour2, - DWORD dwStartLine, - DWORD dwEndLine -); - - -typedef struct { - BYTE * m_pBitmapData; - int m_nWidth; - int m_nHeight; - int m_nBytesPerPixel; -} JPEG; - -int BootVideoOverlayString(DWORD * pdwaTopLeftDestination, DWORD m_dwCountBytesPerLineDestination, RGBA rgbaOpaqueness, const char * szString); -void BootVideoChunkedPrint(char * szBuffer, WORD wLength); -int VideoDumpAddressAndData(DWORD dwAds, const BYTE * baData, DWORD dwCountBytesUsable); -unsigned int BootVideoGetStringTotalWidth(const char * szc); -void BootVideoClearScreen(JPEG * pJpeg, int nStartLine, int nEndLine); -void BootVideoJpegBlitBlend( - DWORD * pdwTopLeftDestination, - DWORD dwCountBytesPerLineDestination, - JPEG * pJpeg, - DWORD * pdwTopLeftInJpegBitmap, - RGBA m_rgbaTransparent, - DWORD * pdwTopLeftBackground, - DWORD dwCountBytesPerLineBackground, - DWORD dwCountBytesPerPixelBackground, - int x, - int y -); - -bool BootVideoJpegUnpackAsRgb( - BYTE *pbaJpegFileImage, - int nFileLength, - JPEG * pJpeg -); - -void BootVideoEnableOutput(BYTE bAvPack); -BYTE * BootVideoGetPointerToEffectiveJpegTopLeft(JPEG * pJpeg); - -void * memcpy(void *dest, const void *src, size_t size); -void * memset(void *dest, int data, size_t size); -int _memcmp(const BYTE *pb, const BYTE *pb1, int n); -int _strncmp(const char *sz1, const char *sz2, int nMax); -char * strcpy(char *sz, const char *szc); -char * _strncpy(char *sz, const char *szc, int nLenMax); - -void MemoryManagementInitialization(void * pvStartAddress, DWORD dwTotalMemoryAllocLength); -void * malloc(size_t size); -void free(void *); - -void Sleep(int nMicroseconds); - -extern volatile int nCountI2cinterrupts, nCountUnusedInterrupts, nCountUnusedInterruptsPic2, nCountInterruptsSmc, nCountInterruptsIde; -extern volatile bool fSeenPowerdown; -extern BYTE baBackdrop[60*72*4]; -extern JPEG jpegBackdrop; -typedef enum { - ETS_OPEN_OR_OPENING=0, - ETS_CLOSING, - ETS_CLOSED -} TRAY_STATE; -extern volatile TRAY_STATE traystate; - - -extern void BootInterruptsWriteIdt(void); - -int copy_swap_trim(unsigned char *dst, unsigned char *src, int len); -void HMAC_SHA1( unsigned char *result, - unsigned char *key, int key_length, - unsigned char *text1, int text1_length, - unsigned char *text2, int text2_length ); - -char *HelpGetToken(char *ptr,char token); -void HelpGetParm(char *szBuffer, char *szOrig); -char *strrchr0(char *string, char ch); - -#endif // _Boot_H_ diff --git a/import/OpenXDK/include/xusb/config.h b/import/OpenXDK/include/xusb/config.h deleted file mode 100644 index 8606305a8..000000000 --- a/import/OpenXDK/include/xusb/config.h +++ /dev/null @@ -1,46 +0,0 @@ -////////////////////// compile-time options //////////////////////////////// - -// selects between the supported video modes, see boot.h for enum listing those available -#define VIDEO_PREFERRED_MODE VIDEO_MODE_800x600 - -#define FLASH - -// -// uncomment to force CD boot mode even if MBR present -// default is to boot from HDD if MBR present, else CD -//#define FORCE_CD_BOOT -//#define IS_XBE_CDLOADER -#define MENU - -// uncomment to default to FATX boot if you -// run xromwell as bootloader for FATX - -//#define DEFAULT_FATX - -// Usefull combinations -// -// Booting from CD -// -// #define FORCE_CD_BOOT -// #define IS_XBE_CDLOADER -// #undef MENU -// -// Use xromwell as a normal bootselector from -// HDD -// -// #undef FORCE_CD_BOOT -// #undef IS_XBE_CDLOADER -// #define MENU - -// display a line like Composite 480 detected if uncommented -#undef REPORT_VIDEO_MODE - -// show the MBR table if the MBR is valid -#undef DISPLAY_MBR_INFO - -// uncomment to do Ethernet init -//#define DO_ETHERNET 1 - - -#undef DEBUG_MODE -#undef XPAD_VIBRA_STARTUP diff --git a/import/OpenXDK/include/xusb/consts.h b/import/OpenXDK/include/xusb/consts.h deleted file mode 100644 index e4d69730c..000000000 --- a/import/OpenXDK/include/xusb/consts.h +++ /dev/null @@ -1,86 +0,0 @@ -#ifndef _Consts_H_ -#define _Consts_H_ - -/* - * - * includes for startup code in a form usable by the .S files - * - */ - - /*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#define VERSION "BASE:2.20" - -#define PCI_CFG_ADDR 0x0CF8 -#define PCI_CFG_DATA 0x0CFC - - -#define I2C_IO_BASE 0xc000 - -#define BUS_0 0 -#define BUS_1 1 - -#define DEV_0 0 -#define DEV_1 1 -#define DEV_2 2 -#define DEV_3 3 -#define DEV_4 4 -#define DEV_5 5 -#define DEV_6 6 -#define DEV_7 7 -#define DEV_8 8 -#define DEV_9 9 -#define DEV_a 0xa -#define DEV_b 0xb -#define DEV_c 0xc -#define DEV_d 0xd -#define DEV_e 0xe -#define DEV_f 0xf -#define DEV_10 0x10 -#define DEV_11 0x11 -#define DEV_12 0x12 -#define DEV_13 0x13 -#define DEV_14 0x14 -#define DEV_15 0x15 -#define DEV_16 0x16 -#define DEV_17 0x17 -#define DEV_18 0x18 -#define DEV_19 0x19 -#define DEV_1a 0x1a -#define DEV_1b 0x1b -#define DEV_1c 0x1c -#define DEV_1d 0x1d -#define DEV_1e 0x1e -#define DEV_1f 0x1f - -#define FUNC_0 0 -/* -#define boot_post_macro(value) \ - movb $(value), %al ;\ - outb %al, $0x80 -*/ -/* Filtror debug stuff 4K block used for communications */ -#define FILT_DEBUG_BASE 0xff0fe000 -#define FILT_DEBUG_FOOTPRINT 0x1000 -#define FILT_DEBUG_MAX_DATA ((FILT_DEBUG_FOOTPRINT/2)-4) -#define FILT_DEBUG_TOPC_START (FILT_DEBUG_BASE+0) -#define FILT_DEBUG_FROMPC_START (FILT_DEBUG_BASE+(FILT_DEBUG_FOOTPRINT/2)) -#define FILT_DEBUG_TOPC_LEN (FILT_DEBUG_BASE+(FILT_DEBUG_FOOTPRINT/2)-2) -#define FILT_DEBUG_FROMPC_LEN (FILT_DEBUG_BASE+FILT_DEBUG_FOOTPRINT-2) -#define FILT_DEBUG_TOPC_CHECKSUM (FILT_DEBUG_BASE+(FILT_DEBUG_FOOTPRINT/2)-4) -#define FILT_DEBUG_FROMPC_CHECKSUM (FILT_DEBUG_BASE+FILT_DEBUG_FOOTPRINT-4) - -#define MEMORYMANAGERSTART 0x01000000 -#define MEMORYMANAGERSIZE 0x1000000 // 16 MB -#define MEMORYMANAGEREND 0x01FFFFFF - -#endif // _Consts_H_ - - diff --git a/import/OpenXDK/include/xusb/core/hcd.h b/import/OpenXDK/include/xusb/core/hcd.h deleted file mode 100644 index e646df0ee..000000000 --- a/import/OpenXDK/include/xusb/core/hcd.h +++ /dev/null @@ -1,430 +0,0 @@ -/* - * Copyright (c) 2001-2002 by David Brownell - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#ifdef __KERNEL__ - -/* This file contains declarations of usbcore internals that are mostly - * used or exposed by Host Controller Drivers. - */ - -/* - * USB Packet IDs (PIDs) - */ -#define USB_PID_UNDEF_0 0xf0 -#define USB_PID_OUT 0xe1 -#define USB_PID_ACK 0xd2 -#define USB_PID_DATA0 0xc3 -#define USB_PID_PING 0xb4 /* USB 2.0 */ -#define USB_PID_SOF 0xa5 -#define USB_PID_NYET 0x96 /* USB 2.0 */ -#define USB_PID_DATA2 0x87 /* USB 2.0 */ -#define USB_PID_SPLIT 0x78 /* USB 2.0 */ -#define USB_PID_IN 0x69 -#define USB_PID_NAK 0x5a -#define USB_PID_DATA1 0x4b -#define USB_PID_PREAMBLE 0x3c /* Token mode */ -#define USB_PID_ERR 0x3c /* USB 2.0: handshake mode */ -#define USB_PID_SETUP 0x2d -#define USB_PID_STALL 0x1e -#define USB_PID_MDATA 0x0f /* USB 2.0 */ - -/*-------------------------------------------------------------------------*/ - -/* - * USB Host Controller Driver (usb_hcd) framework - * - * Since "struct usb_bus" is so thin, you can't share much code in it. - * This framework is a layer over that, and should be more sharable. - */ - -/*-------------------------------------------------------------------------*/ - -struct usb_hcd { /* usb_bus.hcpriv points to this */ - - /* - * housekeeping - */ - struct usb_bus self; /* hcd is-a bus */ - - const char *product_desc; /* product/vendor string */ - const char *description; /* "ehci-hcd" etc */ - - struct timer_list rh_timer; /* drives root hub */ - struct list_head dev_list; /* devices on this bus */ - struct work_struct work; - - /* - * hardware info/state - */ - struct hc_driver *driver; /* hw-specific hooks */ - int irq; /* irq allocated */ - void *regs; /* device memory/io */ - struct device *controller; /* handle to hardware */ - - /* a few non-PCI controllers exist, mostly for OHCI */ - struct pci_dev *pdev; /* pci is typical */ -#ifdef CONFIG_PCI - int region; /* pci region for regs */ - u32 pci_state [16]; /* for PM state save */ - atomic_t resume_count; /* multiple resumes issue */ -#endif - -#define HCD_BUFFER_POOLS 4 - struct pci_pool *pool [HCD_BUFFER_POOLS]; - - int state; -# define __ACTIVE 0x01 -# define __SLEEPY 0x02 -# define __SUSPEND 0x04 -# define __TRANSIENT 0x80 - -# define USB_STATE_HALT 0 -# define USB_STATE_RUNNING (__ACTIVE) -# define USB_STATE_READY (__ACTIVE|__SLEEPY) -# define USB_STATE_QUIESCING (__SUSPEND|__TRANSIENT|__ACTIVE) -# define USB_STATE_RESUMING (__SUSPEND|__TRANSIENT) -# define USB_STATE_SUSPENDED (__SUSPEND) - -#define HCD_IS_RUNNING(state) ((state) & __ACTIVE) -#define HCD_IS_SUSPENDED(state) ((state) & __SUSPEND) - - /* more shared queuing code would be good; it should support - * smarter scheduling, handle transaction translators, etc; - * input size of periodic table to an interrupt scheduler. - * (ohci 32, uhci 1024, ehci 256/512/1024). - */ -}; - -/* 2.4 does this a bit differently ... */ -static _inline struct usb_bus *hcd_to_bus (struct usb_hcd *hcd) -{ - return &hcd->self; -} - - -struct hcd_dev { /* usb_device.hcpriv points to this */ - struct list_head dev_list; /* on this hcd */ - struct list_head urb_list; /* pending on this dev */ - - /* per-configuration HC/HCD state, such as QH or ED */ - void *ep[32]; -}; - -// urb.hcpriv is really hardware-specific - -struct hcd_timeout { /* timeouts we allocate */ - struct list_head timeout_list; - struct timer_list timer; -}; - -/*-------------------------------------------------------------------------*/ - -/* - * FIXME usb_operations should vanish or become hc_driver, - * when usb_bus and usb_hcd become the same thing. - */ - -struct usb_operations { - int (*allocate)(struct usb_device *); - int (*deallocate)(struct usb_device *); - int (*get_frame_number) (struct usb_device *usb_dev); - int (*submit_urb) (struct urb *urb, int mem_flags); - int (*unlink_urb) (struct urb *urb); - - /* allocate dma-consistent buffer for URB_DMA_NOMAPPING */ - void *(*buffer_alloc)(struct usb_bus *bus, size_t size, - int mem_flags, - dma_addr_t *dma); - void (*buffer_free)(struct usb_bus *bus, size_t size, - void *addr, dma_addr_t dma); - - void (*disable)(struct usb_device *udev, int bEndpointAddress); -}; - -/* each driver provides one of these, and hardware init support */ - -struct pt_regs; - -struct hc_driver { - const char *description; /* "ehci-hcd" etc */ - - /* irq handler */ - void (*irq) (struct usb_hcd *hcd, struct pt_regs *regs); - - int flags; -#define HCD_MEMORY 0x0001 /* HC regs use memory (else I/O) */ -#define HCD_USB11 0x0010 /* USB 1.1 */ -#define HCD_USB2 0x0020 /* USB 2.0 */ - - /* called to init HCD and root hub */ - int (*start) (struct usb_hcd *hcd); - - /* called after all devices were suspended */ - int (*suspend) (struct usb_hcd *hcd, u32 state); - - /* called before any devices get resumed */ - int (*resume) (struct usb_hcd *hcd); - - /* cleanly make HCD stop writing memory and doing I/O */ - void (*stop) (struct usb_hcd *hcd); - - /* return current frame number */ - int (*get_frame_number) (struct usb_hcd *hcd); - - /* memory lifecycle */ - struct usb_hcd *(*hcd_alloc) (void); - void (*hcd_free) (struct usb_hcd *hcd); - - /* manage i/o requests, device state */ - int (*urb_enqueue) (struct usb_hcd *hcd, struct urb *urb, - int mem_flags); - int (*urb_dequeue) (struct usb_hcd *hcd, struct urb *urb); - - /* hw synch, freeing endpoint resources that urb_dequeue can't */ - void (*endpoint_disable)(struct usb_hcd *hcd, - struct hcd_dev *dev, int bEndpointAddress); - - /* root hub support */ - int (*hub_status_data) (struct usb_hcd *hcd, char *buf); - int (*hub_control) (struct usb_hcd *hcd, - u16 typeReq, u16 wValue, u16 wIndex, - char *buf, u16 wLength); -}; - -extern void usb_hcd_giveback_urb (struct usb_hcd *hcd, struct urb *urb, struct pt_regs *regs); -extern void usb_bus_init (struct usb_bus *bus); -extern void usb_rh_status_dequeue (struct usb_hcd *hcd, struct urb *urb); - -#ifdef CONFIG_PCI -struct pci_dev; -struct pci_device_id; -extern int usb_hcd_pci_probe (struct pci_dev *dev, - const struct pci_device_id *id); -extern void usb_hcd_pci_remove (struct pci_dev *dev); - -#ifdef CONFIG_PM -// FIXME: see Documentation/power/pci.txt (2.4.6 and later?) -// extern int usb_hcd_pci_save_state (struct pci_dev *dev, u32 state); -extern int usb_hcd_pci_suspend (struct pci_dev *dev, u32 state); -extern int usb_hcd_pci_resume (struct pci_dev *dev); -// extern int usb_hcd_pci_enable_wake (struct pci_dev *dev, u32 state, int flg); -#endif /* CONFIG_PM */ - -#endif /* CONFIG_PCI */ - -/* pci-ish (pdev null is ok) buffer alloc/mapping support */ -int hcd_buffer_create (struct usb_hcd *hcd); -void hcd_buffer_destroy (struct usb_hcd *hcd); - -void *hcd_buffer_alloc (struct usb_bus *bus, size_t size, - int mem_flags, dma_addr_t *dma); -void hcd_buffer_free (struct usb_bus *bus, size_t size, - void *addr, dma_addr_t dma); - -/* generic bus glue, needed for host controllers that don't use PCI */ -extern struct usb_operations usb_hcd_operations; -extern irqreturn_t usb_hcd_irq (int irq, void *__hcd, struct pt_regs *r); -extern void usb_hc_died (struct usb_hcd *hcd); - -/* -------------------------------------------------------------------------- */ - -/* Enumeration is only for the hub driver, or HCD virtual root hubs */ -extern int usb_new_device(struct usb_device *dev, struct device *parent); -extern void usb_connect(struct usb_device *dev); -extern void usb_disconnect(struct usb_device **); - -/* exported to hub driver ONLY to support usb_reset_device () */ -extern int usb_get_configuration(struct usb_device *dev); -extern void usb_set_maxpacket(struct usb_device *dev); -extern void usb_destroy_configuration(struct usb_device *dev); -extern int usb_set_address(struct usb_device *dev); - -/* use these only before the device's address has been set */ -#define usb_snddefctrl(dev) ((PIPE_CONTROL << 30)) -#define usb_rcvdefctrl(dev) ((PIPE_CONTROL << 30) | USB_DIR_IN) - -/*-------------------------------------------------------------------------*/ - -/* - * HCD Root Hub support - */ - -#include "hub.h" - -/* (shifted) direction/type/recipient from the USB 2.0 spec, table 9.2 */ -#define DeviceRequest \ - ((USB_DIR_IN|USB_TYPE_STANDARD|USB_RECIP_DEVICE)<<8) -#define DeviceOutRequest \ - ((USB_DIR_OUT|USB_TYPE_STANDARD|USB_RECIP_DEVICE)<<8) - -#define InterfaceRequest \ - ((USB_DIR_IN|USB_TYPE_STANDARD|USB_RECIP_INTERFACE)<<8) - -#define EndpointRequest \ - ((USB_DIR_IN|USB_TYPE_STANDARD|USB_RECIP_INTERFACE)<<8) -#define EndpointOutRequest \ - ((USB_DIR_OUT|USB_TYPE_STANDARD|USB_RECIP_INTERFACE)<<8) - -/* table 9.6 standard features */ -#define DEVICE_REMOTE_WAKEUP 1 -#define ENDPOINT_HALT 0 - -/* class requests from the USB 2.0 hub spec, table 11-15 */ -/* GetBusState and SetHubDescriptor are optional, omitted */ -#define ClearHubFeature (0x2000 | USB_REQ_CLEAR_FEATURE) -#define ClearPortFeature (0x2300 | USB_REQ_CLEAR_FEATURE) -#define GetHubDescriptor (0xa000 | USB_REQ_GET_DESCRIPTOR) -#define GetHubStatus (0xa000 | USB_REQ_GET_STATUS) -#define GetPortStatus (0xa300 | USB_REQ_GET_STATUS) -#define SetHubFeature (0x2000 | USB_REQ_SET_FEATURE) -#define SetPortFeature (0x2300 | USB_REQ_SET_FEATURE) - - -/*-------------------------------------------------------------------------*/ - -/* - * Generic bandwidth allocation constants/support - */ -#define FRAME_TIME_USECS 1000L -#define BitTime(bytecount) (7 * 8 * bytecount / 6) /* with integer truncation */ - /* Trying not to use worst-case bit-stuffing - of (7/6 * 8 * bytecount) = 9.33 * bytecount */ - /* bytecount = data payload byte count */ - -#define NS_TO_US(ns) ((ns + 500L) / 1000L) - /* convert & round nanoseconds to microseconds */ - -extern void usb_claim_bandwidth (struct usb_device *dev, struct urb *urb, - int bustime, int isoc); -extern void usb_release_bandwidth (struct usb_device *dev, struct urb *urb, - int isoc); - -/* - * Full/low speed bandwidth allocation constants/support. - */ -#define BW_HOST_DELAY 1000L /* nanoseconds */ -#define BW_HUB_LS_SETUP 333L /* nanoseconds */ - /* 4 full-speed bit times (est.) */ - -#define FRAME_TIME_BITS 12000L /* frame = 1 millisecond */ -#define FRAME_TIME_MAX_BITS_ALLOC (90L * FRAME_TIME_BITS / 100L) -#define FRAME_TIME_MAX_USECS_ALLOC (90L * FRAME_TIME_USECS / 100L) - -extern int usb_check_bandwidth (struct usb_device *dev, struct urb *urb); - -/* - * Ceiling microseconds (typical) for that many bytes at high speed - * ISO is a bit less, no ACK ... from USB 2.0 spec, 5.11.3 (and needed - * to preallocate bandwidth) - */ -#define USB2_HOST_DELAY 5 /* nsec, guess */ -#define HS_USECS(bytes) NS_TO_US ( ((55 * 8 * 2083)/1000) \ - + ((2083UL * (3167 + BitTime (bytes)))/1000) \ - + USB2_HOST_DELAY) -#define HS_USECS_ISO(bytes) NS_TO_US ( ((long)(38 * 8 * 2.083)) \ - + ((2083UL * (3167 + BitTime (bytes)))/1000) \ - + USB2_HOST_DELAY) - -extern long usb_calc_bus_time (int speed, int is_input, - int isoc, int bytecount); - -/*-------------------------------------------------------------------------*/ - -extern struct usb_bus *usb_alloc_bus (struct usb_operations *); -extern void usb_free_bus (struct usb_bus *); - -extern void usb_register_bus (struct usb_bus *); -extern void usb_deregister_bus (struct usb_bus *); - -extern int usb_register_root_hub (struct usb_device *usb_dev, - struct device *parent_dev); - -/* for portability to 2.4, hcds should call this */ -static _inline int hcd_register_root (struct usb_hcd *hcd) -{ - return usb_register_root_hub ( - hcd_to_bus (hcd)->root_hub, hcd->controller); -} - -/*-------------------------------------------------------------------------*/ - -/* exported only within usbcore */ - -extern struct list_head usb_bus_list; -extern struct semaphore usb_bus_list_lock; - -extern void usb_bus_get (struct usb_bus *bus); -extern void usb_bus_put (struct usb_bus *bus); - -extern int usb_find_interface_driver (struct usb_device *dev, - struct usb_interface *interface); - -#define usb_endpoint_halt(dev, ep, out) ((dev)->halted[out] |= (1 << (ep))) - -#define usb_endpoint_out(ep_dir) (!((ep_dir) & USB_DIR_IN)) - -/* - * USB device fs stuff - */ - -#ifdef CONFIG_USB_DEVICEFS - -/* - * these are expected to be called from the USB core/hub thread - * with the kernel lock held - */ -extern void usbfs_add_bus(struct usb_bus *bus); -extern void usbfs_remove_bus(struct usb_bus *bus); -extern void usbfs_add_device(struct usb_device *dev); -extern void usbfs_remove_device(struct usb_device *dev); -extern void usbfs_update_special (void); - -extern int usbfs_init(void); -extern void usbfs_cleanup(void); - -#else /* CONFIG_USB_DEVICEFS */ - -static _inline void usbfs_add_bus(struct usb_bus *bus) {} -static _inline void usbfs_remove_bus(struct usb_bus *bus) {} -static _inline void usbfs_add_device(struct usb_device *dev) {} -static _inline void usbfs_remove_device(struct usb_device *dev) {} -static _inline void usbfs_update_special (void) {} - -static _inline int usbfs_init(void) { return 0; } -static _inline void usbfs_cleanup(void) { } - -#endif /* CONFIG_USB_DEVICEFS */ - -/*-------------------------------------------------------------------------*/ - -/* hub.h ... DeviceRemovable in 2.4.2-ac11, gone in 2.4.10 */ -// bleech -- resurfaced in 2.4.11 or 2.4.12 -#define bitmap DeviceRemovable - - -/*-------------------------------------------------------------------------*/ - -/* random stuff */ - -#define RUN_CONTEXT (in_irq () ? "in_irq" \ - : (in_interrupt () ? "in_interrupt" : "can sleep")) - - -#endif /* __KERNEL__ */ - diff --git a/import/OpenXDK/include/xusb/core/hub.h b/import/OpenXDK/include/xusb/core/hub.h deleted file mode 100644 index c1dd44dda..000000000 --- a/import/OpenXDK/include/xusb/core/hub.h +++ /dev/null @@ -1,201 +0,0 @@ -#ifndef __LINUX_HUB_H -#define __LINUX_HUB_H - -/* - * Hub protocol and driver data structures. - * - * Some of these are known to the "virtual root hub" code - * in host controller drivers. - */ -#if 0 -#include -#include -#include /* likely()/unlikely() */ -#endif -/* - * Hub request types - */ - -#define USB_RT_HUB (USB_TYPE_CLASS | USB_RECIP_DEVICE) -#define USB_RT_PORT (USB_TYPE_CLASS | USB_RECIP_OTHER) - -/* - * Hub class requests - * See USB 2.0 spec Table 11-16 - */ -#define HUB_CLEAR_TT_BUFFER 8 -#define HUB_RESET_TT 9 -#define HUB_GET_TT_STATE 10 -#define HUB_STOP_TT 11 - -/* - * Hub Class feature numbers - * See USB 2.0 spec Table 11-17 - */ -#define C_HUB_LOCAL_POWER 0 -#define C_HUB_OVER_CURRENT 1 - -/* - * Port feature numbers - * See USB 2.0 spec Table 11-17 - */ -#define USB_PORT_FEAT_CONNECTION 0 -#define USB_PORT_FEAT_ENABLE 1 -#define USB_PORT_FEAT_SUSPEND 2 -#define USB_PORT_FEAT_OVER_CURRENT 3 -#define USB_PORT_FEAT_RESET 4 -#define USB_PORT_FEAT_POWER 8 -#define USB_PORT_FEAT_LOWSPEED 9 -#define USB_PORT_FEAT_HIGHSPEED 10 -#define USB_PORT_FEAT_C_CONNECTION 16 -#define USB_PORT_FEAT_C_ENABLE 17 -#define USB_PORT_FEAT_C_SUSPEND 18 -#define USB_PORT_FEAT_C_OVER_CURRENT 19 -#define USB_PORT_FEAT_C_RESET 20 -#define USB_PORT_FEAT_TEST 21 -#define USB_PORT_FEAT_INDICATOR 22 - -/* - * Hub Status and Hub Change results - * See USB 2.0 spec Table 11-19 and Table 11-20 - */ -#pragma pack(1) -struct usb_port_status { - __u16 wPortStatus; - __u16 wPortChange; -}; // __attribute__ ((packed)); -#pragma pack(1) - -/* - * wPortStatus bit field - * See USB 2.0 spec Table 11-21 - */ -#define USB_PORT_STAT_CONNECTION 0x0001 -#define USB_PORT_STAT_ENABLE 0x0002 -#define USB_PORT_STAT_SUSPEND 0x0004 -#define USB_PORT_STAT_OVERCURRENT 0x0008 -#define USB_PORT_STAT_RESET 0x0010 -/* bits 5 to 7 are reserved */ -#define USB_PORT_STAT_POWER 0x0100 -#define USB_PORT_STAT_LOW_SPEED 0x0200 -#define USB_PORT_STAT_HIGH_SPEED 0x0400 -#define USB_PORT_STAT_TEST 0x0800 -#define USB_PORT_STAT_INDICATOR 0x1000 -/* bits 13 to 15 are reserved */ - -/* - * wPortChange bit field - * See USB 2.0 spec Table 11-22 - * Bits 0 to 4 shown, bits 5 to 15 are reserved - */ -#define USB_PORT_STAT_C_CONNECTION 0x0001 -#define USB_PORT_STAT_C_ENABLE 0x0002 -#define USB_PORT_STAT_C_SUSPEND 0x0004 -#define USB_PORT_STAT_C_OVERCURRENT 0x0008 -#define USB_PORT_STAT_C_RESET 0x0010 - -/* - * wHubCharacteristics (masks) - * See USB 2.0 spec Table 11-13, offset 3 - */ -#define HUB_CHAR_LPSM 0x0003 /* D1 .. D0 */ -#define HUB_CHAR_COMPOUND 0x0004 /* D2 */ -#define HUB_CHAR_OCPM 0x0018 /* D4 .. D3 */ -#define HUB_CHAR_TTTT 0x0060 /* D6 .. D5 */ -#define HUB_CHAR_PORTIND 0x0080 /* D7 */ - -#pragma pack(1) -struct usb_hub_status { - __u16 wHubStatus; - __u16 wHubChange; -};// __attribute__ ((packed)); -#pragma pack() - -/* - * Hub Status & Hub Change bit masks - * See USB 2.0 spec Table 11-19 and Table 11-20 - * Bits 0 and 1 for wHubStatus and wHubChange - * Bits 2 to 15 are reserved for both - */ -#define HUB_STATUS_LOCAL_POWER 0x0001 -#define HUB_STATUS_OVERCURRENT 0x0002 -#define HUB_CHANGE_LOCAL_POWER 0x0001 -#define HUB_CHANGE_OVERCURRENT 0x0002 - - -/* - * Hub descriptor - * See USB 2.0 spec Table 11-13 - */ - -#define USB_DT_HUB (USB_TYPE_CLASS | 0x09) -#define USB_DT_HUB_NONVAR_SIZE 7 - -#pragma pack(1) -struct usb_hub_descriptor { - __u8 bDescLength; - __u8 bDescriptorType; - __u8 bNbrPorts; - __u16 wHubCharacteristics; - __u8 bPwrOn2PwrGood; - __u8 bHubContrCurrent; - /* add 1 bit for hub status change; round to bytes */ - __u8 DeviceRemovable[(USB_MAXCHILDREN + 1 + 7) / 8]; - __u8 PortPwrCtrlMask[(USB_MAXCHILDREN + 1 + 7) / 8]; -}; //__attribute__ ((packed)); -#pragma pack() - -struct usb_device; - -/* - * As of USB 2.0, full/low speed devices are segregated into trees. - * One type grows from USB 1.1 host controllers (OHCI, UHCI etc). - * The other type grows from high speed hubs when they connect to - * full/low speed devices using "Transaction Translators" (TTs). - * - * TTs should only be known to the hub driver, and high speed bus - * drivers (only EHCI for now). They affect periodic scheduling and - * sometimes control/bulk error recovery. - */ -struct usb_tt { - struct usb_device *hub; /* upstream highspeed hub */ - int multi; /* true means one TT per port */ - - /* for control/bulk error recovery (CLEAR_TT_BUFFER) */ - spinlock_t lock; - struct list_head clear_list; /* of usb_tt_clear */ - struct work_struct kevent; -}; - -struct usb_tt_clear { - struct list_head clear_list; - unsigned tt; - u16 devinfo; -}; - -extern void usb_hub_tt_clear_buffer (struct usb_device *dev, int pipe); - -struct usb_hub { - struct usb_interface *intf; /* the "real" device */ - struct urb *urb; /* for interrupt polling pipe */ - - /* buffer for urb ... 1 bit each for hub and children, rounded up */ - char (*buffer)[(USB_MAXCHILDREN + 1 + 7) / 8]; - dma_addr_t buffer_dma; /* DMA address for buffer */ - union { - struct usb_hub_status hub; - struct usb_port_status port; - } *status; /* buffer for status reports */ - - int error; /* last reported error */ - int nerrors; /* track consecutive errors */ - - struct list_head hub_list; /* all hubs */ - struct list_head event_list; /* hubs w/data or errs ready */ - - struct usb_hub_descriptor *descriptor; /* class descriptor */ - struct semaphore khubd_sem; - struct usb_tt tt; /* Transaction Translator */ -}; - -#endif /* __LINUX_HUB_H */ diff --git a/import/OpenXDK/include/xusb/core/usb.h b/import/OpenXDK/include/xusb/core/usb.h deleted file mode 100644 index 52210ef7f..000000000 --- a/import/OpenXDK/include/xusb/core/usb.h +++ /dev/null @@ -1,5 +0,0 @@ -/* Functions local to drivers/usb/core/ */ - -extern void usb_create_driverfs_dev_files (struct usb_device *dev); -extern void usb_create_driverfs_intf_files (struct usb_interface *intf); - diff --git a/import/OpenXDK/include/xusb/host/ohci.h b/import/OpenXDK/include/xusb/host/ohci.h deleted file mode 100644 index dfbfc5a9a..000000000 --- a/import/OpenXDK/include/xusb/host/ohci.h +++ /dev/null @@ -1,417 +0,0 @@ -/* - * OHCI HCD (Host Controller Driver) for USB. - * - * (C) Copyright 1999 Roman Weissgaerber - * (C) Copyright 2000-2002 David Brownell - * - * This file is licenced under the GPL. - */ - -/* - * OHCI Endpoint Descriptor (ED) ... holds TD queue - * See OHCI spec, section 4.2 - * - * This is a "Queue Head" for those transfers, which is why - * both EHCI and UHCI call similar structures a "QH". - */ -#pragma pack(1) -struct ed { - /* first fields are hardware-specified, le32 */ - __u32 hwINFO; /* endpoint config bitmap */ - /* info bits defined by hcd */ -#define ED_DEQUEUE __constant_cpu_to_le32(1 << 27) - /* info bits defined by the hardware */ -#define ED_ISO __constant_cpu_to_le32(1 << 15) -#define ED_SKIP __constant_cpu_to_le32(1 << 14) -#define ED_LOWSPEED __constant_cpu_to_le32(1 << 13) -#define ED_OUT __constant_cpu_to_le32(0x01 << 11) -#define ED_IN __constant_cpu_to_le32(0x02 << 11) - __u32 hwTailP; /* tail of TD list */ - __u32 hwHeadP; /* head of TD list (hc r/w) */ -#define ED_C __constant_cpu_to_le32(0x02) /* toggle carry */ -#define ED_H __constant_cpu_to_le32(0x01) /* halted */ - __u32 hwNextED; /* next ED in list */ - - /* rest are purely for the driver's use */ - dma_addr_t dma; /* addr of ED */ - struct td *dummy; /* next TD to activate */ - - /* host's view of schedule */ - struct ed *ed_next; /* on schedule or rm_list */ - struct ed *ed_prev; /* for non-interrupt EDs */ - struct list_head td_list; /* "shadow list" of our TDs */ - - /* create --> IDLE --> OPER --> ... --> IDLE --> destroy - * usually: OPER --> UNLINK --> (IDLE | OPER) --> ... - * some special cases : OPER --> IDLE ... - */ - u8 state; /* ED_{IDLE,UNLINK,OPER} */ -#define ED_IDLE 0x00 /* NOT linked to HC */ -#define ED_UNLINK 0x01 /* being unlinked from hc */ -#define ED_OPER 0x02 /* IS linked to hc */ - - u8 type; /* PIPE_{BULK,...} */ - - /* periodic scheduling params (for intr and iso) */ - u8 branch; - u16 interval; - u16 load; - u16 last_iso; /* iso only */ - - /* HC may see EDs on rm_list until next frame (frame_no == tick) */ - u16 tick; -}; // __attribute__ ((aligned(16))); -#pragma pack() - -#define ED_MASK ((u32)~0x0f) /* strip hw status in low addr bits */ - - -/* - * OHCI Transfer Descriptor (TD) ... one per transfer segment - * See OHCI spec, sections 4.3.1 (general = control/bulk/interrupt) - * and 4.3.2 (iso) - */ -#pragma pack(1) -struct td { - /* first fields are hardware-specified, le32 */ - __u32 hwINFO; /* transfer info bitmask */ - - /* hwINFO bits for both general and iso tds: */ -#define TD_CC 0xf0000000 /* condition code */ -#define TD_CC_GET(td_p) ((td_p >>28) & 0x0f) -//#define TD_CC_SET(td_p, cc) (td_p) = ((td_p) & 0x0fffffff) | (((cc) & 0x0f) << 28) -#define TD_DI 0x00E00000 /* frames before interrupt */ -#define TD_DI_SET(X) (((X) & 0x07)<< 21) - /* these two bits are available for definition/use by HCDs in both - * general and iso tds ... others are available for only one type - */ -#define TD_DONE 0x00020000 /* retired to donelist */ -#define TD_ISO 0x00010000 /* copy of ED_ISO */ - - /* hwINFO bits for general tds: */ -#define TD_EC 0x0C000000 /* error count */ -#define TD_T 0x03000000 /* data toggle state */ -#define TD_T_DATA0 0x02000000 /* DATA0 */ -#define TD_T_DATA1 0x03000000 /* DATA1 */ -#define TD_T_TOGGLE 0x00000000 /* uses ED_C */ -#define TD_DP 0x00180000 /* direction/pid */ -#define TD_DP_SETUP 0x00000000 /* SETUP pid */ -#define TD_DP_IN 0x00100000 /* IN pid */ -#define TD_DP_OUT 0x00080000 /* OUT pid */ - /* 0x00180000 rsvd */ -#define TD_R 0x00040000 /* round: short packets OK? */ - - /* (no hwINFO #defines yet for iso tds) */ - - __u32 hwCBP; /* Current Buffer Pointer (or 0) */ - __u32 hwNextTD; /* Next TD Pointer */ - __u32 hwBE; /* Memory Buffer End Pointer */ - - /* PSW is only for ISO */ -#define MAXPSW 1 /* hardware allows 8 */ - __u16 hwPSW [MAXPSW]; - - /* rest are purely for the driver's use */ - __u8 index; - struct ed *ed; - struct td *td_hash; /* dma-->td hashtable */ - struct td *next_dl_td; - struct urb *urb; - - dma_addr_t td_dma; /* addr of this TD */ - dma_addr_t data_dma; /* addr of data it points to */ - - struct list_head td_list; /* "shadow list", TDs on same ED */ -}; // __attribute__ ((aligned(32))); /* c/b/i need 16; only iso needs 32 */ -#pragma pack() - -#define TD_MASK ((u32)~0x1f) /* strip hw status in low addr bits */ - -/* - * Hardware transfer status codes -- CC from td->hwINFO or td->hwPSW - */ -#define TD_CC_NOERROR 0x00 -#define TD_CC_CRC 0x01 -#define TD_CC_BITSTUFFING 0x02 -#define TD_CC_DATATOGGLEM 0x03 -#define TD_CC_STALL 0x04 -#define TD_DEVNOTRESP 0x05 -#define TD_PIDCHECKFAIL 0x06 -#define TD_UNEXPECTEDPID 0x07 -#define TD_DATAOVERRUN 0x08 -#define TD_DATAUNDERRUN 0x09 - /* 0x0A, 0x0B reserved for hardware */ -#define TD_BUFFEROVERRUN 0x0C -#define TD_BUFFERUNDERRUN 0x0D - /* 0x0E, 0x0F reserved for HCD */ -#define TD_NOTACCESSED 0x0F - - -/* map OHCI TD status codes (CC) to errno values */ -static const int cc_to_error [16] = { - /* No Error */ 0, - /* CRC Error */ -EILSEQ, - /* Bit Stuff */ -EPROTO, - /* Data Togg */ -EILSEQ, - /* Stall */ -EPIPE, - /* DevNotResp */ -ETIMEDOUT, - /* PIDCheck */ -EPROTO, - /* UnExpPID */ -EPROTO, - /* DataOver */ -EOVERFLOW, - /* DataUnder */ -EREMOTEIO, - /* (for hw) */ -EIO, - /* (for hw) */ -EIO, - /* BufferOver */ -ECOMM, - /* BuffUnder */ -ENOSR, - /* (for HCD) */ -EALREADY, - /* (for HCD) */ -EALREADY -}; - - -/* - * The HCCA (Host Controller Communications Area) is a 256 byte - * structure defined section 4.4.1 of the OHCI spec. The HC is - * told the base address of it. It must be 256-byte aligned. - */ -#pragma pack(1) -struct ohci_hcca { -#define NUM_INTS 32 - __u32 int_table [NUM_INTS]; /* periodic schedule */ - __u16 frame_no; /* current frame number */ - __u16 pad1; /* set to 0 on each frame_no change */ - __u32 done_head; /* info returned for an interrupt */ - u8 reserved_for_hc [116]; - u8 what [4]; /* spec only identifies 252 bytes :) */ -}; // __attribute__ ((aligned(256))); -#pragma pack() - - -/* - * This is the structure of the OHCI controller's memory mapped I/O region. - * You must use readl() and writel() (in ) to access these fields!! - * Layout is in section 7 (and appendix B) of the spec. - */ -#pragma pack(1) -struct ohci_regs { - /* control and status registers (section 7.1) */ - __u32 revision; - __u32 control; - __u32 cmdstatus; - __u32 intrstatus; - __u32 intrenable; - __u32 intrdisable; - - /* memory pointers (section 7.2) */ - __u32 hcca; - __u32 ed_periodcurrent; - __u32 ed_controlhead; - __u32 ed_controlcurrent; - __u32 ed_bulkhead; - __u32 ed_bulkcurrent; - __u32 donehead; - - /* frame counters (section 7.3) */ - __u32 fminterval; - __u32 fmremaining; - __u32 fmnumber; - __u32 periodicstart; - __u32 lsthresh; - - /* Root hub ports (section 7.4) */ - struct ohci_roothub_regs { - __u32 a; - __u32 b; - __u32 status; -#define MAX_ROOT_PORTS 15 /* maximum OHCI root hub ports (RH_A_NDP) */ - __u32 portstatus [MAX_ROOT_PORTS]; - } roothub; - - /* and optional "legacy support" registers (appendix B) at 0x0100 */ - -}; // __attribute__ ((aligned(32))); -#pragma pack() - - -/* OHCI CONTROL AND STATUS REGISTER MASKS */ - -/* - * HcControl (control) register masks - */ -#define OHCI_CTRL_CBSR (3 << 0) /* control/bulk service ratio */ -#define OHCI_CTRL_PLE (1 << 2) /* periodic list enable */ -#define OHCI_CTRL_IE (1 << 3) /* isochronous enable */ -#define OHCI_CTRL_CLE (1 << 4) /* control list enable */ -#define OHCI_CTRL_BLE (1 << 5) /* bulk list enable */ -#define OHCI_CTRL_HCFS (3 << 6) /* host controller functional state */ -#define OHCI_CTRL_IR (1 << 8) /* interrupt routing */ -#define OHCI_CTRL_RWC (1 << 9) /* remote wakeup connected */ -#define OHCI_CTRL_RWE (1 << 10) /* remote wakeup enable */ - -/* pre-shifted values for HCFS */ -# define OHCI_USB_RESET (0 << 6) -# define OHCI_USB_RESUME (1 << 6) -# define OHCI_USB_OPER (2 << 6) -# define OHCI_USB_SUSPEND (3 << 6) - -/* - * HcCommandStatus (cmdstatus) register masks - */ -#define OHCI_HCR (1 << 0) /* host controller reset */ -#define OHCI_CLF (1 << 1) /* control list filled */ -#define OHCI_BLF (1 << 2) /* bulk list filled */ -#define OHCI_OCR (1 << 3) /* ownership change request */ -#define OHCI_SOC (3 << 16) /* scheduling overrun count */ - -/* - * masks used with interrupt registers: - * HcInterruptStatus (intrstatus) - * HcInterruptEnable (intrenable) - * HcInterruptDisable (intrdisable) - */ -#define OHCI_INTR_SO (1 << 0) /* scheduling overrun */ -#define OHCI_INTR_WDH (1 << 1) /* writeback of done_head */ -#define OHCI_INTR_SF (1 << 2) /* start frame */ -#define OHCI_INTR_RD (1 << 3) /* resume detect */ -#define OHCI_INTR_UE (1 << 4) /* unrecoverable error */ -#define OHCI_INTR_FNO (1 << 5) /* frame number overflow */ -#define OHCI_INTR_RHSC (1 << 6) /* root hub status change */ -#define OHCI_INTR_OC (1 << 30) /* ownership change */ -#define OHCI_INTR_MIE (1 << 31) /* master interrupt enable */ - - -/* OHCI ROOT HUB REGISTER MASKS */ - -/* roothub.portstatus [i] bits */ -#define RH_PS_CCS 0x00000001 /* current connect status */ -#define RH_PS_PES 0x00000002 /* port enable status*/ -#define RH_PS_PSS 0x00000004 /* port suspend status */ -#define RH_PS_POCI 0x00000008 /* port over current indicator */ -#define RH_PS_PRS 0x00000010 /* port reset status */ -#define RH_PS_PPS 0x00000100 /* port power status */ -#define RH_PS_LSDA 0x00000200 /* low speed device attached */ -#define RH_PS_CSC 0x00010000 /* connect status change */ -#define RH_PS_PESC 0x00020000 /* port enable status change */ -#define RH_PS_PSSC 0x00040000 /* port suspend status change */ -#define RH_PS_OCIC 0x00080000 /* over current indicator change */ -#define RH_PS_PRSC 0x00100000 /* port reset status change */ - -/* roothub.status bits */ -#define RH_HS_LPS 0x00000001 /* local power status */ -#define RH_HS_OCI 0x00000002 /* over current indicator */ -#define RH_HS_DRWE 0x00008000 /* device remote wakeup enable */ -#define RH_HS_LPSC 0x00010000 /* local power status change */ -#define RH_HS_OCIC 0x00020000 /* over current indicator change */ -#define RH_HS_CRWE 0x80000000 /* clear remote wakeup enable */ - -/* roothub.b masks */ -#define RH_B_DR 0x0000ffff /* device removable flags */ -#define RH_B_PPCM 0xffff0000 /* port power control mask */ - -/* roothub.a masks */ -#define RH_A_NDP (0xff << 0) /* number of downstream ports */ -#define RH_A_PSM (1 << 8) /* power switching mode */ -#define RH_A_NPS (1 << 9) /* no power switching */ -#define RH_A_DT (1 << 10) /* device type (mbz) */ -#define RH_A_OCPM (1 << 11) /* over current protection mode */ -#define RH_A_NOCP (1 << 12) /* no over current protection */ -#define RH_A_POTPGT (0xff << 24) /* power on to power good time */ - - -/* hcd-private per-urb state */ -typedef struct urb_priv { - struct ed *ed; - __u16 length; // # tds in this request - __u16 td_cnt; // tds already serviced - int state; - struct td *td [0]; // all TDs in this request - -} urb_priv_t; - -#define URB_DEL 1 - -#define TD_HASH_SIZE 64 /* power'o'two */ -// sizeof (struct td) ~= 64 == 2^6 ... -#define TD_HASH_FUNC(td_dma) ((td_dma ^ (td_dma >> 6)) % TD_HASH_SIZE) - - -/* - * This is the full ohci controller description - * - * Note how the "proper" USB information is just - * a subset of what the full implementation needs. (Linus) - */ - -struct ohci_hcd { - spinlock_t lock; - - /* - * I/O memory used to communicate with the HC (dma-consistent) - */ - struct ohci_regs *regs; - - /* - * main memory used to communicate with the HC (dma-consistent). - * hcd adds to schedule for a live hc any time, but removals finish - * only at the start of the next frame. - */ - struct ohci_hcca *hcca; - dma_addr_t hcca_dma; - - struct ed *ed_rm_list; /* to be removed */ - - struct ed *ed_bulktail; /* last in bulk list */ - struct ed *ed_controltail; /* last in ctrl list */ - struct ed *periodic [NUM_INTS]; /* shadow int_table */ - - /* - * memory management for queue data structures - */ - struct pci_pool *td_cache; - struct pci_pool *ed_cache; - struct td *td_hash [TD_HASH_SIZE]; - - /* - * driver state - */ - int disabled; /* e.g. got a UE, we're hung */ - int sleeping; - int load [NUM_INTS]; - u32 hc_control; /* copy of hc control reg */ - - unsigned long flags; /* for HC bugs */ -#define OHCI_QUIRK_AMD756 0x01 /* erratum #4 */ -#define OHCI_QUIRK_SUPERIO 0x02 /* natsemi */ - // there are also chip quirks/bugs in init logic - - /* - * framework state - */ - struct usb_hcd hcd; -}; - -#define hcd_to_ohci(hcd_ptr) container_of(hcd_ptr, struct ohci_hcd, hcd) - -/*-------------------------------------------------------------------------*/ - -#ifndef DEBUG -#define STUB_DEBUG_FILES -#endif /* DEBUG */ - -//#define ohci_dbg(ohci, fmt, args...) dev_dbg ((ohci)->hcd.controller , fmt , ## args ) -//#define ohci_err(ohci, fmt, args...) dev_err ((ohci)->hcd.controller , fmt , ## args ) -//#define ohci_info(ohci, fmt, args...) dev_info ((ohci)->hcd.controller , fmt , ## args ) -//#define ohci_warn(ohci, fmt, args...) dev_warn ((ohci)->hcd.controller , fmt , ## args ) - -int ohci_dbg(struct ohci_hcd* ohci, char *str, const char *format, ...); -int ohci_err(struct ohci_hcd* ohci, char *str, const char *format, ...); -int ohci_info(struct ohci_hcd* ohci, char *str, const char *format, ...); -int ohci_warn(struct ohci_hcd* ohci, char *str, const char *format, ...); -int ohci_vdbg(struct ohci_hcd* ohci, char *str, const char *format, ...); - - -//#ifdef OHCI_VERBOSE_DEBUG -//# define ohci_vdbg ohci_dbg -//#else -//# define ohci_vdbg(ohci, fmt, args...) do { } while (0) -//#endif - diff --git a/import/OpenXDK/include/xusb/host/ohci_config.h b/import/OpenXDK/include/xusb/host/ohci_config.h deleted file mode 100644 index ec73b9099..000000000 --- a/import/OpenXDK/include/xusb/host/ohci_config.h +++ /dev/null @@ -1,5 +0,0 @@ -/* - * Configs for OHCI - */ - -#define CONFIG_PCI diff --git a/import/OpenXDK/include/xusb/linux/bitops.h b/import/OpenXDK/include/xusb/linux/bitops.h deleted file mode 100644 index 0bc9328e4..000000000 --- a/import/OpenXDK/include/xusb/linux/bitops.h +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef _LINUX_BITOPS_H -#define _LINUX_BITOPS_H - - -/* - * ffs: find first bit set. This is defined the same way as - * the libc and compiler builtin ffs routines, therefore - * differs in spirit from the above ffz (man ffs). - */ - -static __inline int generic_ffs(int x) -{ - int r = 1; - - if (!x) - return 0; - if (!(x & 0xffff)) { - x >>= 16; - r += 16; - } - if (!(x & 0xff)) { - x >>= 8; - r += 8; - } - if (!(x & 0xf)) { - x >>= 4; - r += 4; - } - if (!(x & 3)) { - x >>= 2; - r += 2; - } - if (!(x & 1)) { - x >>= 1; - r += 1; - } - return r; -} - -/* - * hweightN: returns the hamming weight (i.e. the number - * of bits set) of a N-bit word - */ - -static __inline unsigned int generic_hweight32(unsigned int w) -{ - unsigned int res = (w & 0x55555555) + ((w >> 1) & 0x55555555); - res = (res & 0x33333333) + ((res >> 2) & 0x33333333); - res = (res & 0x0F0F0F0F) + ((res >> 4) & 0x0F0F0F0F); - res = (res & 0x00FF00FF) + ((res >> 8) & 0x00FF00FF); - return (res & 0x0000FFFF) + ((res >> 16) & 0x0000FFFF); -} - -static __inline unsigned int generic_hweight16(unsigned int w) -{ - unsigned int res = (w & 0x5555) + ((w >> 1) & 0x5555); - res = (res & 0x3333) + ((res >> 2) & 0x3333); - res = (res & 0x0F0F) + ((res >> 4) & 0x0F0F); - return (res & 0x00FF) + ((res >> 8) & 0x00FF); -} - -static __inline unsigned int generic_hweight8(unsigned int w) -{ - unsigned int res = (w & 0x55) + ((w >> 1) & 0x55); - res = (res & 0x33) + ((res >> 2) & 0x33); - return (res & 0x0F) + ((res >> 4) & 0x0F); -} - -#include "asm/bitops.h" - - -#endif diff --git a/import/OpenXDK/include/xusb/linux/config.h b/import/OpenXDK/include/xusb/linux/config.h deleted file mode 100644 index e69de29bb..000000000 diff --git a/import/OpenXDK/include/xusb/linux/usb.h b/import/OpenXDK/include/xusb/linux/usb.h deleted file mode 100644 index a6d5929fc..000000000 --- a/import/OpenXDK/include/xusb/linux/usb.h +++ /dev/null @@ -1,1069 +0,0 @@ -#ifndef __LINUX_USB_H -#define __LINUX_USB_H - - -#include "usb_ch9.h" - -#define USB_MAJOR 180 - - -#ifdef __KERNEL__ -#if 0 -#include -#include /* for -ENODEV */ -#include /* for mdelay() */ -#include /* for in_interrupt() */ -#include /* for struct list_head */ -#include /* for struct device */ -#include /* for struct file_operations */ -#include /* for struct completion */ -#include /* for current && schedule_timeout */ - - -static __inline__ void wait_ms(unsigned int ms) -{ - if(!in_interrupt()) { - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(1 + ms * HZ / 1000); - } - else - mdelay(ms); -} -#endif -struct usb_device; - -/*-------------------------------------------------------------------------*/ - -/* - * Host-side wrappers for standard USB descriptors ... these are parsed - * from the data provided by devices. Parsing turns them from a flat - * sequence of descriptors into a hierarchy: - * - * - devices have one (usually) or more configs; - * - configs have one (often) or more interfaces; - * - interfaces have one (usually) or more settings; - * - each interface setting has zero or (usually) more endpoints. - * - * And there might be other descriptors mixed in with those. - * - * Devices may also have class-specific or vendor-specific descriptors. - */ - -/* host-side wrapper for parsed endpoint descriptors */ -struct usb_host_endpoint { - struct usb_endpoint_descriptor desc; - - unsigned char *extra; /* Extra descriptors */ - int extralen; -}; - -/* host-side wrapper for one interface setting's parsed descriptors */ -struct usb_host_interface { - struct usb_interface_descriptor desc; - - /* array of desc.bNumEndpoint endpoints associated with this - * interface setting. these will be in no particular order. - */ - struct usb_host_endpoint *endpoint; - - unsigned char *extra; /* Extra descriptors */ - int extralen; -}; - -/** - * struct usb_interface - what usb device drivers talk to - * @altsetting: array of interface descriptors, one for each alternate - * setting that may be selected. Each one includes a set of - * endpoint configurations and will be in numberic order, - * 0..num_altsetting. - * @num_altsetting: number of altsettings defined. - * @act_altsetting: index of current altsetting. this number is always - * less than num_altsetting. after the device is configured, each - * interface uses its default setting of zero. - * @max_altsetting: - * @minor: the minor number assigned to this interface, if this - * interface is bound to a driver that uses the USB major number. - * If this interface does not use the USB major, this field should - * be unused. The driver should set this value in the probe() - * function of the driver, after it has been assigned a minor - * number from the USB core by calling usb_register_dev(). - * @dev: driver model's view of this device - * @class_dev: driver model's class view of this device. - * - * USB device drivers attach to interfaces on a physical device. Each - * interface encapsulates a single high level function, such as feeding - * an audio stream to a speaker or reporting a change in a volume control. - * Many USB devices only have one interface. The protocol used to talk to - * an interface's endpoints can be defined in a usb "class" specification, - * or by a product's vendor. The (default) control endpoint is part of - * every interface, but is never listed among the interface's descriptors. - * - * The driver that is bound to the interface can use standard driver model - * calls such as dev_get_drvdata() on the dev member of this structure. - * - * Each interface may have alternate settings. The initial configuration - * of a device sets the first of these, but the device driver can change - * that setting using usb_set_interface(). Alternate settings are often - * used to control the the use of periodic endpoints, such as by having - * different endpoints use different amounts of reserved USB bandwidth. - * All standards-conformant USB devices that use isochronous endpoints - * will use them in non-default settings. - */ -struct usb_interface { - /* array of alternate settings for this interface. - * these will be in numeric order, 0..num_altsettting - */ - struct usb_host_interface *altsetting; - - unsigned act_altsetting; /* active alternate setting */ - unsigned num_altsetting; /* number of alternate settings */ - unsigned max_altsetting; /* total memory allocated */ - - struct usb_driver *driver; /* driver */ - int minor; /* minor number this interface is bound to */ - struct device dev; /* interface specific device info */ - struct class_device class_dev; -}; -#define to_usb_interface(d) container_of(d, struct usb_interface, dev) -#define class_dev_to_usb_interface(d) container_of(d, struct usb_interface, class_dev) -#define interface_to_usbdev(intf) \ - container_of(intf->dev.parent, struct usb_device, dev) - -static _inline void *usb_get_intfdata (struct usb_interface *intf) -{ - return dev_get_drvdata (&intf->dev); -} - -static _inline void usb_set_intfdata (struct usb_interface *intf, void *data) -{ - dev_set_drvdata(&intf->dev, data); -} - -/* USB_DT_CONFIG: Configuration descriptor information. - * - * USB_DT_OTHER_SPEED_CONFIG is the same descriptor, except that the - * descriptor type is different. Highspeed-capable devices can look - * different depending on what speed they're currently running. Only - * devices with a USB_DT_DEVICE_QUALIFIER have an OTHER_SPEED_CONFIG. - */ -struct usb_host_config { - struct usb_config_descriptor desc; - - /* the interfaces associated with this configuration - * these will be in numeric order, 0..desc.bNumInterfaces - */ - struct usb_interface *interface; - - unsigned char *extra; /* Extra descriptors */ - int extralen; -}; - -// FIXME remove; exported only for drivers/usb/misc/auserwald.c -// prefer usb_device->epnum[0..31] -extern struct usb_endpoint_descriptor * - usb_epnum_to_ep_desc(struct usb_device *dev, unsigned epnum); - -int __usb_get_extra_descriptor(char *buffer, unsigned size, - unsigned char type, void **ptr); -#define usb_get_extra_descriptor(ifpoint,type,ptr)\ - __usb_get_extra_descriptor((ifpoint)->extra,(ifpoint)->extralen,\ - type,(void**)ptr) - -/* -------------------------------------------------------------------------- */ - -struct usb_operations; - -/* USB device number allocation bitmap */ -struct usb_devmap { - unsigned long devicemap[128 / (8*sizeof(unsigned long))]; -}; - -/* - * Allocated per bus (tree of devices) we have: - */ -struct usb_bus { - struct device *controller; /* host/master side hardware */ - int busnum; /* Bus number (in order of reg) */ - char *bus_name; /* stable id (PCI slot_name etc) */ - - int devnum_next; /* Next open device number in round-robin allocation */ - - struct usb_devmap devmap; /* device address allocation map */ - struct usb_operations *op; /* Operations (specific to the HC) */ - struct usb_device *root_hub; /* Root hub */ - struct list_head bus_list; /* list of busses */ - void *hcpriv; /* Host Controller private data */ - - int bandwidth_allocated; /* on this bus: how much of the time - * reserved for periodic (intr/iso) - * requests is used, on average? - * Units: microseconds/frame. - * Limits: Full/low speed reserve 90%, - * while high speed reserves 80%. - */ - int bandwidth_int_reqs; /* number of Interrupt requests */ - int bandwidth_isoc_reqs; /* number of Isoc. requests */ - - struct dentry *usbfs_dentry; /* usbfs dentry entry for the bus */ - struct dentry *usbdevfs_dentry; /* usbdevfs dentry entry for the bus */ - - atomic_t refcnt; -}; - - -/* -------------------------------------------------------------------------- */ - -/* This is arbitrary. - * From USB 2.0 spec Table 11-13, offset 7, a hub can - * have up to 255 ports. The most yet reported is 10. - */ -#define USB_MAXCHILDREN (16) - -struct usb_tt; - -struct usb_device { - int devnum; /* Address on USB bus */ - char devpath [16]; /* Use in messages: /port/port/... */ - enum usb_device_state state; /* configured, not attached, etc */ - enum usb_device_speed speed; /* high/full/low (or error) */ - - struct usb_tt *tt; /* low/full speed dev, highspeed hub */ - int ttport; /* device port on that tt hub */ - - struct semaphore serialize; - - unsigned int toggle[2]; /* one bit for each endpoint ([0] = IN, [1] = OUT) */ - unsigned int halted[2]; /* endpoint halts; one bit per endpoint # & direction; */ - /* [0] = IN, [1] = OUT */ - int epmaxpacketin[16]; /* INput endpoint specific maximums */ - int epmaxpacketout[16]; /* OUTput endpoint specific maximums */ - - struct usb_device *parent; /* our hub, unless we're the root */ - struct usb_bus *bus; /* Bus we're part of */ - - struct device dev; /* Generic device interface */ - - struct usb_device_descriptor descriptor;/* Descriptor */ - struct usb_host_config *config; /* All of the configs */ - struct usb_host_config *actconfig;/* the active configuration */ - - char **rawdescriptors; /* Raw descriptors for each config */ - - int have_langid; /* whether string_langid is valid yet */ - int string_langid; /* language ID for strings */ - - void *hcpriv; /* Host Controller private data */ - - struct list_head filelist; - struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */ - struct dentry *usbdevfs_dentry; /* usbdevfs dentry entry for the device */ - - /* - * Child devices - these can be either new devices - * (if this is a hub device), or different instances - * of this same device. - * - * Each instance needs its own set of data structures. - */ - - int maxchild; /* Number of ports if hub */ - struct usb_device *children[USB_MAXCHILDREN]; -}; -#define to_usb_device(d) container_of(d, struct usb_device, dev) - -extern struct usb_device *usb_alloc_dev(struct usb_device *parent, struct usb_bus *); -extern struct usb_device *usb_get_dev(struct usb_device *dev); -extern void usb_put_dev(struct usb_device *dev); - -/* mostly for devices emulating SCSI over USB */ -extern int usb_reset_device(struct usb_device *dev); - -extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id); - -/* for drivers using iso endpoints */ -extern int usb_get_current_frame_number (struct usb_device *usb_dev); - -/* used these for multi-interface device registration */ -extern void usb_driver_claim_interface(struct usb_driver *driver, - struct usb_interface *iface, void* priv); -extern int usb_interface_claimed(struct usb_interface *iface); -extern void usb_driver_release_interface(struct usb_driver *driver, - struct usb_interface *iface); -const struct usb_device_id *usb_match_id(struct usb_interface *interface, - const struct usb_device_id *id); - -extern struct usb_interface *usb_find_interface(struct usb_driver *drv, int minor); -extern struct usb_interface *usb_ifnum_to_if(struct usb_device *dev, unsigned ifnum); - - -/** - * usb_make_path - returns stable device path in the usb tree - * @dev: the device whose path is being constructed - * @buf: where to put the string - * @size: how big is "buf"? - * - * Returns length of the string (> 0) or negative if size was too small. - * - * This identifier is intended to be "stable", reflecting physical paths in - * hardware such as physical bus addresses for host controllers or ports on - * USB hubs. That makes it stay the same until systems are physically - * reconfigured, by re-cabling a tree of USB devices or by moving USB host - * controllers. Adding and removing devices, including virtual root hubs - * in host controller driver modules, does not change these path identifers; - * neither does rebooting or re-enumerating. These are more useful identifiers - * than changeable ("unstable") ones like bus numbers or device addresses. - * - * With a partial exception for devices connected to USB 2.0 root hubs, these - * identifiers are also predictable. So long as the device tree isn't changed, - * plugging any USB device into a given hub port always gives it the same path. - * Because of the use of "companion" controllers, devices connected to ports on - * USB 2.0 root hubs (EHCI host controllers) will get one path ID if they are - * high speed, and a different one if they are full or low speed. - */ -// BB - taken from stdio.h -int snprintf (char *str, size_t size, const char *format, ...); - -static _inline int usb_make_path (struct usb_device *dev, char *buf, size_t size) -{ - int actual; - actual = snprintf (buf, size, "usb-%s-%s", dev->bus->bus_name, dev->devpath); - return (actual >= size) ? -1 : actual; -} - -/*-------------------------------------------------------------------------*/ - -#define USB_DEVICE_ID_MATCH_DEVICE (USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT) -#define USB_DEVICE_ID_MATCH_DEV_RANGE (USB_DEVICE_ID_MATCH_DEV_LO | USB_DEVICE_ID_MATCH_DEV_HI) -#define USB_DEVICE_ID_MATCH_DEVICE_AND_VERSION (USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_DEV_RANGE) -#define USB_DEVICE_ID_MATCH_DEV_INFO \ - (USB_DEVICE_ID_MATCH_DEV_CLASS | USB_DEVICE_ID_MATCH_DEV_SUBCLASS | USB_DEVICE_ID_MATCH_DEV_PROTOCOL) -#define USB_DEVICE_ID_MATCH_INT_INFO \ - (USB_DEVICE_ID_MATCH_INT_CLASS | USB_DEVICE_ID_MATCH_INT_SUBCLASS | USB_DEVICE_ID_MATCH_INT_PROTOCOL) - -/** - * USB_DEVICE - macro used to describe a specific usb device - * @vend: the 16 bit USB Vendor ID - * @prod: the 16 bit USB Product ID - * - * This macro is used to create a struct usb_device_id that matches a - * specific device. - */ -// .match_flags = USB_DEVICE_ID_MATCH_DEVICE, .idVendor = (vend), .idProduct = (prod) -#define USB_DEVICE(vend,prod) \ - 0, vend, prod, 0,0, 0,0,0, 0,0,0, 0 -/* // which fields to match against? - __u16 match_flags; - - // Used for product specific matches; range is inclusive - __u16 idVendor; - __u16 idProduct; - __u16 bcdDevice_lo; - __u16 bcdDevice_hi; - - // Used for device class matches - __u8 bDeviceClass; - __u8 bDeviceSubClass; - __u8 bDeviceProtocol; - - // Used for interface class matches - __u8 bInterfaceClass; - __u8 bInterfaceSubClass; - __u8 bInterfaceProtocol; - - // not matched against - kernel_ulong_t driver_info; -}; -*/ - -/** - * USB_DEVICE_VER - macro used to describe a specific usb device with a version range - * @vend: the 16 bit USB Vendor ID - * @prod: the 16 bit USB Product ID - * @lo: the bcdDevice_lo value - * @hi: the bcdDevice_hi value - * - * This macro is used to create a struct usb_device_id that matches a - * specific device, with a version range. - */ -#define USB_DEVICE_VER(vend,prod,lo,hi) \ - .match_flags = USB_DEVICE_ID_MATCH_DEVICE_AND_VERSION, .idVendor = (vend), .idProduct = (prod), .bcdDevice_lo = (lo), .bcdDevice_hi = (hi) - -/** - * USB_DEVICE_INFO - macro used to describe a class of usb devices - * @cl: bDeviceClass value - * @sc: bDeviceSubClass value - * @pr: bDeviceProtocol value - * - * This macro is used to create a struct usb_device_id that matches a - * specific class of devices. - */ -#define USB_DEVICE_INFO(cl,sc,pr) \ - .match_flags = USB_DEVICE_ID_MATCH_DEV_INFO, .bDeviceClass = (cl), .bDeviceSubClass = (sc), .bDeviceProtocol = (pr) - -/** - * USB_INTERFACE_INFO - macro used to describe a class of usb interfaces - * @cl: bInterfaceClass value - * @sc: bInterfaceSubClass value - * @pr: bInterfaceProtocol value - * - * This macro is used to create a struct usb_device_id that matches a - * specific class of interfaces. - */ -#define USB_INTERFACE_INFO(cl,sc,pr) \ - .match_flags = USB_DEVICE_ID_MATCH_INT_INFO, .bInterfaceClass = (cl), .bInterfaceSubClass = (sc), .bInterfaceProtocol = (pr) - -/* -------------------------------------------------------------------------- */ - -/** - * struct usb_driver - identifies USB driver to usbcore - * @owner: Pointer to the module owner of this driver; initialize - * it using THIS_MODULE. - * @name: The driver name should be unique among USB drivers, - * and should normally be the same as the module name. - * @probe: Called to see if the driver is willing to manage a particular - * interface on a device. If it is, probe returns zero and uses - * dev_set_drvdata() to associate driver-specific data with the - * interface. It may also use usb_set_interface() to specify the - * appropriate altsetting. If unwilling to manage the interface, - * return a negative errno value. - * @disconnect: Called when the interface is no longer accessible, usually - * because its device has been (or is being) disconnected or the - * driver module is being unloaded. - * @ioctl: Used for drivers that want to talk to userspace through - * the "usbfs" filesystem. This lets devices provide ways to - * expose information to user space regardless of where they - * do (or don't) show up otherwise in the filesystem. - * @id_table: USB drivers use ID table to support hotplugging. - * Export this with MODULE_DEVICE_TABLE(usb,...). This must be set - * or your driver's probe function will never get called. - * - * USB drivers must provide a name, probe() and disconnect() methods, - * and an id_table. Other driver fields are optional. - * - * The id_table is used in hotplugging. It holds a set of descriptors, - * and specialized data may be associated with each entry. That table - * is used by both user and kernel mode hotplugging support. - * - * The probe() and disconnect() methods are called in a context where - * they can sleep, but they should avoid abusing the privilege. Most - * work to connect to a device should be done when the device is opened, - * and undone at the last close. The disconnect code needs to address - * concurrency issues with respect to open() and close() methods, as - * well as forcing all pending I/O requests to complete (by unlinking - * them as necessary, and blocking until the unlinks complete). - */ -struct usb_driver { - struct module *owner; - - const char *name; - - int (*probe) (struct usb_interface *intf, - const struct usb_device_id *id); - - void (*disconnect) (struct usb_interface *intf); - - int (*ioctl) (struct usb_interface *intf, unsigned int code, void *buf); - - const struct usb_device_id *id_table; - - struct device_driver driver; - - struct semaphore serialize; -}; -#define to_usb_driver(d) container_of(d, struct usb_driver, driver) - -extern struct bus_type usb_bus_type; - -/** - * struct usb_class_driver - identifies a USB driver that wants to use the USB major number - * @name: devfs name for this driver. Will also be used by the driver - * class code to create a usb class device. - * @fops: pointer to the struct file_operations of this driver. - * @mode: the mode for the devfs file to be created for this driver. - * @minor_base: the start of the minor range for this driver. - * - * This structure is used for the usb_register_dev() and - * usb_unregister_dev() functions, to consolodate a number of the - * paramaters used for them. - */ -struct usb_class_driver { - char *name; - struct file_operations *fops; - mode_t mode; - int minor_base; -}; - -/* - * use these in module_init()/module_exit() - * and don't forget MODULE_DEVICE_TABLE(usb, ...) - */ -extern int usb_register(struct usb_driver *); -extern void usb_deregister(struct usb_driver *); - -extern int usb_register_dev(struct usb_interface *intf, - struct usb_class_driver *class_driver); -extern void usb_deregister_dev(struct usb_interface *intf, - struct usb_class_driver *class_driver); - -extern int usb_device_probe(struct device *dev); -extern int usb_device_remove(struct device *dev); -extern int usb_disabled(void); - -/* -------------------------------------------------------------------------- */ - -/* - * URB support, for asynchronous request completions - */ - -/* - * urb->transfer_flags: - */ -#define URB_SHORT_NOT_OK 0x0001 /* report short reads as errors */ -#define URB_ISO_ASAP 0x0002 /* iso-only, urb->start_frame ignored */ -#define URB_NO_DMA_MAP 0x0004 /* urb->*_dma are valid on submit */ -#define URB_ASYNC_UNLINK 0x0008 /* usb_unlink_urb() returns asap */ -#define URB_NO_FSBR 0x0020 /* UHCI-specific */ -#define URB_ZERO_PACKET 0x0040 /* Finish bulk OUTs with short packet */ -#define URB_NO_INTERRUPT 0x0080 /* HINT: no non-error interrupt needed */ - -struct usb_iso_packet_descriptor { - unsigned int offset; - unsigned int length; /* expected length */ - unsigned int actual_length; - unsigned int status; -}; - -struct urb; -struct pt_regs; - -typedef void (*usb_complete_t)(struct urb *, struct pt_regs *); - -/** - * struct urb - USB Request Block - * @urb_list: For use by current owner of the URB. - * @pipe: Holds endpoint number, direction, type, and more. - * Create these values with the eight macros available; - * usb_{snd,rcv}TYPEpipe(dev,endpoint), where the type is "ctrl" - * (control), "bulk", "int" (interrupt), or "iso" (isochronous). - * For example usb_sndbulkpipe() or usb_rcvintpipe(). Endpoint - * numbers range from zero to fifteen. Note that "in" endpoint two - * is a different endpoint (and pipe) from "out" endpoint two. - * The current configuration controls the existence, type, and - * maximum packet size of any given endpoint. - * @dev: Identifies the USB device to perform the request. - * @status: This is read in non-iso completion functions to get the - * status of the particular request. ISO requests only use it - * to tell whether the URB was unlinked; detailed status for - * each frame is in the fields of the iso_frame-desc. - * @transfer_flags: A variety of flags may be used to affect how URB - * submission, unlinking, or operation are handled. Different - * kinds of URB can use different flags. - * @transfer_buffer: This identifies the buffer to (or from) which - * the I/O request will be performed (unless URB_NO_DMA_MAP is set). - * This buffer must be suitable for DMA; allocate it with kmalloc() - * or equivalent. For transfers to "in" endpoints, contents of - * this buffer will be modified. This buffer is used for data - * phases of control transfers. - * @transfer_dma: When transfer_flags includes URB_NO_DMA_MAP, the device - * driver is saying that it provided this DMA address, which the host - * controller driver should use instead of the transfer_buffer. - * @transfer_buffer_length: How big is transfer_buffer. The transfer may - * be broken up into chunks according to the current maximum packet - * size for the endpoint, which is a function of the configuration - * and is encoded in the pipe. When the length is zero, neither - * transfer_buffer nor transfer_dma is used. - * @actual_length: This is read in non-iso completion functions, and - * it tells how many bytes (out of transfer_buffer_length) were - * transferred. It will normally be the same as requested, unless - * either an error was reported or a short read was performed. - * The URB_SHORT_NOT_OK transfer flag may be used to make such - * short reads be reported as errors. - * @setup_packet: Only used for control transfers, this points to eight bytes - * of setup data. Control transfers always start by sending this data - * to the device. Then transfer_buffer is read or written, if needed. - * (Not used when URB_NO_DMA_MAP is set.) - * @setup_dma: For control transfers with URB_NO_DMA_MAP set, the device - * driver has provided this DMA address for the setup packet. The - * host controller driver should use this instead of setup_buffer. - * If there is a data phase, its buffer is identified by transfer_dma. - * @start_frame: Returns the initial frame for interrupt or isochronous - * transfers. - * @number_of_packets: Lists the number of ISO transfer buffers. - * @interval: Specifies the polling interval for interrupt or isochronous - * transfers. The units are frames (milliseconds) for for full and low - * speed devices, and microframes (1/8 millisecond) for highspeed ones. - * @error_count: Returns the number of ISO transfers that reported errors. - * @context: For use in completion functions. This normally points to - * request-specific driver context. - * @complete: Completion handler. This URB is passed as the parameter to the - * completion function. The completion function may then do what - * it likes with the URB, including resubmitting or freeing it. - * @iso_frame_desc: Used to provide arrays of ISO transfer buffers and to - * collect the transfer status for each buffer. - * - * This structure identifies USB transfer requests. URBs must be allocated by - * calling usb_alloc_urb() and freed with a call to usb_free_urb(). - * Initialization may be done using various usb_fill_*_urb() functions. URBs - * are submitted using usb_submit_urb(), and pending requests may be canceled - * using usb_unlink_urb(). - * - * Data Transfer Buffers: - * - * Normally drivers provide I/O buffers allocated with kmalloc() or otherwise - * taken from the general page pool. That is provided by transfer_buffer - * (control requests also use setup_packet), and host controller drivers - * perform a dma mapping (and unmapping) for each buffer transferred. Those - * mapping operations can be expensive on some platforms (perhaps using a dma - * bounce buffer or talking to an IOMMU), - * although they're cheap on commodity x86 and ppc hardware. - * - * Alternatively, drivers may pass the URB_NO_DMA_MAP transfer flag, which - * tells the host controller driver that no such mapping is needed since - * the device driver is DMA-aware. For example, they might allocate a DMA - * buffer with usb_buffer_alloc(), or call usb_buffer_map(). - * When this transfer flag is provided, host controller drivers will use the - * dma addresses found in the transfer_dma and/or setup_dma fields rather than - * determing a dma address themselves. - * - * Initialization: - * - * All URBs submitted must initialize dev, pipe, - * transfer_flags (may be zero), complete, timeout (may be zero). - * The URB_ASYNC_UNLINK transfer flag affects later invocations of - * the usb_unlink_urb() routine. - * - * All URBs must also initialize - * transfer_buffer and transfer_buffer_length. They may provide the - * URB_SHORT_NOT_OK transfer flag, indicating that short reads are - * to be treated as errors; that flag is invalid for write requests. - * - * Bulk URBs may - * use the URB_ZERO_PACKET transfer flag, indicating that bulk OUT transfers - * should always terminate with a short packet, even if it means adding an - * extra zero length packet. - * - * Control URBs must provide a setup_packet. - * - * Interrupt UBS must provide an interval, saying how often (in milliseconds - * or, for highspeed devices, 125 microsecond units) - * to poll for transfers. After the URB has been submitted, the interval - * and start_frame fields reflect how the transfer was actually scheduled. - * The polling interval may be more frequent than requested. - * For example, some controllers have a maximum interval of 32 microseconds, - * while others support intervals of up to 1024 microseconds. - * Isochronous URBs also have transfer intervals. (Note that for isochronous - * endpoints, as well as high speed interrupt endpoints, the encoding of - * the transfer interval in the endpoint descriptor is logarithmic.) - * - * Isochronous URBs normally use the URB_ISO_ASAP transfer flag, telling - * the host controller to schedule the transfer as soon as bandwidth - * utilization allows, and then set start_frame to reflect the actual frame - * selected during submission. Otherwise drivers must specify the start_frame - * and handle the case where the transfer can't begin then. However, drivers - * won't know how bandwidth is currently allocated, and while they can - * find the current frame using usb_get_current_frame_number () they can't - * know the range for that frame number. (Ranges for frame counter values - * are HC-specific, and can go from 256 to 65536 frames from "now".) - * - * Isochronous URBs have a different data transfer model, in part because - * the quality of service is only "best effort". Callers provide specially - * allocated URBs, with number_of_packets worth of iso_frame_desc structures - * at the end. Each such packet is an individual ISO transfer. Isochronous - * URBs are normally queued, submitted by drivers to arrange that - * transfers are at least double buffered, and then explicitly resubmitted - * in completion handlers, so - * that data (such as audio or video) streams at as constant a rate as the - * host controller scheduler can support. - * - * Completion Callbacks: - * - * The completion callback is made in_interrupt(), and one of the first - * things that a completion handler should do is check the status field. - * The status field is provided for all URBs. It is used to report - * unlinked URBs, and status for all non-ISO transfers. It should not - * be examined before the URB is returned to the completion handler. - * - * The context field is normally used to link URBs back to the relevant - * driver or request state. - * - * When completion callback is invoked for non-isochronous URBs, the - * actual_length field tells how many bytes were transferred. - * - * ISO transfer status is reported in the status and actual_length fields - * of the iso_frame_desc array, and the number of errors is reported in - * error_count. Completion callbacks for ISO transfers will normally - * (re)submit URBs to ensure a constant transfer rate. - */ -struct urb -{ - spinlock_t lock; /* lock for the URB */ - atomic_t count; /* reference count of the URB */ - void *hcpriv; /* private data for host controller */ - struct list_head urb_list; /* list pointer to all active urbs */ - struct usb_device *dev; /* (in) pointer to associated device */ - unsigned int pipe; /* (in) pipe information */ - int status; /* (return) non-ISO status */ - unsigned int transfer_flags; /* (in) URB_SHORT_NOT_OK | ...*/ - void *transfer_buffer; /* (in) associated data buffer */ - dma_addr_t transfer_dma; /* (in) dma addr for transfer_buffer */ - int transfer_buffer_length; /* (in) data buffer length */ - int actual_length; /* (return) actual transfer length */ - int bandwidth; /* bandwidth for INT/ISO request */ - unsigned char *setup_packet; /* (in) setup packet (control only) */ - dma_addr_t setup_dma; /* (in) dma addr for setup_packet */ - int start_frame; /* (modify) start frame (INT/ISO) */ - int number_of_packets; /* (in) number of ISO packets */ - int interval; /* (in) transfer interval (INT/ISO) */ - int error_count; /* (return) number of ISO errors */ - int timeout; /* (in) timeout, in jiffies */ - void *context; /* (in) context for completion */ - usb_complete_t complete; /* (in) completion routine */ - struct usb_iso_packet_descriptor iso_frame_desc[0]; /* (in) ISO ONLY */ -}; - -/* -------------------------------------------------------------------------- */ - -/** - * usb_fill_control_urb - initializes a control urb - * @urb: pointer to the urb to initialize. - * @dev: pointer to the struct usb_device for this urb. - * @pipe: the endpoint pipe - * @setup_packet: pointer to the setup_packet buffer - * @transfer_buffer: pointer to the transfer buffer - * @buffer_length: length of the transfer buffer - * @complete: pointer to the usb_complete_t function - * @context: what to set the urb context to. - * - * Initializes a control urb with the proper information needed to submit - * it to a device. - */ -static _inline void usb_fill_control_urb (struct urb *urb, - struct usb_device *dev, - unsigned int pipe, - unsigned char *setup_packet, - void *transfer_buffer, - int buffer_length, - usb_complete_t complete, - void *context) -{ - spin_lock_init(&urb->lock); - urb->dev = dev; - urb->pipe = pipe; - urb->setup_packet = setup_packet; - urb->transfer_buffer = transfer_buffer; - urb->transfer_buffer_length = buffer_length; - urb->complete = complete; - urb->context = context; -} - -/** - * usb_fill_bulk_urb - macro to help initialize a bulk urb - * @urb: pointer to the urb to initialize. - * @dev: pointer to the struct usb_device for this urb. - * @pipe: the endpoint pipe - * @transfer_buffer: pointer to the transfer buffer - * @buffer_length: length of the transfer buffer - * @complete: pointer to the usb_complete_t function - * @context: what to set the urb context to. - * - * Initializes a bulk urb with the proper information needed to submit it - * to a device. - */ -static _inline void usb_fill_bulk_urb (struct urb *urb, - struct usb_device *dev, - unsigned int pipe, - void *transfer_buffer, - int buffer_length, - usb_complete_t complete, - void *context) -{ - spin_lock_init(&urb->lock); - urb->dev = dev; - urb->pipe = pipe; - urb->transfer_buffer = transfer_buffer; - urb->transfer_buffer_length = buffer_length; - urb->complete = complete; - urb->context = context; -} - -/** - * usb_fill_int_urb - macro to help initialize a interrupt urb - * @urb: pointer to the urb to initialize. - * @dev: pointer to the struct usb_device for this urb. - * @pipe: the endpoint pipe - * @transfer_buffer: pointer to the transfer buffer - * @buffer_length: length of the transfer buffer - * @complete: pointer to the usb_complete_t function - * @context: what to set the urb context to. - * @interval: what to set the urb interval to, encoded like - * the endpoint descriptor's bInterval value. - * - * Initializes a interrupt urb with the proper information needed to submit - * it to a device. - * Note that high speed interrupt endpoints use a logarithmic encoding of - * the endpoint interval, and express polling intervals in microframes - * (eight per millisecond) rather than in frames (one per millisecond). - */ -static _inline void usb_fill_int_urb (struct urb *urb, - struct usb_device *dev, - unsigned int pipe, - void *transfer_buffer, - int buffer_length, - usb_complete_t complete, - void *context, - int interval) -{ - spin_lock_init(&urb->lock); - urb->dev = dev; - urb->pipe = pipe; - urb->transfer_buffer = transfer_buffer; - urb->transfer_buffer_length = buffer_length; - urb->complete = complete; - urb->context = context; - if (dev->speed == USB_SPEED_HIGH) - urb->interval = 1 << (interval - 1); - else - urb->interval = interval; - urb->start_frame = -1; -} - -extern void usb_init_urb(struct urb *urb); -extern struct urb *usb_alloc_urb(int iso_packets, int mem_flags); -extern void usb_free_urb(struct urb *urb); -#define usb_put_urb usb_free_urb -extern struct urb *usb_get_urb(struct urb *urb); -extern int usb_submit_urb(struct urb *urb, int mem_flags); -extern int usb_unlink_urb(struct urb *urb); - -#define HAVE_USB_BUFFERS -void *usb_buffer_alloc (struct usb_device *dev, size_t size, - int mem_flags, dma_addr_t *dma); -void usb_buffer_free (struct usb_device *dev, size_t size, - void *addr, dma_addr_t dma); - -struct urb *usb_buffer_map (struct urb *urb); -void usb_buffer_dmasync (struct urb *urb); -void usb_buffer_unmap (struct urb *urb); - -struct scatterlist; -int usb_buffer_map_sg (struct usb_device *dev, unsigned pipe, - struct scatterlist *sg, int nents); -void usb_buffer_dmasync_sg (struct usb_device *dev, unsigned pipe, - struct scatterlist *sg, int n_hw_ents); -void usb_buffer_unmap_sg (struct usb_device *dev, unsigned pipe, - struct scatterlist *sg, int n_hw_ents); - -/*-------------------------------------------------------------------* - * SYNCHRONOUS CALL SUPPORT * - *-------------------------------------------------------------------*/ - -extern int usb_control_msg(struct usb_device *dev, unsigned int pipe, - __u8 request, __u8 requesttype, __u16 value, __u16 index, - void *data, __u16 size, int timeout); -extern int usb_bulk_msg(struct usb_device *usb_dev, unsigned int pipe, - void *data, int len, int *actual_length, - int timeout); - -/* wrappers around usb_control_msg() for the most common standard requests */ -extern int usb_get_descriptor(struct usb_device *dev, unsigned char desctype, - unsigned char descindex, void *buf, int size); -extern int usb_get_device_descriptor(struct usb_device *dev); -extern int usb_get_status(struct usb_device *dev, - int type, int target, void *data); -extern int usb_get_string(struct usb_device *dev, - unsigned short langid, unsigned char index, void *buf, int size); -extern int usb_string(struct usb_device *dev, int index, - char *buf, size_t size); - -/* wrappers that also update important state inside usbcore */ -extern int usb_clear_halt(struct usb_device *dev, int pipe); -extern int usb_set_configuration(struct usb_device *dev, int configuration); -extern int usb_set_interface(struct usb_device *dev, int ifnum, int alternate); - -/* - * timeouts, in seconds, used for sending/receiving control messages - * they typically complete within a few frames (msec) after they're issued - * USB identifies 5 second timeouts, maybe more in a few cases, and a few - * slow devices (like some MGE Ellipse UPSes) actually push that limit. - */ -#define USB_CTRL_GET_TIMEOUT 5 -#define USB_CTRL_SET_TIMEOUT 5 - - -/** - * struct usb_sg_request - support for scatter/gather I/O - * @status: zero indicates success, else negative errno - * @bytes: counts bytes transferred. - * - * These requests are initialized using usb_sg_init(), and then are used - * as request handles passed to usb_sg_wait() or usb_sg_cancel(). Most - * members of the request object aren't for driver access. - * - * The status and bytecount values are valid only after usb_sg_wait() - * returns. If the status is zero, then the bytecount matches the total - * from the request. - * - * After an error completion, drivers may need to clear a halt condition - * on the endpoint. - */ -struct usb_sg_request { - int status; - size_t bytes; - - // members not documented above are private to usbcore, - // and are not provided for driver access! - spinlock_t lock; - - struct usb_device *dev; - int pipe; - struct scatterlist *sg; - int nents; - - int entries; - struct urb **urbs; - - int count; - struct completion complete; -}; - -int usb_sg_init ( - struct usb_sg_request *io, - struct usb_device *dev, - unsigned pipe, - unsigned period, - struct scatterlist *sg, - int nents, - size_t length, - int mem_flags -); -void usb_sg_cancel (struct usb_sg_request *io); -void usb_sg_wait (struct usb_sg_request *io); - - -/* -------------------------------------------------------------------------- */ - -/* - * Calling this entity a "pipe" is glorifying it. A USB pipe - * is something embarrassingly simple: it basically consists - * of the following information: - * - device number (7 bits) - * - endpoint number (4 bits) - * - current Data0/1 state (1 bit) [Historical; now gone] - * - direction (1 bit) - * - speed (1 bit) [Historical and specific to USB 1.1; now gone.] - * - max packet size (2 bits: 8, 16, 32 or 64) [Historical; now gone.] - * - pipe type (2 bits: control, interrupt, bulk, isochronous) - * - * That's 18 bits. Really. Nothing more. And the USB people have - * documented these eighteen bits as some kind of glorious - * virtual data structure. - * - * Let's not fall in that trap. We'll just encode it as a simple - * unsigned int. The encoding is: - * - * - max size: bits 0-1 [Historical; now gone.] - * - direction: bit 7 (0 = Host-to-Device [Out], - * 1 = Device-to-Host [In] ... - * like endpoint bEndpointAddress) - * - device: bits 8-14 ... bit positions known to uhci-hcd - * - endpoint: bits 15-18 ... bit positions known to uhci-hcd - * - Data0/1: bit 19 [Historical; now gone. ] - * - lowspeed: bit 26 [Historical; now gone. ] - * - pipe type: bits 30-31 (00 = isochronous, 01 = interrupt, - * 10 = control, 11 = bulk) - * - * Why? Because it's arbitrary, and whatever encoding we select is really - * up to us. This one happens to share a lot of bit positions with the UHCI - * specification, so that much of the uhci driver can just mask the bits - * appropriately. - */ - -/* NOTE: these are not the standard USB_ENDPOINT_XFER_* values!! */ -#define PIPE_ISOCHRONOUS 0 -#define PIPE_INTERRUPT 1 -#define PIPE_CONTROL 2 -#define PIPE_BULK 3 - -#define usb_maxpacket(dev, pipe, out) (out \ - ? (dev)->epmaxpacketout[usb_pipeendpoint(pipe)] \ - : (dev)->epmaxpacketin [usb_pipeendpoint(pipe)] ) - -#define usb_pipein(pipe) ((pipe) & USB_DIR_IN) -#define usb_pipeout(pipe) (!usb_pipein(pipe)) -#define usb_pipedevice(pipe) (((pipe) >> 8) & 0x7f) -#define usb_pipeendpoint(pipe) (((pipe) >> 15) & 0xf) -#define usb_pipetype(pipe) (((pipe) >> 30) & 3) -#define usb_pipeisoc(pipe) (usb_pipetype((pipe)) == PIPE_ISOCHRONOUS) -#define usb_pipeint(pipe) (usb_pipetype((pipe)) == PIPE_INTERRUPT) -#define usb_pipecontrol(pipe) (usb_pipetype((pipe)) == PIPE_CONTROL) -#define usb_pipebulk(pipe) (usb_pipetype((pipe)) == PIPE_BULK) - -/* The D0/D1 toggle bits ... USE WITH CAUTION (they're almost hcd-internal) */ -#define usb_gettoggle(dev, ep, out) (((dev)->toggle[out] >> (ep)) & 1) -#define usb_dotoggle(dev, ep, out) ((dev)->toggle[out] ^= (1 << (ep))) -#define usb_settoggle(dev, ep, out, bit) ((dev)->toggle[out] = ((dev)->toggle[out] & ~(1 << (ep))) | ((bit) << (ep))) - -/* Endpoint halt control/status ... likewise USE WITH CAUTION */ -#define usb_endpoint_running(dev, ep, out) ((dev)->halted[out] &= ~(1 << (ep))) -#define usb_endpoint_halted(dev, ep, out) ((dev)->halted[out] & (1 << (ep))) - - -static _inline unsigned int __create_pipe(struct usb_device *dev, unsigned int endpoint) -{ - return (dev->devnum << 8) | (endpoint << 15); -} - -/* Create various pipes... */ -#define usb_sndctrlpipe(dev,endpoint) ((PIPE_CONTROL << 30) | __create_pipe(dev,endpoint)) -#define usb_rcvctrlpipe(dev,endpoint) ((PIPE_CONTROL << 30) | __create_pipe(dev,endpoint) | USB_DIR_IN) -#define usb_sndisocpipe(dev,endpoint) ((PIPE_ISOCHRONOUS << 30) | __create_pipe(dev,endpoint)) -#define usb_rcvisocpipe(dev,endpoint) ((PIPE_ISOCHRONOUS << 30) | __create_pipe(dev,endpoint) | USB_DIR_IN) -#define usb_sndbulkpipe(dev,endpoint) ((PIPE_BULK << 30) | __create_pipe(dev,endpoint)) -#define usb_rcvbulkpipe(dev,endpoint) ((PIPE_BULK << 30) | __create_pipe(dev,endpoint) | USB_DIR_IN) -#define usb_sndintpipe(dev,endpoint) ((PIPE_INTERRUPT << 30) | __create_pipe(dev,endpoint)) -#define usb_rcvintpipe(dev,endpoint) ((PIPE_INTERRUPT << 30) | __create_pipe(dev,endpoint) | USB_DIR_IN) - -/* -------------------------------------------------------------------------- */ - -/* - * Debugging and troubleshooting/diagnostic helpers. - */ -void usb_show_device_descriptor(struct usb_device_descriptor *); -void usb_show_config_descriptor(struct usb_config_descriptor *); -void usb_show_interface_descriptor(struct usb_interface_descriptor *); -void usb_show_endpoint_descriptor(struct usb_endpoint_descriptor *); -void usb_show_device(struct usb_device *); -void usb_show_string(struct usb_device *dev, char *id, int index); - -#ifdef DEBUG -//#define dbg(format, arg...) printk(KERN_DEBUG "%s: " format "\n" , __FILE__ , ## arg) -#define dbg printk -#else -//#define dbg(format, arg...) do {} while (0) -#define dbg -#endif - - - -#ifdef DEBUG_MODE -//#define info(format, arg...) printk(KERN_INFO __FILE__ ": " format "\n" , ## arg) -//#define err(format, arg...) printk(KERN_ERR __FILE__ ": " format "\n" , ## arg) -//#define warn(format, arg...) printk(KERN_WARNING __FILE__ ": " format "\n" , ## arg) -int info(char *str, const char *format, ...); -int err(char *str, const char *format, ...); -int warn(const char *format, ...); -#endif - -#ifndef DEBUG_MODE -int info(char *str, const char *format, ...); -int err(const char *format, ...); -int warn(const char *format, ...); - -//#define info(format, arg...) do {} while (0) -//#define err(format, arg...) do {} while (0) -//#define warn(format, arg...) do {} while (0) -#endif - -#endif /* __KERNEL__ */ - -#endif diff --git a/import/OpenXDK/include/xusb/linux/usb_ch9.h b/import/OpenXDK/include/xusb/linux/usb_ch9.h deleted file mode 100644 index 3fbe79e46..000000000 --- a/import/OpenXDK/include/xusb/linux/usb_ch9.h +++ /dev/null @@ -1,332 +0,0 @@ -/* - * This file holds USB constants and structures that are needed for USB - * device APIs. These are used by the USB device model, which is defined - * in chapter 9 of the USB 2.0 specification. Linux has several APIs in C - * that need these: - * - * - the master/host side Linux-USB kernel driver API; - * - the "usbfs" user space API; and - * - (eventually) a Linux "gadget" slave/device side driver API. - * - * USB 2.0 adds an additional "On The Go" (OTG) mode, which lets systems - * act either as a USB master/host or as a USB slave/device. That means - * the master and slave side APIs will benefit from working well together. - */ - -#ifndef __LINUX_USB_CH9_H -#define __LINUX_USB_CH9_H -#if 0 -#include /* __u8 etc */ -#endif -/*-------------------------------------------------------------------------*/ - -/* CONTROL REQUEST SUPPORT */ - -/* - * USB directions - * - * This bit flag is used in endpoint descriptors' bEndpointAddress field. - * It's also one of three fields in control requests bRequestType. - */ -#define USB_DIR_OUT 0 /* to device */ -#define USB_DIR_IN 0x80 /* to host */ - -/* - * USB types, the second of three bRequestType fields - */ -#define USB_TYPE_MASK (0x03 << 5) -#define USB_TYPE_STANDARD (0x00 << 5) -#define USB_TYPE_CLASS (0x01 << 5) -#define USB_TYPE_VENDOR (0x02 << 5) -#define USB_TYPE_RESERVED (0x03 << 5) - -/* - * USB recipients, the third of three bRequestType fields - */ -#define USB_RECIP_MASK 0x1f -#define USB_RECIP_DEVICE 0x00 -#define USB_RECIP_INTERFACE 0x01 -#define USB_RECIP_ENDPOINT 0x02 -#define USB_RECIP_OTHER 0x03 - -/* - * Standard requests, for the bRequest field of a SETUP packet. - * - * These are qualified by the bRequestType field, so that for example - * TYPE_CLASS or TYPE_VENDOR specific feature flags could be retrieved - * by a GET_STATUS request. - */ -#define USB_REQ_GET_STATUS 0x00 -#define USB_REQ_CLEAR_FEATURE 0x01 -#define USB_REQ_SET_FEATURE 0x03 -#define USB_REQ_SET_ADDRESS 0x05 -#define USB_REQ_GET_DESCRIPTOR 0x06 -#define USB_REQ_SET_DESCRIPTOR 0x07 -#define USB_REQ_GET_CONFIGURATION 0x08 -#define USB_REQ_SET_CONFIGURATION 0x09 -#define USB_REQ_GET_INTERFACE 0x0A -#define USB_REQ_SET_INTERFACE 0x0B -#define USB_REQ_SYNCH_FRAME 0x0C - - -/** - * struct usb_ctrlrequest - SETUP data for a USB device control request - * @bRequestType: matches the USB bmRequestType field - * @bRequest: matches the USB bRequest field - * @wValue: matches the USB wValue field (le16 byte order) - * @wIndex: matches the USB wIndex field (le16 byte order) - * @wLength: matches the USB wLength field (le16 byte order) - * - * This structure is used to send control requests to a USB device. It matches - * the different fields of the USB 2.0 Spec section 9.3, table 9-2. See the - * USB spec for a fuller description of the different fields, and what they are - * used for. - * - * Note that the driver for any interface can issue control requests. - * For most devices, interfaces don't coordinate with each other, so - * such requests may be made at any time. - */ -#pragma pack(1) -struct usb_ctrlrequest { - __u8 bRequestType; - __u8 bRequest; - __u16 wValue; - __u16 wIndex; - __u16 wLength; -}; //__attribute__ ((packed)); -#pragma pack() - -/*-------------------------------------------------------------------------*/ - -/* - * STANDARD DESCRIPTORS ... as returned by GET_DESCRIPTOR, or - * (rarely) accepted by SET_DESCRIPTOR. - * - * Note that all multi-byte values here are encoded in little endian - * byte order "on the wire". But when exposed through Linux-USB APIs, - * they've been converted to cpu byte order. - */ - -/* - * Descriptor types ... USB 2.0 spec table 9.5 - */ -#define USB_DT_DEVICE 0x01 -#define USB_DT_CONFIG 0x02 -#define USB_DT_STRING 0x03 -#define USB_DT_INTERFACE 0x04 -#define USB_DT_ENDPOINT 0x05 -#define USB_DT_DEVICE_QUALIFIER 0x06 -#define USB_DT_OTHER_SPEED_CONFIG 0x07 -#define USB_DT_INTERFACE_POWER 0x08 - -/* All standard descriptors have these 2 fields at the beginning */ -#pragma pack(1) -struct usb_descriptor_header { - __u8 bLength; - __u8 bDescriptorType; -}; //__attribute__ ((packed)); -#pragma pack() - - -/*-------------------------------------------------------------------------*/ - -/* USB_DT_DEVICE: Device descriptor */ -#pragma pack(1) -struct usb_device_descriptor { - __u8 bLength; - __u8 bDescriptorType; - - __u16 bcdUSB; - __u8 bDeviceClass; - __u8 bDeviceSubClass; - __u8 bDeviceProtocol; - __u8 bMaxPacketSize0; - __u16 idVendor; - __u16 idProduct; - __u16 bcdDevice; - __u8 iManufacturer; - __u8 iProduct; - __u8 iSerialNumber; - __u8 bNumConfigurations; -}; //__attribute__ ((packed)); -#pragma pack() - -#define USB_DT_DEVICE_SIZE 18 - - -/* - * Device and/or Interface Class codes - * as found in bDeviceClass or bInterfaceClass - * and defined by www.usb.org documents - */ -#define USB_CLASS_PER_INTERFACE 0 /* for DeviceClass */ -#define USB_CLASS_AUDIO 1 -#define USB_CLASS_COMM 2 -#define USB_CLASS_HID 3 -#define USB_CLASS_PHYSICAL 5 -#define USB_CLASS_STILL_IMAGE 6 -#define USB_CLASS_PRINTER 7 -#define USB_CLASS_MASS_STORAGE 8 -#define USB_CLASS_HUB 9 -#define USB_CLASS_CDC_DATA 0x0a -#define USB_CLASS_CSCID 0x0b /* chip+ smart card */ -#define USB_CLASS_CONTENT_SEC 0x0d /* content security */ -#define USB_CLASS_APP_SPEC 0xfe -#define USB_CLASS_VENDOR_SPEC 0xff - -/*-------------------------------------------------------------------------*/ - -/* USB_DT_CONFIG: Configuration descriptor information. - * - * USB_DT_OTHER_SPEED_CONFIG is the same descriptor, except that the - * descriptor type is different. Highspeed-capable devices can look - * different depending on what speed they're currently running. Only - * devices with a USB_DT_DEVICE_QUALIFIER have any OTHER_SPEED_CONFIG - * descriptors. - */ -#pragma pack(1) -struct usb_config_descriptor { - __u8 bLength; - __u8 bDescriptorType; - - __u16 wTotalLength; - __u8 bNumInterfaces; - __u8 bConfigurationValue; - __u8 iConfiguration; - __u8 bmAttributes; - __u8 bMaxPower; -}; //__attribute__ ((packed)); -#pragma pack() - -#define USB_DT_CONFIG_SIZE 9 - -/* from config descriptor bmAttributes */ -#define USB_CONFIG_ATT_ONE (1 << 7) /* must be set */ -#define USB_CONFIG_ATT_SELFPOWER (1 << 6) /* self powered */ -#define USB_CONFIG_ATT_WAKEUP (1 << 5) /* can wakeup */ - -/*-------------------------------------------------------------------------*/ - -/* USB_DT_STRING: String descriptor */ -#pragma pack(1) -struct usb_string_descriptor { - __u8 bLength; - __u8 bDescriptorType; - - __u16 wData[1]; /* UTF-16LE encoded */ -}; //__attribute__ ((packed)); -#pragma pack() - - -/* note that "string" zero is special, it holds language codes that - * the device supports, not Unicode characters. - */ - -/*-------------------------------------------------------------------------*/ - -/* USB_DT_INTERFACE: Interface descriptor */ -#pragma pack(1) -struct usb_interface_descriptor { - __u8 bLength; - __u8 bDescriptorType; - - __u8 bInterfaceNumber; - __u8 bAlternateSetting; - __u8 bNumEndpoints; - __u8 bInterfaceClass; - __u8 bInterfaceSubClass; - __u8 bInterfaceProtocol; - __u8 iInterface; -}; //__attribute__ ((packed)); -#pragma pack() - -#define USB_DT_INTERFACE_SIZE 9 - -/*-------------------------------------------------------------------------*/ - -/* USB_DT_ENDPOINT: Endpoint descriptor */ -#pragma pack(1) -struct usb_endpoint_descriptor { - __u8 bLength; - __u8 bDescriptorType; - - __u8 bEndpointAddress; - __u8 bmAttributes; - __u16 wMaxPacketSize; - __u8 bInterval; - - // NOTE: these two are _only_ in audio endpoints. - // use USB_DT_ENDPOINT*_SIZE in bLength, not sizeof. - __u8 bRefresh; - __u8 bSynchAddress; -}; //__attribute__ ((packed)); -#pragma pack() - -#define USB_DT_ENDPOINT_SIZE 7 -#define USB_DT_ENDPOINT_AUDIO_SIZE 9 /* Audio extension */ - - -/* - * Endpoints - */ -#define USB_ENDPOINT_NUMBER_MASK 0x0f /* in bEndpointAddress */ -#define USB_ENDPOINT_DIR_MASK 0x80 - -#define USB_ENDPOINT_XFERTYPE_MASK 0x03 /* in bmAttributes */ -#define USB_ENDPOINT_XFER_CONTROL 0 -#define USB_ENDPOINT_XFER_ISOC 1 -#define USB_ENDPOINT_XFER_BULK 2 -#define USB_ENDPOINT_XFER_INT 3 - - -/*-------------------------------------------------------------------------*/ - -/* USB_DT_DEVICE_QUALIFIER: Device Qualifier descriptor */ -#pragma pack(1) -struct usb_qualifier_descriptor { - __u8 bLength; - __u8 bDescriptorType; - - __u16 bcdUSB; - __u8 bDeviceClass; - __u8 bDeviceSubClass; - __u8 bDeviceProtocol; - __u8 bMaxPacketSize0; - __u8 bNumConfigurations; - __u8 bRESERVED; -}; //__attribute__ ((packed)); -#pragma pack() - - -/*-------------------------------------------------------------------------*/ - -/* USB 2.0 defines three speeds, here's how Linux identifies them */ - -enum usb_device_speed { - USB_SPEED_UNKNOWN = 0, /* enumerating */ - USB_SPEED_LOW, USB_SPEED_FULL, /* usb 1.1 */ - USB_SPEED_HIGH /* usb 2.0 */ -}; - -enum usb_device_state { - /* NOTATTACHED isn't in the USB spec, and this state acts - * the same as ATTACHED ... but it's clearer this way. - */ - USB_STATE_NOTATTACHED = 0, - - /* the chapter 9 device states */ - USB_STATE_ATTACHED, - USB_STATE_POWERED, - USB_STATE_DEFAULT, /* limited function */ - USB_STATE_ADDRESS, - USB_STATE_CONFIGURED, /* most functions */ - - USB_STATE_SUSPENDED - - /* NOTE: there are actually four different SUSPENDED - * states, returning to POWERED, DEFAULT, ADDRESS, or - * CONFIGURED respectively when SOF tokens flow again. - */ -}; - -#endif /* __LINUX_USB_CH9_H */ diff --git a/import/OpenXDK/include/xusb/linux_wrapper.h b/import/OpenXDK/include/xusb/linux_wrapper.h deleted file mode 100644 index b92f27710..000000000 --- a/import/OpenXDK/include/xusb/linux_wrapper.h +++ /dev/null @@ -1,782 +0,0 @@ -/* - * linux-wrapper.h - * - * Hard coded Linux kernel replacements for x86 - * - * (c) 2003 Georg Acher (georg@acher.org) - * - * Emulation of: - * typedefs - * structs - * macros - * - * All structs and prototypes are based on kernel source 2.5.72 - * - * #include - */ -#ifndef __LINUX_WRAPPER_H__ -#define __LINUX_WRAPPER_H__ - - -/*------------------------------------------------------------------------*/ -/* Typedefs */ -/*------------------------------------------------------------------------*/ -#define __inline__ __inline -#include - -typedef unsigned int __u32; -typedef __u32 u32; -typedef unsigned short __u16; -typedef __u16 u16; -typedef unsigned char __u8; -typedef __u8 u8; - -typedef short s16; - -typedef u32 dma_addr_t; - -typedef int spinlock_t; -typedef int atomic_t; -#ifndef STANDALONE -typedef int mode_t; -typedef int pid_t; -typedef int ssize_t; - -#endif -typedef int irqreturn_t; -typedef unsigned long kernel_ulong_t; - -typedef int wait_queue_head_t; -/*------------------------------------------------------------------------*/ -/* Stuff from xbox/linux environment */ -/*------------------------------------------------------------------------*/ - -#include "list.h" - -#ifndef STANDALONE -#ifdef MODULE -typedef int size_t; -#define NULL ((void*)0) -extern void * memset(void *,int,unsigned int); -extern void * memcpy(void *,const void *,unsigned int); -#if 0 -extern char * strcpy(char *,const char *); -#else -static inline char * strcpy(char * dest,const char *src) -{ -int d0, d1, d2; -__asm__ __volatile__( - "1:\tlodsb\n\t" - "stosb\n\t" - "testb %%al,%%al\n\t" - "jne 1b" - : "=&S" (d0), "=&D" (d1), "=&a" (d2) - :"0" (src),"1" (dest) : "memory"); -return dest; -} -#endif -extern size_t strlen(const char *); - -extern int memcmp(const void *,const void *,unsigned int); - -#else -//#include "boot.h" -#include "config.h" -#endif -#else -#include -#include -#include -#include "consts.h" -#include -#endif - -/*------------------------------------------------------------------------*/ -/* General structs */ -/*------------------------------------------------------------------------*/ - -struct timer_list { - void (*function)(unsigned long); - unsigned long data; - int expires; - struct list_head timer_list; -}; - -struct work_struct { - void (*func)(void *); -}; -struct device { - char name[128]; - struct bus_type *bus; - int dma_mask; - char bus_id[16]; - struct device_driver* driver; - void *driver_data; - struct device *parent; - struct list_head driver_list; - void (*release)(struct device * dev); -}; -struct class_device{int a;}; -struct semaphore{int a;}; - -struct device_driver{ - char *name; - struct bus_type *bus; - int (*probe) (struct device * dev); - int (*remove) (struct device * dev); - struct list_head devices; -}; - -struct bus_type { - char * name; - int (*match)(struct device * dev, struct device_driver * drv); - struct device * (*add) (struct device * parent, char * bus_id); - int (*hotplug) (struct device *dev, char **envp, - int num_envp, char *buffer, int buffer_size); -}; - -struct dummy_process -{ - int flags; -}; - -struct pt_regs -{ - int a; -}; -struct completion { - unsigned int done; - wait_queue_head_t wait; -}; - -/* from mod_devicetable.h */ - -struct usb_device_id { - /* which fields to match against? */ - __u16 match_flags; - - /* Used for product specific matches; range is inclusive */ - __u16 idVendor; - __u16 idProduct; - __u16 bcdDevice_lo; - __u16 bcdDevice_hi; - - /* Used for device class matches */ - __u8 bDeviceClass; - __u8 bDeviceSubClass; - __u8 bDeviceProtocol; - - /* Used for interface class matches */ - __u8 bInterfaceClass; - __u8 bInterfaceSubClass; - __u8 bInterfaceProtocol; - - /* not matched against */ - kernel_ulong_t driver_info; -}; - -/* Some useful macros to use to create struct usb_device_id */ -#define USB_DEVICE_ID_MATCH_VENDOR 0x0001 -#define USB_DEVICE_ID_MATCH_PRODUCT 0x0002 -#define USB_DEVICE_ID_MATCH_DEV_LO 0x0004 -#define USB_DEVICE_ID_MATCH_DEV_HI 0x0008 -#define USB_DEVICE_ID_MATCH_DEV_CLASS 0x0010 -#define USB_DEVICE_ID_MATCH_DEV_SUBCLASS 0x0020 -#define USB_DEVICE_ID_MATCH_DEV_PROTOCOL 0x0040 -#define USB_DEVICE_ID_MATCH_INT_CLASS 0x0080 -#define USB_DEVICE_ID_MATCH_INT_SUBCLASS 0x0100 -#define USB_DEVICE_ID_MATCH_INT_PROTOCOL 0x0200 - -/*------------------------------------------------------------------------*/ -/* imported functions from top-level */ -/*------------------------------------------------------------------------*/ - -void* zxmalloc(size_t); -void zxfree(void*); -void zxprintf(char* fmt, ...); -int zxsprintf(char *buffer, char* fmt, ...); -//void zxsprintf(char *buffer, char* fmt, ...); -int zxsnprintf(char *buffer, size_t s, char* fmt, ...); - -/*------------------------------------------------------------------------*/ -/* PCI structs (taken from linux/pci.h et al., but slightly modified) */ -/*------------------------------------------------------------------------*/ - -struct pci_dev { - int vendor; - int device; - struct pci_bus *bus; - int irq; - char *slot_name; - struct device dev; - int base[4]; - int flags[4]; - void * data; -}; - -struct pci_bus { - unsigned char number; -}; - -struct pci_device_id { - __u32 vendor, device; /* Vendor and device ID or PCI_ANY_ID*/ - __u32 subvendor, subdevice; /* Subsystem ID's or PCI_ANY_ID */ - __u32 class, class_mask; /* (class,subclass,prog-if) triplet */ - kernel_ulong_t driver_data; /* Data private to the driver */ -}; - -struct pci_driver { - struct list_head node; - char *name; - const struct pci_device_id *id_table; /* must be non-NULL for probe to be called */ - int (*probe) (struct pci_dev *dev, const struct pci_device_id *id); /* New device inserted */ - void (*remove) (struct pci_dev *dev); /* Device removed (NULL if not a hot-plug capable driver) */ - int (*save_state) (struct pci_dev *dev, u32 state); /* Save Device Context */ - int (*suspend) (struct pci_dev *dev, u32 state); /* Device suspended */ - int (*resume) (struct pci_dev *dev); /* Device woken up */ - int (*enable_wake) (struct pci_dev *dev, u32 state, int enable); /* Enable wake event */ -}; - -struct scatterlist -{ - int page; - int offset; - int length; -}; - -struct usbdevfs_hub_portinfo -{ - int nports; - int port[8]; -}; - -/*------------------------------------------------------------------------*/ -/* constant defines */ -/*------------------------------------------------------------------------*/ - -#define TASK_UNINTERRUPTIBLE 0 -#define HZ 100 /* Don't rely on that... */ -#define KERN_DEBUG "DBG: " -#define KERN_ERR "ERR: " -#define KERN_WARNING "WRN: " -#define KERN_INFO "INF: " -#define GFP_KERNEL 0 -#define GFP_ATOMIC 0 -#define GFP_NOIO 0 -#define SLAB_ATOMIC 0 -#define PCI_ANY_ID (~0) -#define SIGKILL 9 -#define THIS_MODULE 0 -#define PAGE_SIZE 4096 - - -#define CLONE_FS 0 -#define CLONE_FILES 0 -#define CLONE_SIGHAND 0 -#define PF_FREEZE 0 -#define PF_IOTHREAD 0 - - -#define USBDEVFS_HUB_PORTINFO 1234 -#define SA_SHIRQ 0 - -#undef PCI_COMMAND -#define PCI_COMMAND 0 -#undef PCI_COMMAND_MASTER -#define PCI_COMMAND_MASTER 0 -/*------------------------------------------------------------------------*/ -/* Module/export macros */ -/*------------------------------------------------------------------------*/ - -#define MODULE_AUTHOR(a) -#define MODULE_DESCRIPTION(a) -#define MODULE_LICENSE(a) -#define MODULE_DEVICE_TABLE(type,name) void* module_table_##name=&name - -#define __devinit -#define __exit -#define __init -#define __devinitdata -#define module_init(x) static void module_init_##x(void){ x();} -#define module_exit(x) static void module_exit_##x(void){ x();} -#define EXPORT_SYMBOL_GPL(x) -#define EXPORT_SYMBOL(x) - -#define __setup(x,y) int setup_##y=(int)y -#define subsys_initcall(x) void subsys_##x(void){x();} - -/*------------------------------------------------------------------------*/ -/* Access macros */ -/*------------------------------------------------------------------------*/ - -#define dev_get_drvdata(a) (a)->driver_data -#define dev_set_drvdata(a,b) (a)->driver_data=(b) - -#define __io_virt(x) ((void *)(x)) -#define readl(addr) (*(volatile unsigned int *) __io_virt(addr)) -#define writel(b,addr) (*(volatile unsigned int *) __io_virt(addr) = (b)) -#define likely(x) (x) -#define unlikely(x) (x) -#define prefetch(x) 1 - -/* The kernel macro for list_for_each_entry makes nonsense (have no clue - * why, this is just the same definition...) */ - -#undef list_for_each_entry -/* -#define list_for_each_entry(pos, head, member) \ - for (pos = list_entry((head)->next, pos, member), \ - 1; \ - &pos->member != (head); \ - pos = list_entry(pos->member.next, pos, member), \ - 1) -*/ - -#define list_for_each_entry(pos, head, member) \ - for (pos = list_entry((head)->next, typeof(*pos), member), \ - prefetch(pos->member.next); \ - &pos->member != (head); \ - pos = list_entry(pos->member.next, typeof(*pos), member), \ - prefetch(pos->member.next)) - - -/*------------------------------------------------------------------------*/ -/* function wrapper macros */ -/*------------------------------------------------------------------------*/ -#define kmalloc(x,y) zxmalloc(x) -#define kfree(x) zxfree(x) - -// #define sprintf(a,b,format, arg...) zxsprintf((a),(b),format, ## arg) -// #define snprintf(a,b,format, arg...) zxsnprintf((a),(b),format, ##arg) -// #define printk(format, arg...) zxprintf(format, ## arg) -// #define BUG(...) do {} while(0) - -/* Locks & friends */ - -#define DECLARE_MUTEX(x) struct semaphore x -#define init_MUTEX(x) - -#define SPIN_LOCK_UNLOCKED 0 -#define spin_lock_init(a) do {} while(0) -#define spin_lock(a) *(int*)a=1 -#define spin_unlock(a) do {} while(0) - -#define spin_lock_irqsave(a,b) b=0 -#define spin_unlock_irqrestore(a,b) - -#if 0 -#define local_irq_save(x) __asm__ __volatile__("pushfl ; popl %0 ; cli":"=g" (x): /* no input */ :"memory") -#define local_irq_restore(x) __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory", "cc") -#else -#define local_irq_save(x) do {} while(0) -#define local_irq_restore(x) do {} while(0) -#endif - -#define atomic_inc(x) *(x)+=1 -#define atomic_dec(x) *(x)-=1 -#define atomic_dec_and_test(x) (*(x)-=1,(*(x))==0) -#define atomic_set(x,a) *(x)=a -#define atomic_read(x) *(x) -#define ATOMIC_INIT(x) (x) - -#define down(x) do {} while(0) -#define up(x) do {} while(0) -#define down_trylock(a) 0 - -#define down_read(a) do {} while(0) -#define up_read(a) do {} while(0) - -#define DECLARE_WAIT_QUEUE_HEAD(x) int x - -#define DECLARE_COMPLETION(x) struct completion x - -/* driver */ - -#define driver_unregister(a) do {} while(0) -#define put_device(a) do {} while(0) - - -/* PCI */ -#define pci_pool_create(a,b,c,d,e) (void*)1 - -#define pci_pool_alloc(a,b,c) my_pci_pool_alloc(a,b,c) - -static void __inline *my_pci_pool_alloc(void* pool, size_t size, - dma_addr_t *dma_handle) -{ - void* a; - a=kmalloc(size,0); //FIXME -#ifdef MODULE - *dma_handle=((u32)a)&0xfffffff; -#else - *dma_handle=(u32)a; -#endif - return a; -} - - -#define pci_pool_free(a,b,c) kfree(b) -#define pci_alloc_consistent(a,b,c) my_pci_alloc_consistent(a,b,c) - -static void __inline *my_pci_alloc_consistent(struct pci_dev *hwdev, size_t size, - dma_addr_t *dma_handle) -{ - void* a; - - a=kmalloc(size+256,0); //FIXME - a=(void*)(((int)a+255)&~255); // 256 alignment - *dma_handle=((u32)a)&0xfffffff; - - return a; -} - -#define pci_free_consistent(a,b,c,d) kfree(c) -#define pci_pool_destroy(a) do {} while(0) - -#define pci_module_init(x) my_pci_module_init(x) -int my_pci_module_init(struct pci_driver *x); - -#define pci_unregister_driver(a) do {} while(0) - -#define bus_register(a) do {} while(0) -#define bus_unregister(a) do {} while(0) - -#define dma_map_single(a,b,c,d) ((u32)(b)&0xfffffff) -#define dma_unmap_single(a,b,c,d) do {} while(0) -#define pci_unmap_single(a,b,c,d) do {} while(0) -#define dma_sync_single(a,b,c,d) do {} while(0) -#define dma_sync_sg(a,b,c,d) do {} while(0) -#define dma_map_sg(a,b,c,d) 0 -#define dma_unmap_sg(a,b,c,d) do {} while(0) - -#define usb_create_driverfs_dev_files(a) do {} while(0) -#define usb_create_driverfs_intf_files(a) do {} while(0) -#define sg_dma_address(x) ((u32)((x)->page*4096 + (x)->offset)) -#define sg_dma_len(x) ((x)->length) - -#define page_address(x) ((void*)(x/4096)) - -#define DMA_TO_DEVICE 0 -#define DMA_FROM_DEVICE 0 -#define PCI_DMA_TODEVICE -#define PCI_DMA_FROMDEVICE -#define PCI_DMA_TODEVICE - -#define PCI_ROM_RESOURCE 0 -#define IORESOURCE_IO 1 - -#define DECLARE_WAITQUEUE(a,b) wait_queue_head_t a=0 -#define init_waitqueue_head(a) do {} while(0) -#define add_wait_queue(a,b) do {} while(0) -#define remove_wait_queue(a,b) do {} while(0) - -// BB - Not sure FIXME -#define wmb() //__asm__ __volatile__ ("": : :"memory") -#define rmb() //__asm__ __volatile__ ("lock; addl $0,0(%%esp)": : :"memory") - -#define in_interrupt() 0 - -#define init_completion(x) (x)->done=0 -#define wait_for_completion(x) my_wait_for_completion(x) -void my_wait_for_completion(struct completion*); - -#define IRQ_NONE 0 -#define IRQ_HANDLED 1 - -#define INIT_WORK(a,b,c) (a)->func=b - -#define set_current_state(a) do {} while(0) - -#define might_sleep() do {} while(0) -#define daemonize(a) do {} while(0) -#define allow_signal(a) do {} while(0) -#define wait_event_interruptible(x,y) do {} while(0) -#define flush_scheduled_work() do {} while(0) -#define refrigerator(x) do {} while(0) -#define signal_pending(x) 1 // fall through threads -#define complete_and_exit(a,b) return 0 - -#define kill_proc(a,b,c) 0 -#define yield() do {} while(0) -#define cpu_relax() do {} while(0) - -/*------------------------------------------------------------------------*/ -/* Kernel macros */ -/*------------------------------------------------------------------------*/ - -#define LINUX_VERSION_CODE 0x020572 -#define UTS_SYSNAME "XBOX" -#define UTS_RELEASE "----" - -/* from linux/kernel.h */ -#define max_t(type,x,y) \ - ({ type __x = (x); type __y = (y); __x > __y ? __x: __y; }) - -#define min_t(type,x,y) \ - ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; }) - -#define container_of(ptr1, type1, member) ({ \ - const typeof( ((type1 *)0)->member ) *__mptr = (ptr1); \ - (type1 *)( (char *)__mptr - offsetof(type1,member) );}) - - -/* from linux/stddef.h */ - -#undef offsetof -#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) - -/*------------------------------------------------------------------------*/ -/* Conversion macros */ -/*------------------------------------------------------------------------*/ - -#define __constant_cpu_to_le32(x) (x) -#define cpu_to_le16(x) (x) -#define le16_to_cpu(x) (x) -#define cpu_to_le32(x) (x) -#define cpu_to_le32p(x) (*(__u32*)(x)) -#define le32_to_cpup(x) (*(__u32*)(x)) -#define le32_to_cpu(x) ((u32)x) -#define le16_to_cpus(x) do {} while (0) -#define le16_to_cpup(x) (*(__u16*)(x)) -#define cpu_to_le16p(x) (*(__u16*)(x)) - -/*------------------------------------------------------------------------*/ -/* Debug output */ -/*------------------------------------------------------------------------*/ -#ifdef DEBUG_MODE -#define dev_printk(lvl,x,f,arg...) printk(f, ## arg) -#define dev_dbg(x,f,arg...) do {} while (0) //printk(f, ## arg) -#define dev_info(x,f,arg...) printk(f,## arg) -#define dev_warn(x,f,arg...) printk(f,## arg) -#define dev_err(x,f,arg...) printk(f,## arg) -#define pr_debug(x,f,arg...) printk(f,## arg) -#define usbprintk printk -#endif - -/* -#ifndef DEBUG_MODE -#define dev_printk(lvl,x,f,arg...) do {} while (0) -#define dev_dbg(x,f,arg...) do {} while (0) //printk(f, ## arg) -#define dev_info(x,f,arg...) do {} while (0) -#define dev_warn(x,f,arg...) do {} while (0) -#define dev_err(x,f,arg...) do {} while (0) -#define pr_debug(x,f,arg...) do {} while (0) -#define usbprintk -#endif -*/ - - -#define PCI_DEVFN(a,b) 0 -#define PCI_SLOT(a) 0 - -/*------------------------------------------------------------------------*/ -/* Stuff from kernel */ -/*------------------------------------------------------------------------*/ - -#include "asm/errno.h" -#include "linux/bitops.h" -#include "asm/pci_ids.h" - -/*------------------------------------------------------------------------*/ -/* global variables */ -/*------------------------------------------------------------------------*/ - -#define jiffies my_jiffies -extern int my_jiffies; -#define current my_current -extern struct dummy_process *my_current; - -extern struct list_head interrupt_list; - -/*------------------------------------------------------------------------*/ -/* Function prototypes */ -/*------------------------------------------------------------------------*/ -void usb_hcd_pci_remove (struct pci_dev *dev); - -#define wait_ms(x) my_wait_ms(x) -void my_wait_ms(unsigned int ms); - -#define udelay(x) my_udelay(x) -void my_udelay(unsigned int a); - -#define mdelay(x) my_mdelay(x); -void my_mdelay(unsigned int a); - -#define pci_find_slot(a,b) my_pci_find_slot(a,b) -struct pci_dev *my_pci_find_slot(int a,int b); - -/*------------------------------------------------------------------------*/ -/* Timer management */ -/*------------------------------------------------------------------------*/ - -#define MAX_TIMERS 20 -extern struct timer_list *main_timer_list[MAX_TIMERS]; - -static void __inline__ init_timer(struct timer_list* t) -{ - INIT_LIST_HEAD(&t->timer_list); - t->function=NULL; - t->expires=0; -} - -static void __inline__ add_timer(struct timer_list* t) -{ - int n; - for(n=0;nexpires=ex; - add_timer(t); -} - -/*------------------------------------------------------------------------*/ -/* Device driver and process related stuff */ -/*------------------------------------------------------------------------*/ - -static int __inline__ usb_major_init(void){return 0;} -static void __inline__ usb_major_cleanup(void){} -static void __inline__ schedule_work(void* p){} - -#define device_initialize(x) my_device_initialize(x) -void my_device_initialize(struct device *dev); - -#define get_device(x) my_get_device(x) -struct device *my_get_device(struct device *dev); - -#define device_add(x) my_device_add(x) -int my_device_add(struct device *dev); - -#define driver_register(x) my_driver_register(x) -int my_driver_register(struct device_driver *driver); - -#define device_unregister(a) my_device_unregister(a) -int my_device_unregister(struct device *dev); - -#define DEVICE_ATTR(a,b,c,d) int xxx_##a -#define device_create_file(a,b) do {} while(0) -#define device_remove_file(a,b) do {} while(0) - -#define schedule_timeout(x) my_schedule_timeout(x) -int my_schedule_timeout(int x); - -#define wake_up(x) my_wake_up(x) -void my_wake_up(void*); - -// cannot be mapped via macro due to collision with urb->complete -static void __inline__ complete(struct completion *p) -{ - /* Wake up x->wait */ - p->done++; - wake_up(&p->wait); -} - -#define kernel_thread(a,b,c) my_kernel_thread(a,b,c) -int my_kernel_thread(int (*handler)(void*), void* parm, int flags); - -/*------------------------------------------------------------------------*/ -/* PCI, simple and inlined... */ -/*------------------------------------------------------------------------*/ -static int __inline__ pci_enable_device(struct pci_dev *dev) {return 0;} - -static unsigned long __inline__ pci_resource_start (struct pci_dev *dev, int x) -{ - return dev->base[x]; -} - -static unsigned long __inline__ pci_resource_len (struct pci_dev *dev, int x){return 0;} - -static int __inline__ request_mem_region(unsigned long addr, unsigned long len, const char * d){return 1;} - -static void __inline__ *ioremap_nocache(unsigned long addr, unsigned long len) -{ - return (void*)addr; -} - -static int __inline__ release_mem_region(unsigned long addr, unsigned long len){return 0;} - -static int __inline__ pci_resource_flags(struct pci_dev *dev, int x) -{ - return dev->flags[x]; -} - -static int __inline__ request_region(unsigned long addr, unsigned long len, const char * d){return 0;} - -static int __inline__ pci_set_master(struct pci_dev *dev){return 0;} - -static int __inline__ iounmap(void* p){return 0;} - -static int __inline__ release_region(unsigned long addr, unsigned long len){return 0;} - -static int __inline__ pci_set_drvdata(struct pci_dev *dev, void* d) -{ - dev->data=(void*)d; - return 0; -} - -static void __inline__ *pci_get_drvdata(struct pci_dev *dev) -{ - return dev->data; -} - -/*------------------------------------------------------------------------*/ -/* IRQ handling */ -/*------------------------------------------------------------------------*/ - -#define request_irq(a,b,c,d,e) my_request_irq(a,b,c,d,e) -int my_request_irq(unsigned int irq, - int (*handler)(int, void *, struct pt_regs *), - unsigned long mode, const char *desc, void *data); - -#define free_irq(a,b) my_free_irq(a,b) -int free_irq(int irq, void* p); - - - -struct my_irqs { - int (*handler)(int, void *, struct pt_regs *); - int irq; - void* data; -}; - -#define MAX_IRQS 8 - -// Exported to top level - -void handle_irqs(int irq); -void inc_jiffies(int); -void init_wrapper(void); -void do_all_timers(void); - - - - -#endif //__LINUX_WRAPPER_H__ diff --git a/import/OpenXDK/include/xusb/list.h b/import/OpenXDK/include/xusb/list.h deleted file mode 100644 index f598135c9..000000000 --- a/import/OpenXDK/include/xusb/list.h +++ /dev/null @@ -1,224 +0,0 @@ -#ifndef _BOOT_LIST_H -#define _BOOT_LIST_H - -/* - * Simple doubly linked list implementation. - * - * Some of the internal functions ("__xxx") are useful when - * manipulating whole lists rather than single entries, as - * sometimes we already know the next/prev entries and we can - * generate better code by using them directly rather than - * using the generic single-entry routines. - */ - -struct list_head { - struct list_head *next, *prev; -}; - -#define LIST_HEAD_INIT(name) { &(name), &(name) } - -#define LIST_HEAD(name) \ - struct list_head name = LIST_HEAD_INIT(name) - -#define INIT_LIST_HEAD(ptr) do { \ - (ptr)->next = (ptr); (ptr)->prev = (ptr); \ -} while (0) - -/* - * Insert a new entry between two known consecutive entries. - * - * This is only for internal list manipulation where we know - * the prev/next entries already! - */ -static __inline void __list_add(struct list_head *new, - struct list_head *prev, - struct list_head *next) -{ - next->prev = new; - new->next = next; - new->prev = prev; - prev->next = new; -} - -/** - * list_add - add a new entry - * @new: new entry to be added - * @head: list head to add it after - * - * Insert a new entry after the specified head. - * This is good for implementing stacks. - */ -static __inline void list_add(struct list_head *new, struct list_head *head) -{ - __list_add(new, head, head->next); -} - -/** - * list_add_tail - add a new entry - * @new: new entry to be added - * @head: list head to add it before - * - * Insert a new entry before the specified head. - * This is useful for implementing queues. - */ -static __inline void list_add_tail(struct list_head *new, struct list_head *head) -{ - __list_add(new, head->prev, head); -} - -/* - * Delete a list entry by making the prev/next entries - * point to each other. - * - * This is only for internal list manipulation where we know - * the prev/next entries already! - */ -static __inline void __list_del(struct list_head *prev, struct list_head *next) -{ - next->prev = prev; - prev->next = next; -} - -/** - * list_del - deletes entry from list. - * @entry: the element to delete from the list. - * Note: list_empty on entry does not return true after this, the entry is in an undefined state. - */ -static __inline void list_del(struct list_head *entry) -{ - __list_del(entry->prev, entry->next); - entry->next = (void *) 0; - entry->prev = (void *) 0; -} - -/** - * list_del_init - deletes entry from list and reinitialize it. - * @entry: the element to delete from the list. - */ -static __inline void list_del_init(struct list_head *entry) -{ - __list_del(entry->prev, entry->next); - INIT_LIST_HEAD(entry); -} - -/** - * list_move - delete from one list and add as another's head - * @list: the entry to move - * @head: the head that will precede our entry - */ -static __inline void list_move(struct list_head *list, struct list_head *head) -{ - __list_del(list->prev, list->next); - list_add(list, head); -} - -/** - * list_move_tail - delete from one list and add as another's tail - * @list: the entry to move - * @head: the head that will follow our entry - */ -static __inline void list_move_tail(struct list_head *list, - struct list_head *head) -{ - __list_del(list->prev, list->next); - list_add_tail(list, head); -} - -/** - * list_empty - tests whether a list is empty - * @head: the list to test. - */ -static __inline int list_empty(struct list_head *head) -{ - return head->next == head; -} - -static __inline void __list_splice(struct list_head *list, - struct list_head *head) -{ - struct list_head *first = list->next; - struct list_head *last = list->prev; - struct list_head *at = head->next; - - first->prev = head; - head->next = first; - - last->next = at; - at->prev = last; -} - -/** - * list_splice - join two lists - * @list: the new list to add. - * @head: the place to add it in the first list. - */ -static __inline void list_splice(struct list_head *list, struct list_head *head) -{ - if (!list_empty(list)) - __list_splice(list, head); -} - -/** - * list_splice_init - join two lists and reinitialise the emptied list. - * @list: the new list to add. - * @head: the place to add it in the first list. - * - * The list at @list is reinitialised - */ -static __inline void list_splice_init(struct list_head *list, - struct list_head *head) -{ - if (!list_empty(list)) { - __list_splice(list, head); - INIT_LIST_HEAD(list); - } -} - -/** - * list_entry - get the struct for this entry - * @ptr: the &struct list_head pointer. - * @type: the type of the struct this is embedded in. - * @member: the name of the list_struct within the struct. - */ -#define list_entry(ptr, type, member) \ - ((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member))) - -/** - * list_for_each - iterate over a list - * @pos: the &struct list_head to use as a loop counter. - * @head: the head for your list. - */ -#define list_for_each(pos, head) \ - for (pos = (head)->next; pos != (head); \ - pos = pos->next) -/** - * list_for_each_prev - iterate over a list backwards - * @pos: the &struct list_head to use as a loop counter. - * @head: the head for your list. - */ -#define list_for_each_prev(pos, head) \ - for (pos = (head)->prev; pos != (head); \ - pos = pos->prev) - -/** - * list_for_each_safe - iterate over a list safe against removal of list entry - * @pos: the &struct list_head to use as a loop counter. - * @n: another &struct list_head to use as temporary storage - * @head: the head for your list. - */ -#define list_for_each_safe(pos, n, head) \ - for (pos = (head)->next, n = pos->next; pos != (head); \ - pos = n, n = pos->next) - -/** - * list_for_each_entry - iterate over list of given type - * @pos: the type * to use as a loop counter. - * @head: the head for your list. - * @member: the name of the list_struct within the struct. - */ -#define list_for_each_entry(pos, head, member) \ - for (pos = list_entry((head)->next, typeof(*pos), member) \ - &pos->member != (head); \ - pos = list_entry(pos->member.next, typeof(*pos), member)) - -#endif diff --git a/import/OpenXDK/include/xusb/usb_wrapper.h b/import/OpenXDK/include/xusb/usb_wrapper.h deleted file mode 100644 index c2e5d8a31..000000000 --- a/import/OpenXDK/include/xusb/usb_wrapper.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "linux_wrapper.h" -#define __KERNEL__ -#undef CONFIG_PCI -#define CONFIG_PCI - -#include "linux/usb.h" diff --git a/import/OpenXDK/include/xusb/xusb.h b/import/OpenXDK/include/xusb/xusb.h deleted file mode 100644 index 416b378cc..000000000 --- a/import/OpenXDK/include/xusb/xusb.h +++ /dev/null @@ -1,33 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : xusb.h -// * -// * note : Xbox USB Support -// * -// ****************************************************************** -#ifndef XUSB_H -#define XUSB_H - -#ifdef __cplusplus -extern "C" { -#endif - -// ****************************************************************** -// * Xbox USB Support by Georg Archer -// ****************************************************************** -#include "linux_wrapper.h" -#include "linux/usb.h" - -#ifdef __cplusplus -} -#endif - -#endif - - - - diff --git a/import/OpenXDK/include/xvga/xvga.h b/import/OpenXDK/include/xvga/xvga.h deleted file mode 100644 index 4f79d509e..000000000 --- a/import/OpenXDK/include/xvga/xvga.h +++ /dev/null @@ -1,48 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : xvga.h -// * -// * note : XBox VGA -// * -// ****************************************************************** -#ifndef XVGA_H -#define XVGA_H - -#include "openxdk.h" - -#if defined(__cplusplus) -extern "C" -{ -#endif - -// ****************************************************************** -// * xvga video modes -// ****************************************************************** -typedef enum _xvga_mode -{ - XVGA_MODE_256x240 = 0, - XVGA_MODE_320x240, - XVGA_MODE_320x200 -} -xvga_mode; - -// ****************************************************************** -// * set video mode -// ****************************************************************** -extern void xvga_setmode(xvga_mode mode); - -// ****************************************************************** -// * wait for vblank / end vblank -// ****************************************************************** -extern void xvga_wait_vblank(); -extern void xvga_wait_vblank_end(); - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/import/OpenXDK/include/xvga/xvga_def.h b/import/OpenXDK/include/xvga/xvga_def.h deleted file mode 100644 index 49649be8e..000000000 --- a/import/OpenXDK/include/xvga/xvga_def.h +++ /dev/null @@ -1,122 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : xvga_internal.h -// * -// * note : XBox VGA -// * -// ****************************************************************** -#ifndef XVGA_DEF_H -#define XVGA_DEF_H - -#include "openxdk.h" - -#if defined(__cplusplus) -extern "C" -{ -#endif - -// ****************************************************************** -// * vga register flat addresses -// ****************************************************************** -static volatile char * const P_ATTR_REG_INDEX = (char * const)0xFD6013c0; -static volatile char * const P_ATTR_REG_DATA = (char * const)0xFD6013c1; -static volatile char * const P_CRTC_REG_INDEX = (char * const)0xFD6013d4; -static volatile char * const P_CRTC_REG_DATA = (char * const)0xFD6013d5; -static volatile char * const P_VERTICAL_BLANK = (char * const)0xFD6013DA; -static volatile char * const P_GRA_REG_INDEX = (char * const)0xFD0c03ce; -static volatile char * const P_GRA_REG_DATA = (char * const)0xFD0c03cf; -static volatile char * const P_SEQ_REG_INDEX = (char * const)0xFD0c03c4; -static volatile char * const P_SEQ_REG_DATA = (char * const)0xFD0c03c5; -static volatile char * const P_MISC_REG = (char * const)0xFD0c03c2; - -// ****************************************************************** -// * vga_reg -// ****************************************************************** -typedef struct _vga_reg -{ - unsigned short port; - unsigned char index; - unsigned char value; -} -vga_reg; - -// ****************************************************************** -// * vga mode definitions -// ****************************************************************** -extern vga_reg xvga_mode_256x240[]; -extern vga_reg xvga_mode_320x240[]; -extern vga_reg xvga_mode_320x200[]; - -// ****************************************************************** -// * mode sizes -// ****************************************************************** -extern uint32 MODE256x240SIZE; -extern uint32 MODE320x240SIZE; -extern uint32 MODE320x200SIZE; - -// ****************************************************************** -// * NVidia registers base / offsets -// ****************************************************************** -#define NV_REGBASE (0xFD000000) -#define NV_PMC (0x00000000) -#define NV_PFIFO (0x00002000) -#define NV_FB (0x00100000) -#define NV_EXTDEV (0x00101000) -#define NV_CRTC (0x00600000) -#define NV_RAMDAC (0x00680000) -#define NV_FIFO (0x00800000) -#define NV_MISC (0x000C0000) - -// ****************************************************************** -// * vga registers -// ****************************************************************** -static const int ATTR_REG_INDEX = 0x13c0; -static const int ATTR_REG_DATA = 0x13c1; -static const int CRTC_REG_INDEX = 0x13d4; -static const int CRTC_REG_DATA = 0x13d5; -static const int FB_REG = 0x0800; -static const int VERTICAL_BLANK = 0x13DA; -static const int GRA_REG_INDEX = 0x03ce; -static const int GRA_REG_DATA = 0x03cf; -static const int SEQ_REG_INDEX = 0x03c4; -static const int SEQ_REG_DATA = 0x03c5; -static const int MISC_REG = 0x03c2; - -// ****************************************************************** -// * CRTC register accessors -// ****************************************************************** -#define CRTC_READ(a) (*((volatile uint08*)(NV_REGBASE + NV_CRTC + (a)))) -#define CRTC_READL(a) (*((volatile uint32*)(NV_REGBASE + NV_CRTC + (a)))) -#define CRTC_WRITE(a,b) *((volatile uint08*)(NV_REGBASE + NV_CRTC + (a))) = (b) -#define CRTC_WRITEL(a,b) *((volatile uint32*)(NV_REGBASE + NV_CRTC + (a))) = (b) - -// ****************************************************************** -// * ATTR register accessors -// ****************************************************************** -#define ATTR_READ(a) (*((volatile uint08*)(NV_REGBASE + NV_CRTC + (a)))) -#define ATTR_READL(a) (*((volatile uint32*)(NV_REGBASE + NV_CRTC + (a)))) -#define ATTR_WRITE(a,b) *((volatile uint08*)(NV_REGBASE + NV_CRTC + (a))) = (b) -#define ATTR_WRITEL(a,b) *((volatile uint32*)(NV_REGBASE + NV_CRTC + (a))) = (b) - -// ****************************************************************** -// * MISC register accessors -// ****************************************************************** -#define MISC_READ(a) (*((volatile uint08*)(NV_REGBASE + NV_MISC + (a)))) -#define MISC_READL(a) (*((volatile uint32*)(NV_REGBASE + NV_MISC + (a)))) -#define MISC_WRITE(a,b) *((volatile uint08*)(NV_REGBASE + NV_MISC + (a))) = (b) -#define MISC_WRITEL(a,b) *((volatile uint32*)(NV_REGBASE + NV_MISC + (a))) = (b) - -// ****************************************************************** -// * frame buffer -// ****************************************************************** -#define FRAMEBUFFER ((void*)(0xF0040240)) - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/import/OpenXDK/include/xvga/xvga_internal.h b/import/OpenXDK/include/xvga/xvga_internal.h deleted file mode 100644 index 238e45e6d..000000000 --- a/import/OpenXDK/include/xvga/xvga_internal.h +++ /dev/null @@ -1,52 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : xvga_internal.h -// * -// * note : XBox VGA -// * -// ****************************************************************** -#ifndef XVGA_INTERNAL_H -#define XVGA_INTERNAL_H - -#include "openxdk.h" - -#if defined(__cplusplus) -extern "C" -{ -#endif - -// ****************************************************************** -// * vga registers -// ****************************************************************** -static volatile char * const ATTR_REG_INDEX = (char * const)0xFD6013c0; -static volatile char * const ATTR_REG_DATA = (char * const)0xFD6013c1; -static volatile char * const CRTC_REG_INDEX = (char * const)0xFD6013d4; -static volatile char * const CRTC_REG_DATA = (char * const)0xFD6013d5; -static volatile char * const GRA_REG_INDEX = (char * const)0xFD0c03ce; -static volatile char * const GRA_REG_DATA = (char * const)0xFD0c03cf; -static volatile char * const SEQ_REG_INDEX = (char * const)0xFD0c03c4; -static volatile char * const SEQ_REG_DATA = (char * const)0xFD0c03c5; -static volatile char * const MISC_REG = (char * const)0xFD0c03c2; - -#define XVGA_VBL 0xfd6013da - -// ****************************************************************** -// * vga_reg -// ****************************************************************** -typedef struct _vga_reg -{ - unsigned short port; - unsigned char index; - unsigned char value; -} -vga_reg; - -#if defined(__cplusplus) -} -#endif - -#endif diff --git a/import/OpenXDK/include/xvga/xvga_tables.h b/import/OpenXDK/include/xvga/xvga_tables.h deleted file mode 100644 index 8b4a1f037..000000000 --- a/import/OpenXDK/include/xvga/xvga_tables.h +++ /dev/null @@ -1,26 +0,0 @@ -// ****************************************************************** -// * -// * proj : OpenXDK -// * -// * desc : Open Source XBox Development Kit -// * -// * file : xvga_tables.h -// * -// * note : XBox VGA -// * -// ****************************************************************** -#ifndef XVGA_TABLES_H -#define XVGA_TABLES_H - -#include "xvga_internal.h" - -#define MODE256x240SIZE 25 -extern vga_reg mode_256x240[]; - -#define MODE320x240SIZE 25 -extern vga_reg mode_320x240[]; - -#define MODE320x200SIZE 25 -extern vga_reg mode_320x200[]; - -#endif \ No newline at end of file