[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] [PATCH] Add PCI-BIOS functions to kentry structure



Alan, new version of the patch.

2014-03-26 17:10 GMT+01:00 David Gálvez <dgalvez75@gmail.com>:
> 2014-03-26 16:52 GMT+01:00 Alan Hourihane <alanh@fairlite.co.uk>:
>> On 03/26/14 15:27, David Gálvez wrote:
>>>
>>> Alan, here is the patch for adding PCI-BIOS functions to kentry.
>>>
>>> Please check and commit if it's fine for you. Thanks!
>>
>>
>> I must be missing some additional patch....
>>
>
> No, you're not missing any patch. Also fails to build here. I tested
> it building the kernel and the EHCI driver I working on, but forgot to
> test building the entire USB, sorry. I'll send you a new patch when I
> fix it.
>
>
>> m68k-atari-mint-gcc -I../../../.. -D__KERNEL_MODULE__ -DMODULE_NAME=aranym
>> -m68040 -Werror -mshort -g -O2 -fomit-frame-pointer -Wall
>> -Wmissing-prototypes -Wshadow -Wpointer-arith -Waggregate-return -c
>> aranym-hcd.c -o aranym-hcd.o
>> cc1: warnings being treated as errors
>> In file included from ../../../../libkern/libkern.h:222:0,
>>                  from aranym-hcd.c:28:
>> ../../../../libkern/kernel_module.h:1117:13: error: no previous prototype
>> for 'Find_pci_device'
>> ../../../../libkern/kernel_module.h:1120:13: error: no previous prototype
>> for 'Find_pci_classcode'
>> ../../../../libkern/kernel_module.h:1123:13: error: no previous prototype
>> for 'Read_config_byte'
>> ../../../../libkern/kernel_module.h:1126:13: error: no previous prototype
>> for 'Read_config_word'
>> ../../../../libkern/kernel_module.h:1129:13: error: no previous prototype
>> for 'Read_config_longword'
>> ../../../../libkern/kernel_module.h:1132:22: error: no previous prototype
>> for 'Fast_read_config_byte'
>> ../../../../libkern/kernel_module.h:1135:23: error: no previous prototype
>> for 'Fast_read_config_word'
>> ../../../../libkern/kernel_module.h:1138:22: error: no previous prototype
>> for 'Fast_read_config_longword'
>> ../../../../libkern/kernel_module.h:1141:13: error: no previous prototype
>> for 'Special_cycle'
>> ../../../../libkern/kernel_module.h:1144:13: error: no previous prototype
>> for 'Write_mem_byte'
>> ../../../../libkern/kernel_module.h:1147:13: error: no previous prototype
>> for 'Write_mem_word'
>> ../../../../libkern/kernel_module.h:1150:13: error: no previous prototype
>> for 'Write_io_byte'
>> ../../../../libkern/kernel_module.h:1153:13: error: no previous prototype
>> for 'Write_io_word'
>> make[5]: *** [aranym-hcd.o] Error 1
>>
>> Alan.
>>
>>
>>
Index: sys/kentry.c
===================================================================
RCS file: /mint/freemint/sys/kentry.c,v
retrieving revision 1.20
diff -u -8 -r1.20 kentry.c
--- sys/kentry.c	26 Mar 2014 10:16:36 -0000	1.20
+++ sys/kentry.c	26 Mar 2014 20:57:55 -0000
@@ -46,16 +46,17 @@
 # include "global.h"		/* global */
 # include "ipc_socketutil.h"	/* so_* */
 # include "k_exec.h"		/* create_process */
 # include "k_kthread.h"		/* kthread_create, kthread_exit */
 # include "k_prot.h"		/* proc_setuid/proc_setgid */
 # include "kmemory.h"		/* kmalloc, kfree */
 # include "memory.h"		/* addr2mem, attach_region, detach_region */
 # include "module.h"		/* load_modules */
