Hello All! Does anybody tried to use linuxbios and LB-tools on non-x86 platforms? There are some issues we need to fir even for compilation (not for successful usage).
One thing I found so far is excessive usage of non-portable inb/outb macros. For instance - inb may be emulated as folliwing:
+unsigned char inb (unsigned short int port) +{ + static unsigned char in = 0; + FILE* f = fopen ("/dev/port", "a"); + if (f !=NULL){ + if (fseek (f, port, SEEK_SET) == port){ + fread (&in, sizeof (unsigned char), 1, f); + fclose (f); + return in; + } + } + return ERROR;
But I need an advice - I found ppc970 branch of LinuxBIOS - who maintains it and what's the current status of that port? Does anyone successfully boots any non-x86 machine using LinuxBIOS?
On 10/21/07, Peter Lemenkov lemenkov@gmail.com wrote:
Hello All! Does anybody tried to use linuxbios and LB-tools on non-x86 platforms? There are some issues we need to fir even for compilation (not for successful usage).
One thing I found so far is excessive usage of non-portable inb/outb macros. For instance - inb may be emulated as folliwing:
+unsigned char inb (unsigned short int port) +{
static unsigned char in = 0;
FILE* f = fopen ("/dev/port", "a");
if (f !=NULL){
if (fseek (f, port, SEEK_SET) == port){
fread (&in, sizeof (unsigned char), 1, f);
fclose (f);
return in;
}
}
return ERROR;
because superio is not performance-critical, I would recommend we move to that usage for all cases. It would make the tool completely portable.
But I need an advice - I found ppc970 branch of LinuxBIOS - who maintains it and what's the current status of that port? Does anyone successfully boots any non-x86 machine using LinuxBIOS?
interest in ppc970 ended with the Apple changeover.
ron
* ron minnich rminnich@gmail.com [071022 17:37]:
On 10/21/07, Peter Lemenkov lemenkov@gmail.com wrote:
Hello All! Does anybody tried to use linuxbios and LB-tools on non-x86 platforms? There are some issues we need to fir even for compilation (not for successful usage).
One thing I found so far is excessive usage of non-portable inb/outb macros. For instance - inb may be emulated as folliwing:
+unsigned char inb (unsigned short int port) +{
static unsigned char in = 0;
FILE* f = fopen ("/dev/port", "a");
if (f !=NULL){
if (fseek (f, port, SEEK_SET) == port){
fread (&in, sizeof (unsigned char), 1, f);
fclose (f);
return in;
}
}
return ERROR;
Ok, which platforms does this actually fix? Has this been tested?
I know it _breaks_ just about every x86 platform except Linux.
So, we should deliberate before going this route.
Stefan
On 22.10.2007 17:44, Stefan Reinauer wrote:
- ron minnich rminnich@gmail.com [071022 17:37]:
On 10/21/07, Peter Lemenkov lemenkov@gmail.com wrote:
Hello All! Does anybody tried to use linuxbios and LB-tools on non-x86 platforms? There are some issues we need to fir even for compilation (not for successful usage).
One thing I found so far is excessive usage of non-portable inb/outb macros. For instance - inb may be emulated as folliwing:
+unsigned char inb (unsigned short int port) +{
static unsigned char in = 0;
FILE* f = fopen ("/dev/port", "a");
if (f !=NULL){
if (fseek (f, port, SEEK_SET) == port){
fread (&in, sizeof (unsigned char), 1, f);
fclose (f);
return in;
}
}
return ERROR;
Ok, which platforms does this actually fix? Has this been tested?
I know it _breaks_ just about every x86 platform except Linux.
So, we should deliberate before going this route.
Sorry, I don't see any reason to do this now. Maybe later when there is any platform besides x86 which we intend to support.
Regards, Carl-Daniel
On Mon, Oct 22, 2007 at 05:59:29PM +0200, Carl-Daniel Hailfinger wrote:
On 22.10.2007 17:44, Stefan Reinauer wrote:
- ron minnich rminnich@gmail.com [071022 17:37]:
On 10/21/07, Peter Lemenkov lemenkov@gmail.com wrote:
Hello All! Does anybody tried to use linuxbios and LB-tools on non-x86 platforms? There are some issues we need to fir even for compilation (not for successful usage).
One thing I found so far is excessive usage of non-portable inb/outb macros. For instance - inb may be emulated as folliwing:
+unsigned char inb (unsigned short int port) +{
static unsigned char in = 0;
FILE* f = fopen ("/dev/port", "a");
if (f !=NULL){
if (fseek (f, port, SEEK_SET) == port){
fread (&in, sizeof (unsigned char), 1, f);
fclose (f);
return in;
}
}
return ERROR;
Ok, which platforms does this actually fix? Has this been tested?
I know it _breaks_ just about every x86 platform except Linux.
So, we should deliberate before going this route.
Sorry, I don't see any reason to do this now. Maybe later when there is any platform besides x86 which we intend to support.
It would be nice to do for those platforms which don't have inb/oub but _do_ provide a /dev/port. I have no idea if such platforms exist though, or which those are.
I'm pretty sure we can make superiotool compile everywhere where flashrom compiles (this includes some non-Linux and non-x86 boxes).
Whether it'll also _work_ on such boxes depends and should be tested.
Uwe.
2007/10/22, Stefan Reinauer stepan@coresystems.de:
Ok, which platforms does this actually fix? Has this been tested?
It allows us to compile flashrom and superiotool at least. For successful testing we need datasheets...
I know it _breaks_ just about every x86 platform except Linux.
BTW on which platforms flashrom actually used? Are any reports about flashrom or superiotool on xBSD/Solaris/Alternative OS from Redmond?
In any case I'll promise to create more suitable patch which doesn't breaks anything..
2007/10/22, ron minnich rminnich@gmail.com:
On 10/21/07, Peter Lemenkov lemenkov@gmail.com wrote:
Hello All! Does anybody tried to use linuxbios and LB-tools on non-x86 platforms? There are some issues we need to fir even for compilation (not for successful usage).
One thing I found so far is excessive usage of non-portable inb/outb macros. For instance - inb may be emulated as folliwing:
+unsigned char inb (unsigned short int port) +{
static unsigned char in = 0;
FILE* f = fopen ("/dev/port", "a");
if (f !=NULL){
if (fseek (f, port, SEEK_SET) == port){
fread (&in, sizeof (unsigned char), 1, f);
fclose (f);
return in;
}
}
return ERROR;
because superio is not performance-critical, I would recommend we move to that usage for all cases. It would make the tool completely portable.
I'll try to create more suitable solutuion (with #ifdef/#else/#endifs).
But I need an advice - I found ppc970 branch of LinuxBIOS - who maintains it and what's the current status of that port? Does anyone successfully boots any non-x86 machine using LinuxBIOS?
interest in ppc970 ended with the Apple changeover.
But users still got huge amount of old-skool powerpc hardware :) I think it would be more funny to make something valuable with powerpc-machines instead if simply getting rid of them.
On 22.10.2007 21:36, Peter Lemenkov wrote:
2007/10/22, ron minnich rminnich@gmail.com:
On 10/21/07, Peter Lemenkov lemenkov@gmail.com wrote:
Hello All! Does anybody tried to use linuxbios and LB-tools on non-x86 platforms? There are some issues we need to fir even for compilation (not for successful usage).
One thing I found so far is excessive usage of non-portable inb/outb macros. For instance - inb may be emulated as folliwing:
because superio is not performance-critical, I would recommend we move to that usage for all cases. It would make the tool completely portable.
I'll try to create more suitable solutuion (with #ifdef/#else/#endifs).
OK, but be prepared that the solution has to be somewhat clean.
But I need an advice - I found ppc970 branch of LinuxBIOS - who maintains it and what's the current status of that port? Does anyone successfully boots any non-x86 machine using LinuxBIOS?
interest in ppc970 ended with the Apple changeover.
But users still got huge amount of old-skool powerpc hardware :) I think it would be more funny to make something valuable with powerpc-machines instead if simply getting rid of them.
A patch will not be merged if it does not work better than the current situation. If flashrom really works in practice on a non-x86 platform, we might merge the patch.
Regards, Carl-Daniel