Results 1 to 7 of 7
I have an 32 bit application which gets Video controller information using
VESA BIOS routines. It makes use of LRMI library for making real mode
BIOS call in x86_32 bit ...
- 05-07-2008 #1Just Joined!
- Join Date
- May 2008
- Posts
- 8
How to call BIOS routines on x64 bit Linux.
I have an 32 bit application which gets Video controller information using
VESA BIOS routines. It makes use of LRMI library for making real mode
BIOS call in x86_32 bit Linux machine. The BIOS Interrupt routine 0x10 is meant for Video system. Right now, my application uses LRMI library to make
BIOS routine call 0x10.
But this 32 bit application is failing in x86_64 while making call to
BIOS routine.
Now, I need to port this application for x64 Linux. But, LRMI is
limited only to x86_32 enviornment. Is there any other equivalent
library for x64 porting ?
Could you please help me.
- 05-07-2008 #2Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
Not that I know of, but 32 bits apps can be compiled and run on x86_64, provided that you provide the correct parameters during compilation and that your system is built as multilib (64 and 32 bits compiler and glibc). Gentoo does this by default for x86_64 installs, so you can compile wine or grub on a 64 bits install and run them without a problem even though they can't be compiled as 64 bits native programs.
You can just provide precompiled binaries for those cases where the arch is 64 bits and the user doesn't have a multilib installation. You will need to provide 32 bits precompiled packages for lrmi and any other needed lib (ldd can be useful for this). You will also need to ensure that these 32 bits versions of the libs are not going to conflict with the 64 bits ones. Gentoo uses /lib32/ and /lib64/ to do that.
- 05-08-2008 #3Just Joined!
- Join Date
- May 2008
- Posts
- 8
Actaully, this LRMI calls vm86() system call to get BIOS information & this system call is not supported by 64 bit Linux. On 64 bit machine, this system call has been removed. The x86_64 'long mode' ('64bit') does not support 8086-emulation (vm86).
So, is there alternative solution to get VESA BIOS information on 64 bit??
- 05-08-2008 #4Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
Then maybe you want to check v86d:
spock's devsite > uvesafb
uvesafb has been the first sucessor to vesa-tng what has worked for non x86 arches. And that's what it uses.
- 05-09-2008 #5Just Joined!
- Join Date
- May 2008
- Posts
- 8
I am using AMD x86_64 with SuSe -9 Linux. when i am building this tool on this machine, this warning messages come:-
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: warning: i386 architecture of input file `v86.o' is incompatible with i386
86-64 output.
Ignoring these message, i ran "testvbe", segmentation fault occured.
So i built this tool on 32 bit machine & ran "testvbe" executable on x86-64(AMD 64) , but it is failing with this message.
linux:/home/tarun/v86d-0.1.5 # ./testvbe
Getting VBE Info Block failed with eax = 4f00
could you help me out? how it would run on 64 bit?
- 05-09-2008 #6Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
To tell the truth, I never used it on any non-gentoo system, but it should compile just fine as long as you have klibc installed and compiled against a kernel with uvesafb enabled.
So,
1.- make sure you have the source tree for your kernel
2.- run make menuconfig for it and enable uvesafb
3.- "make" the whole kernel, since .o files from there might be needed during the compilation of klibc
4.- compile and install klibc by hand against your own kernel
5.- compile v86d
That's how I would try it. Sine this stuff relies too closely in the kernel, you need to make sure that all the pieces fit together. This package is compilable in gentoo amd64, so, the arch should not be a problem.
- 05-28-2008 #7Just Joined!
- Join Date
- May 2008
- Posts
- 8
This v86d utility works fine for my application. Its working on x86 as well as x86_64 bit machines. I am using it for user level only not kernal level.
Thanks a lot for providing me such a wonderful utility.


Reply With Quote