+# include "pcibios.h"
 # include "proc.h"		/* sleep, wake, wakeselect, iwake */
 # include "proc_help.h"		/* proc_extensions */
 # include "proc_wakeup.h"	/* addprocwakeup */
 # include "semaphores.h"	/* semaphore_* */
 # include "signal.h"		/* ikill */
 # include "syscall_vectors.h"	/* bios_tab, dos_tab */
 # include "time.h"		/* xtime */
 # include "timeout.h"		/* nap, addtimeout, canceltimeout, addroottimeout, cancelroottimeout */
Index: sys/pcibios.h
===================================================================
RCS file: /mint/freemint/sys/pcibios.h,v
retrieving revision 1.2
diff -u -8 -r1.2 pcibios.h
--- sys/pcibios.h	23 Mar 2014 00:21:18 -0000	1.2
+++ sys/pcibios.h	26 Mar 2014 20:57:55 -0000
@@ -51,17 +51,17 @@
 
 long	_cdecl sys_pcibios	(ushort op,
 				     long a1, long a2, long a3, long a4,
 				     long a5, long a6, long a7);
 
 /* the struct definitions
  */
 
-typedef struct				/* structure of address conversion */
+typedef struct pci_conv_adr		/* structure of address conversion */
 {
 	unsigned long adr;			/* calculated address (CPU<->PCI) */
 	unsigned long len;			/* length of memory range */
 } PCI_CONV_ADR;
 
 /* structure of resource descriptor */
 typedef struct				/* structure of resource descriptor */
 {
Index: sys/arch/pcibios.S
===================================================================
RCS file: /mint/freemint/sys/arch/pcibios.S,v
retrieving revision 1.1
diff -u -8 -r1.1 pcibios.S
--- sys/arch/pcibios.S	22 Mar 2014 13:10:01 -0000	1.1
+++ sys/arch/pcibios.S	26 Mar 2014 20:57:56 -0000
@@ -12,27 +12,28 @@
  * 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
  */
-#ifdef PCI_BIOS
+
 	.global _tab_funcs_pci
 	.global _Find_pci_device,_Find_pci_classcode,_Read_config_byte,_Read_config_word,_Read_config_longword
 	.global _Fast_read_config_byte,_Fast_read_config_word,_Fast_read_config_longword,_Write_config_byte,_Write_config_word,_Write_config_longword
 	.global _Hook_interrupt,_Unhook_interrupt,_Special_cycle,_Get_routing,_Set_interrupt
 	.global _Get_resource,_Get_card_used,_Set_card_used,_Read_mem_byte,_Read_mem_word,_Read_mem_longword
 	.global _Fast_read_mem_byte,_Fast_read_mem_word,_Fast_read_mem_longword,_Write_mem_byte,_Write_mem_word,_Write_mem_longword
 	.global _Read_io_byte,_Read_io_word,_Read_io_longword,_Fast_read_io_byte,_Fast_read_io_word,_Fast_read_io_longword
 	.global _Write_io_byte,_Write_io_word,_Write_io_longword,_Get_machine_id
 	.global _Get_pagesize,_Virt_to_bus,_Bus_to_virt,_Virt_to_phys,_Phys_to_virt
 
+#ifdef PCI_BIOS
 _Find_pci_device:
 	move.l 4(SP),D0          // ID
 	move.l 8(SP),D1          // index
 	move.l _tab_funcs_pci,A1
 	move.l (A1),A1
 	move.l D2,-(SP)
 	jsr (A1)
 	move.l (SP)+,D2
@@ -420,9 +421,59 @@
 	move.l 4(SP),D0          // physical CPU address 
 	move.l 8(SP),A0          // ptr
 	move.l _tab_funcs_pci,A1
 	move.l 168(A1),A1
 	move.l D2,-(SP)
 	jsr (A1)
 	move.l (SP)+,D2
 	rts
+#else /* Needed by kentry when PCI_BIOS is undefined */
+.global _pcibios_installed
+
+_Find_pci_device:
+_Find_pci_classcode:
+_Read_config_byte:
+_Read_config_word:
+_Read_config_longword:
+_Fast_read_config_byte:
+_Fast_read_config_word:
+_Fast_read_config_longword:
+_Write_config_byte:
+_Write_config_word:
+_Write_config_longword:
+_Hook_interrupt:
+_Unhook_interrupt:
+_Special_cycle:
+_Get_routing:
+_Set_interrupt:
+_Get_resource:
+_Get_card_used:
+_Set_card_used:
+_Read_mem_byte:
+_Read_mem_word:
+_Read_mem_longword:
+_Fast_read_mem_byte:
+_Fast_read_mem_word:
+_Fast_read_mem_longword:
+_Write_mem_byte:
+_Write_mem_word:
+_Write_mem_longword:
+_Read_io_byte:
+_Read_io_word:
+_Read_io_longword:
+_Fast_read_io_byte:
+_Fast_read_io_word:
+_Fast_read_io_longword:
+_Write_io_byte:
+_Write_io_word:
+_Write_io_longword:
+_Get_machine_id:
+_Get_pagesize:
+_Virt_to_bus:
+_Bus_to_virt:
+_Virt_to_phys:
+_Phys_to_virt:
+	move.l #0xfffff001, d0     // PCI_BIOS_NOT_INSTALLED
+	rts
+
+.lcomm _pcibios_installed	4
 #endif /* PCI-BIOS */
Index: sys/libkern/kernel_module.h
===================================================================
RCS file: /mint/freemint/sys/libkern/kernel_module.h,v
retrieving revision 1.48
diff -u -8 -r1.48 kernel_module.h
--- sys/libkern/kernel_module.h	26 Mar 2014 10:16:39 -0000	1.48
+++ sys/libkern/kernel_module.h	26 Mar 2014 20:57:56 -0000
@@ -1055,9 +1055,102 @@
 # define xdd_open		(*KENTRY->vec_xdd.open)
 # define xdd_write		(*KENTRY->vec_xdd.write)
 # define xdd_read		(*KENTRY->vec_xdd.read)
 # define xdd_lseek		(*KENTRY->vec_xdd.lseek)
 # define xdd_ioctl		(*KENTRY->vec_xdd.ioctl)
 # define xdd_datime		(*KENTRY->vec_xdd.datime)
 # define xdd_close		(*KENTRY->vec_xdd.close)
 
+/*
+ * kentry_pcibios
+ */
+
+#define pcibios_installed		(*KENTRY->vec_pcibios.pcibios_installed)
+#define _Find_pci_device		(*KENTRY->vec_pcibios.Find_pci_device)
+#define _Find_pci_classcode		(*KENTRY->vec_pcibios.Find_pci_classcode)
+#define _Read_config_byte		(*KENTRY->vec_pcibios.Read_config_byte)
+#define _Read_config_word		(*KENTRY->vec_pcibios.Read_config_word)
+#define _Read_config_longword		(*KENTRY->vec_pcibios.Read_config_longword)
+#define _Fast_read_config_byte		(*KENTRY->vec_pcibios.Fast_read_config_byte)
+#define _Fast_read_config_word		(*KENTRY->vec_pcibios.Fast_read_config_word)
+#define _Fast_read_config_longword	(*KENTRY->vec_pcibios.Fast_read_config_longword)
+#define Write_config_byte		(*KENTRY->vec_pcibios.Write_config_byte)
+#define Write_config_word		(*KENTRY->vec_pcibios.Write_config_longword)
+#define Write_config_longword		(*KENTRY->vec_pcibios.Write_config_longword)
+#define Hook_interrupt			(*KENTRY->vec_pcibios.Hook_interrupt)
+#define Unhook_interrupt		(*KENTRY->vec_pcibios.Unhook_interrupt)
+#define _Special_cycle			(*KENTRY->vec_pcibios.Special_cycle)
+#define Get_routing			(*KENTRY->vec_pcibios.Get_routing)
+#define Set_interrupt			(*KENTRY->vec_pcibios.Set_interrupt)
+#define Get_resource			(*KENTRY->vec_pcibios.Get_resource)
+#define Get_card_used			(*KENTRY->vec_pcibios.Get_card_used)
+#define Set_card_used			(*KENTRY->vec_pcibios.Set_card_used)
+#define Read_mem_byte			(*KENTRY->vec_pcibios.Read_mem_byte)
+#define Read_mem_word			(*KENTRY->vec_pcibios.Read_mem_word)
+#define Read_mem_longword		(*KENTRY->vec_pcibios.Read_mem_longword)
+#define Fast_read_mem_byte		(*KENTRY->vec_pcibios.Fast_read_mem_byte)
+#define Fast_read_mem_word		(*KENTRY->vec_pcibios.Fast_read_mem_word)
+#define Fast_read_mem_longword		(*KENTRY->vec_pcibios.Fast_read_mem_longword)
+#define _Write_mem_byte			(*KENTRY->vec_pcibios.Write_mem_byte)
+#define _Write_mem_word			(*KENTRY->vec_pcibios.Write_mem_word)
+#define Write_mem_longword		(*KENTRY->vec_pcibios.Write_mem_longword)
+#define Read_io_byte			(*KENTRY->vec_pcibios.Read_io_byte)
+#define Read_io_word			(*KENTRY->vec_pcibios.Read_io_word)
+#define Read_io_longword		(*KENTRY->vec_pcibios.Read_io_longword)
+#define Fast_read_io_byte		(*KENTRY->vec_pcibios.Fast_read_io_byte)
+#define Fast_read_io_word		(*KENTRY->vec_pcibios.Fast_read_io_word)
+#define Fast_read_io_longword		(*KENTRY->vec_pcibios.Fast_read_io_longword)
+#define _Write_io_byte			(*KENTRY->vec_pcibios.Write_io_byte)
+#define _Write_io_word			(*KENTRY->vec_pcibios.Write_io_word)
+#define Write_io_longword		(*KENTRY->vec_pcibios.Write_io_longword)
+#define Get_machine_id			(*KENTRY->vec_pcibios.Get_machine_id)
+#define Get_pagesize			(*KENTRY->vec_pcibios.Get_pagesize)
+#define Virt_to_bus			(*KENTRY->vec_pcibios.Virt_to_bus)
+#define Bus_to_virt			(*KENTRY->vec_pcibios.Bus_to_virt)
+#define Virt_to_phys			(*KENTRY->vec_pcibios.Virt_to_phys)
+#define Phys_to_virt			(*KENTRY->vec_pcibios.Phys_to_virt)
+
+typedef long (*wrap0)();
+typedef long (*wrap1)(long);
+typedef long (*wrap2)(long, long);
+typedef long (*wrap3)(long, long, long);
+
+INLINE long Find_pci_device(unsigned long id, unsigned short index)
+{ wrap2 f = (wrap2) _Find_pci_device; return (*f)(id, index); }
+
+INLINE long Find_pci_classcode(unsigned long class, unsigned short index)
+{ wrap2 f = (wrap2) _Find_pci_classcode; return (*f)(class, index); }
+
+INLINE long Read_config_byte(long handle, unsigned short reg, unsigned char *address)
+{ wrap3 f = (wrap3)_Read_config_byte; return (*f)(handle, reg, (long)address); }
+
+INLINE long Read_config_word(long handle, unsigned short reg, unsigned short *address)
+{ wrap3 f = (wrap3)_Read_config_word; return (*f)(handle, reg, (long)address); }
+
+INLINE long Read_config_longword(long handle, unsigned short reg, unsigned long *address)
+{ wrap3 f = (wrap3)_Read_config_longword; return (*f)(handle, reg, (long)address); }
+
+INLINE unsigned char Fast_read_config_byte(long handle, unsigned short reg)
+{ wrap2 f = (wrap2) _Fast_read_config_byte; return (*f)(handle, reg); }
+
+INLINE unsigned short Fast_read_config_word(long handle, unsigned short reg)
+{ wrap2 f = (wrap2) _Fast_read_config_word; return (*f)(handle, reg); }
+
+INLINE unsigned long Fast_read_config_longword(long handle, unsigned short reg)
+{ wrap2 f = (wrap2) _Fast_read_config_longword; return (*f)(handle, reg); }
+
+INLINE long Special_cycle(unsigned short bus, unsigned long data)
+{ wrap2 f = (wrap2) _Special_cycle; return (*f)(bus, data); }
+
+INLINE long Write_mem_byte(long handle, unsigned long offset, unsigned short val)
+{ wrap3 f = (wrap3)_Write_mem_byte; return (*f)(handle, offset, val); }
+
+INLINE long Write_mem_word(long handle, unsigned long offset, unsigned short val)
+{ wrap3 f = (wrap3)_Write_mem_word; return (*f)(handle, offset, val); }
+
+INLINE long Write_io_byte(long handle, unsigned long offset, unsigned short val)
+{ wrap3 f = (wrap3)_Write_io_byte; return (*f)(handle, offset, val); }
+
+INLINE long Write_io_word(long handle, unsigned long offset, unsigned short val)
+{ wrap3 f = (wrap3)_Write_io_word; return (*f)(handle, offset, val); }
+
 # endif /* _libkern_kernel_module_h */
Index: sys/mint/kentry.h
===================================================================
RCS file: /mint/freemint/sys/mint/kentry.h,v
retrieving revision 1.46
diff -u -8 -r1.46 kentry.h
--- sys/mint/kentry.h	26 Mar 2014 10:16:40 -0000	1.46
+++ sys/mint/kentry.h	26 Mar 2014 20:57:57 -0000
@@ -56,16 +56,17 @@
 struct global;
 struct ilock;
 struct memregion;
 struct mfp;
 struct module_callback;
 struct nf_ops;
 struct parser_item;
 struct parsinf;
+struct pci_conv_adr;
 struct semaphore;
 struct timeout;
 struct timeval;
 
 
 /* kentry - kernel entry vector
  * ----------------------------
  *
@@ -103,17 +104,17 @@
  * ----------
  * Every structure size modification *must* increase the major version.
  * Every other modifcation must increase the minor version.
  *
  * major and minor are of type unsigned char. I hope 255 major and minor
  * versions are enough :-)
  */
 #define KENTRY_MAJ_VERSION	0
-#define KENTRY_MIN_VERSION	18
+#define KENTRY_MIN_VERSION	19
 
 /* hardware dependant vector
  */
 struct kentry_mch
 {
 	/* global values/flags */
 	const struct global * const global;
 
@@ -874,16 +875,110 @@
 	xdd_write, \
 	xdd_read, \
 	xdd_lseek, \
 	xdd_ioctl, \
 	xdd_datime, \
 	xdd_close, \
 }
 
+struct kentry_pcibios
+{
+	unsigned long *pcibios_installed;
+	long _cdecl (*Find_pci_device)	(unsigned long id, unsigned short index);
+	long _cdecl (*Find_pci_classcode)	(unsigned long class, unsigned short index);
+	long _cdecl (*Read_config_byte)	(long handle, unsigned short reg, unsigned char *address);
+	long _cdecl (*Read_config_word)	(long handle, unsigned short reg, unsigned short *address);
+	long _cdecl (*Read_config_longword)	(long handle, unsigned short reg, unsigned long *address);
+	unsigned char _cdecl (*Fast_read_config_byte)	(long handle, unsigned short reg);
+	unsigned short _cdecl (*Fast_read_config_word)	(long handle, unsigned short reg);
+	unsigned long _cdecl (*Fast_read_config_longword)	(long handle, unsigned short reg);
+	long _cdecl (*Write_config_byte)	(long handle, unsigned short reg, unsigned short val);
+	long _cdecl (*Write_config_word)	(long handle, unsigned short reg, unsigned short val);
+	long _cdecl (*Write_config_longword)	(long handle, unsigned short reg, unsigned long val);
+	long _cdecl (*Hook_interrupt)	(long handle, unsigned long *routine, unsigned long *parameter);
+	long _cdecl (*Unhook_interrupt)	(long handle);
+	long _cdecl (*Special_cycle)	(unsigned short bus, unsigned long data);
+	long _cdecl (*Get_routing)	(long handle);
+	long _cdecl (*Set_interrupt)	(long handle);
+	long _cdecl (*Get_resource)	(long handle);
+	long _cdecl (*Get_card_used)	(long handle, unsigned long *address);
+	long _cdecl (*Set_card_used)	(long handle, unsigned long *callback);
+	long _cdecl (*Read_mem_byte)	(long handle, unsigned long offset, unsigned char *address);
+	long _cdecl (*Read_mem_word)	(long handle, unsigned long offset, unsigned short *address);
+	long _cdecl (*Read_mem_longword)	(long handle, unsigned long offset, unsigned long *address);
+	unsigned char _cdecl (*Fast_read_mem_byte)	(long handle, unsigned long offset);
+	unsigned short _cdecl (*Fast_read_mem_word)	(long handle, unsigned long offset);
+	unsigned long _cdecl (*Fast_read_mem_longword)	(long handle, unsigned long offset);
+	long _cdecl (*Write_mem_byte)	(long handle, unsigned long offset, unsigned short val);
+	long _cdecl (*Write_mem_word)	(long handle, unsigned long offset, unsigned short val);
+	long _cdecl (*Write_mem_longword)	(long handle, unsigned long offset, unsigned long val);
+	long _cdecl (*Read_io_byte)	(long handle, unsigned long offset, unsigned char *address);
+	long _cdecl (*Read_io_word)	(long handle, unsigned long offset, unsigned short *address);
+	long _cdecl (*Read_io_longword)	(long handle, unsigned long offset, unsigned long *address);
+	unsigned char _cdecl (*Fast_read_io_byte)	(long handle, unsigned long offset);
+	unsigned short _cdecl (*Fast_read_io_word)	(long handle, unsigned long offset);
+	unsigned long _cdecl (*Fast_read_io_longword)	(long handle, unsigned long offset);
+	long _cdecl (*Write_io_byte)	(long handle, unsigned long offset, unsigned short val);
+	long _cdecl (*Write_io_word)	(long handle, unsigned long offset, unsigned short val);
+	long _cdecl (*Write_io_longword)	(long handle, unsigned long offset, unsigned long val);
+	long _cdecl (*Get_machine_id)	(void);
+	long _cdecl (*Get_pagesize)	(void);
+	long _cdecl (*Virt_to_bus)	(long handle, unsigned long address, struct pci_conv_adr *pointer);
+	long _cdecl (*Bus_to_virt)	(long handle, unsigned long address, struct pci_conv_adr *pointer);
+	long _cdecl (*Virt_to_phys)	(unsigned long address, struct pci_conv_adr *pointer);
+	long _cdecl (*Phys_to_virt)	(unsigned long address, struct pci_conv_adr *pointer);
+};
+#define DEFAULTS_kentry_pcibios \
+{ \
+	&pcibios_installed, \
+	Find_pci_device, \
+	Find_pci_classcode, \
+	Read_config_byte, \
+	Read_config_word, \
+	Read_config_longword, \
+	Fast_read_config_byte, \
+	Fast_read_config_word, \
+	Fast_read_config_longword, \
+	Write_config_byte, \
+	Write_config_word, \
+	Write_config_longword, \
+	Hook_interrupt, \
+	Unhook_interrupt, \
+	Special_cycle, \
+	Get_routing, \
+	Set_interrupt, \
+	Get_resource, \
+	Get_card_used, \
+	Set_card_used, \
+	Read_mem_byte, \
+	Read_mem_word, \
+	Read_mem_longword, \
+	Fast_read_mem_byte, \
+	Fast_read_mem_word, \
+	Fast_read_mem_longword, \
+	Write_mem_byte, \
+	Write_mem_word, \
+	Write_mem_longword, \
+	Read_io_byte, \
+	Read_io_word, \
+	Read_io_longword, \
+	Fast_read_io_byte, \
+	Fast_read_io_word, \
+	Fast_read_io_longword, \
+	Write_io_byte, \
+	Write_io_word, \
+	Write_io_longword, \
+	Get_machine_id, \
+	Get_pagesize, \
+	Virt_to_bus, \
+	Bus_to_virt, \
+	Virt_to_phys, \
+	Phys_to_virt, \
+}
 
 /* the complete kernel entry
  */
 struct kentry
 {
 	unsigned char	major;		/* FreeMiNT major version */
 	unsigned char	minor;		/* FreeMiNT minor version */
 	unsigned char	patchlevel;	/* FreeMiNT patchlevel */
@@ -909,16 +1004,18 @@
 	struct kentry_module vec_module;
 	struct kentry_cnf vec_cnf;
 	struct kentry_misc vec_misc;
 	struct kentry_debug vec_debug;
 	struct kentry_libkern vec_libkern;
 
 	struct kentry_xfs vec_xfs;
 	struct kentry_xdd vec_xdd;
+
+	struct kentry_pcibios vec_pcibios;
 };
 # define DEFAULTS_kentry \
 { \
 	MINT_MAJ_VERSION, \
 	MINT_MIN_VERSION, \
 	MINT_PATCH_LEVEL, \
 	MINT_STATUS_IDENT, \
 	\
@@ -938,12 +1035,13 @@
 	DEFAULTS_kentry_fs, \
 	DEFAULTS_kentry_sockets, \
 	DEFAULTS_kentry_module, \
 	DEFAULTS_kentry_cnf, \
 	DEFAULTS_kentry_misc, \
 	DEFAULTS_kentry_debug, \
 	DEFAULTS_kentry_libkern, \
 	DEFAULTS_kentry_xfs, \
-	DEFAULTS_kentry_xdd \
+	DEFAULTS_kentry_xdd, \
+	DEFAULTS_kentry_pcibios \
 }
 
 # endif /* _mint_kentry_h */
Index: sys/mint/pcibios.h
===================================================================
RCS file: /mint/freemint/sys/mint/pcibios.h,v
retrieving revision 1.1
diff -u -8 -r1.1 pcibios.h
--- sys/mint/pcibios.h	22 Mar 2014 13:10:03 -0000	1.1
+++ sys/mint/pcibios.h	26 Mar 2014 20:57:57 -0000
@@ -144,16 +144,19 @@
 
 
 /* Callback-Routine
  */
 
  #define GET_DRIVER_ID		0        /* CB-Routine 0: Get Driver ID         */
  #define REMOVE_DRIVER		1        /* CB-Routine 1: Remove Driver         */
 
+#if __KERNEL == 1
+/* Functions prototypes. Only for drivers built in the kernel.
+ */
 long Find_pci_device(unsigned long id, unsigned short index);
 long Find_pci_classcode(unsigned long class, unsigned short index);
 long Read_config_byte(long handle, unsigned short reg, unsigned char *address);
 long Read_config_word(long handle, unsigned short reg, unsigned short *address);
 long Read_config_longword(long handle, unsigned short reg, unsigned long *address);
 unsigned char Fast_read_config_byte(long handle, unsigned short reg);
 unsigned short Fast_read_config_word(long handle, unsigned short reg);
 unsigned long Fast_read_config_longword(long handle, unsigned short reg);
@@ -187,10 +190,10 @@
 long Write_io_word(long handle, unsigned long offset, unsigned short val);
 long Write_io_longword(long handle, unsigned long offset, unsigned long val);
 long Get_machine_id(void);
 long Get_pagesize(void);
 long Virt_to_bus(long handle, unsigned long address, PCI_CONV_ADR *pointer);
 long Bus_to_virt(long handle, unsigned long address, PCI_CONV_ADR *pointer);
 long Virt_to_phys(unsigned long address, PCI_CONV_ADR *pointer);
 long Phys_to_virt(unsigned long address, PCI_CONV_ADR *pointer);
-
+#endif
 # endif /* _mint_pcibios_h */