I have an 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.
Now, I need to port this application for x64 Linux. But, LRMI is limited only to x86_32 enviornment. Is there any other equivalent libarary for x64 porting ?
smsabu2...@yahoo.com writes: > I have an 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.
> Now, I need to port this application for x64 Linux. But, LRMI is > limited only to x86_32 enviornment. Is there any other equivalent > libarary for x64 porting ?
The x86_64 'long mode' ('64bit') does not support 8086-emulation (vm86).
> I have an 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.
> Now, I need to port this application for x64 Linux. But, LRMI is > limited only to x86_32 enviornment. Is there any other equivalent > libarary for x64 porting ?
Could you be a bit more specific about what information you need and what you need it for? It seems odd that a Linux application would want this kind of information. Is this hardware auditing? Or are you trying to control the video hardware directly?
> > I have an 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.
> > Now, I need to port this application for x64 Linux. But, LRMI is > > limited only to x86_32 enviornment. Is there any other equivalent > > libarary for x64 porting ?
> Could you be a bit more specific about what information you need and > what you need it for? It seems odd that a Linux application would want > this kind of information. Is this hardware auditing? Or are you trying > to control the video hardware directly?
> DS
The requirement is to collect video controller information using Video BIOS VBE3 in x86_64 Linux OS. 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.
Hence, I have started porting the application to x86_64 machine. But, I am struck up with finding LRMI equivalent in x86_64 platform. Could you please help me.
> The requirement is to collect video controller information using Video > BIOS VBE3 in x86_64 Linux OS.
I think this is quite close to impossible. Whatever your outer problem is, there's almost certainly a better way to solve it. You should do whatever you can to get the requirement fixed.
David Schwartz <dav...@webmaster.com> writes: > On May 6, 8:23 pm, smsabu2...@yahoo.com wrote: >> The requirement is to collect video controller information using Video >> BIOS VBE3 in x86_64 Linux OS.
> I think this is quite close to impossible.
It is certainly 'possible', eg by disassembling the BIOS, determining where it gets the information from and reimplementing the same functionality without resorting to 'real-mode' softints.
smsabu2...@yahoo.com wrote: > The requirement is to collect video controller information using Video > BIOS VBE3 in x86_64 Linux OS. The Bios Interrupt routine 0x10 is meant > for Video system. Right now, my application uses LRMI library to make > BIOS routine call 0x10.
In the Phoenix bios "Video Service" are stored in system ram in segment 0x40. From 0x49 to 0x100 is the information I think you are wanting.
If so then google "Phoenix bios Technical Reference"
> But this 32 bit application is failing in x86_64 while making call to > BIOS routine.
> Hence, I have started porting the application to x86_64 machine. But, > I am struck up with finding LRMI equivalent in x86_64 platform. > Could you please help me.
>I have an 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.
>Now, I need to port this application for x64 Linux. But, LRMI is >limited only to x86_32 enviornment. Is there any other equivalent >libarary for x64 porting ?
XFree86 and X.Org solve this problem by including an x86 emulator, based on dosemu. And yes, they actually execute VESA BIOS entry points on non-x86 processors using exactly this method. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc.
>> The requirement is to collect video controller information using Video >> BIOS VBE3 in x86_64 Linux OS.
> I think this is quite close to impossible. Whatever your outer problem > is, there's almost certainly a better way to solve it. You should do > whatever you can to get the requirement fixed.
>>> The requirement is to collect video controller information using Video >>> BIOS VBE3 in x86_64 Linux OS.
>> I think this is quite close to impossible. Whatever your outer problem >> is, there's almost certainly a better way to solve it. You should do >> whatever you can to get the requirement fixed.
> Sounds like a homework problem to me.
Considering that it was crossposted to three groups using Google Groups as a newsreader, that the OP's intent is to simply read out low level video hardware data, and that the OP uses a Yahoo throwaway e-mail address as the poster's identity, the odds to that are indeed very big. ;-)
smsabu2...@yahoo.com wrote: > I have an 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.
> Now, I need to port this application for x64 Linux. But, LRMI is > limited only to x86_32 enviornment. Is there any other equivalent > libarary for x64 porting ?
> Thanks in advance,
> Arun
Its going to be a real trick calling a real mode bios routine from x86_64 protected mode given that the register sizes, meanings, stack word widths are all different. I would guess that switching to real mode from within linux would make for a mess unless done by the kernel, and even then, it wouldnt be a good thing. I'm really sure, that whatever data/information you are trying to gather can be gotten from /proc, /sys or somewhere like that, or possibly even from carious files /etc. Dont re-invent the wheel if you dont have to. Also look up SMBios aka DMI bios Eric
>> I have an 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.
>> Now, I need to port this application for x64 Linux. But, LRMI is >> limited only to x86_32 enviornment. Is there any other equivalent >> libarary for x64 porting ?
> Its going to be a real trick calling a real mode bios routine from x86_64 > protected mode given that the register sizes, meanings, stack word widths > are all different. I would guess that switching to real mode from within > linux would make for a mess unless done by the kernel, and even then, it > wouldnt be a good thing.
On x86-32, Linux actually doesn't use real mode during normal operation but uses V86 mode instead, which is a multitaskable 8086 emulation mode.
Real mode in Linux is only used in some instances at shutdown where a protected mode poweroff would not work - e.g. because the machine doesn't support ACPI or even modern APM calls - and during the first phase of the boot, before the kernel is decompressed into memory, because unless you have an EFI BIOS, x86 machines always coldboot into real mode by legacy convention.
The only other real mode implementations of Linux are in embedded systems which make use of 8086 processors, and then those implementations would not be real GNU/Linux systems but only ad hoc portions of Linux as a kernel ported to 16-bit real mode.
Like you say, switching to real mode from within Linux would make for a very, very ugly mess. It would become about as (un)stable as Windows 3.x running atop of DOS - or a DOS session in OS/2 1.x if you will - on an Intel 80286 CPU.
On x86-64, the x86-32 mechanisms of using virtual 86 mode (V86) would work, provided that you're running in "legacy mode", and thus with a 32-bit kernel. The native "long" mode - i.e. 64-bit mode - does not support V86 technology, although it does support natively 32-bit protected mode instructions - not 16-bit protected mode code, though.
> I'm really sure, that whatever data/information you are trying to gather > can be gotten from /proc, /sys or somewhere like that, or possibly even > from carious files /etc. Dont re-invent the wheel if you dont have to. > Also look up SMBios aka DMI bios
Sadly enough, not all SMBios chipsets are fully supported by the kernel yet. :-/