FreeBSD Bugzilla – Attachment 168280 Details for
Bug 208050
The boot loader forth does not understand 'outb' on the amd64 platform.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
'outb' amd64 patch
outb_amd64.patch (text/plain), 2.43 KB, created by
K Staring
on 2016-03-16 05:14:50 UTC
(
hide
)
Description:
'outb' amd64 patch
Filename:
MIME Type:
Creator:
K Staring
Created:
2016-03-16 05:14:50 UTC
Size:
2.43 KB
patch
obsolete
>diff --git a/boot/ficl/amd64/sysdep.c b/boot/ficl/amd64/sysdep.c >index 5957b71..5ffc758 100644 >--- a/boot/ficl/amd64/sysdep.c >+++ b/boot/ficl/amd64/sysdep.c >@@ -14,6 +14,9 @@ > #include <stdlib.h> > #else > #include <stand.h> >+#if defined(__i386__) || defined(__x86_64__) >+#include <machine/cpufunc.h> >+#endif > #endif > #include "ficl.h" > >@@ -77,6 +80,39 @@ void ficlFree (void *p) > free(p); > } > >+#ifndef TESTMAIN >+#if defined(__i386__) || defined(__x86_64__) >+/* >+ * outb ( port# c -- ) >+ * Store a byte to I/O port number port# >+ */ >+void >+ficlOutb(FICL_VM *pVM) >+{ >+ u_char c; >+ u_int32_t port; >+ >+ port=stackPopUNS(pVM->pStack); >+ c=(u_char)stackPopINT(pVM->pStack); >+ outb(port,c); >+} >+ >+/* >+ * inb ( port# -- c ) >+ * Fetch a byte from I/O port number port# >+ */ >+void >+ficlInb(FICL_VM *pVM) >+{ >+ u_char c; >+ u_int32_t port; >+ >+ port=stackPopUNS(pVM->pStack); >+ c=inb(port); >+ stackPushINT(pVM->pStack,c); >+} >+#endif >+#endif > > /* > ** Stub function for dictionary access control - does nothing >diff --git a/boot/ficl/ficl.h b/boot/ficl/ficl.h >index 6fe9e10..6dea13c 100644 >--- a/boot/ficl/ficl.h >+++ b/boot/ficl/ficl.h >@@ -1113,7 +1113,7 @@ extern CELL dictIncrease; > ** Various FreeBSD goodies > */ > >-#if defined(__i386__) && !defined(TESTMAIN) >+#if (defined(__i386__) || defined(__x86_64__)) && !defined(TESTMAIN) > extern void ficlOutb(FICL_VM *pVM); > extern void ficlInb(FICL_VM *pVM); > #endif >diff --git a/boot/ficl/i386/sysdep.c b/boot/ficl/i386/sysdep.c >index df0891d..5ffc758 100644 >--- a/boot/ficl/i386/sysdep.c >+++ b/boot/ficl/i386/sysdep.c >@@ -14,7 +14,7 @@ > #include <stdlib.h> > #else > #include <stand.h> >-#ifdef __i386__ >+#if defined(__i386__) || defined(__x86_64__) > #include <machine/cpufunc.h> > #endif > #endif >@@ -81,7 +81,7 @@ void ficlFree (void *p) > } > > #ifndef TESTMAIN >-#ifdef __i386__ >+#if defined(__i386__) || defined(__x86_64__) > /* > * outb ( port# c -- ) > * Store a byte to I/O port number port# >diff --git a/boot/ficl/loader.c b/boot/ficl/loader.c >index 6641438..5721997 100644 >--- a/boot/ficl/loader.c >+++ b/boot/ficl/loader.c >@@ -921,7 +921,7 @@ void ficlCompilePlatform(FICL_SYSTEM *pSys) > dictAppendWord(dp, "findfile", ficlFindfile, FW_DEFAULT); > dictAppendWord(dp, "ccall", ficlCcall, FW_DEFAULT); > #ifndef TESTMAIN >-#ifdef __i386__ >+#if defined(__i386__) || defined(__x86_64__) > dictAppendWord(dp, "outb", ficlOutb, FW_DEFAULT); > dictAppendWord(dp, "inb", ficlInb, FW_DEFAULT); > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 208050
: 168280