Google Groups Home
Help | Sign in
Real mode BIOS call in x86_64 Linux environment
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  12 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
smsabu2...@yahoo.com  
View profile
 More options May 6, 12:25 pm
Newsgroups: comp.os.linux.hardware, comp.os.linux.development.system, comp.os.linux.misc
From: smsabu2...@yahoo.com
Date: Tue, 6 May 2008 09:25:26 -0700 (PDT)
Local: Tues, May 6 2008 12:25 pm
Subject: Real mode BIOS call in x86_64 Linux environment
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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rainer Weikusat  
View profile
 More options May 6, 12:27 pm
Newsgroups: comp.os.linux.hardware, comp.os.linux.development.system, comp.os.linux.misc
From: Rainer Weikusat <rweiku...@mssgmbh.com>
Date: Tue, 06 May 2008 18:27:19 +0200
Local: Tues, May 6 2008 12:27 pm
Subject: Re: Real mode BIOS call in x86_64 Linux environment

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).

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Schwartz  
View profile
 More options May 6, 6:51 pm
Newsgroups: comp.os.linux.hardware, comp.os.linux.development.system, comp.os.linux.misc
From: David Schwartz <dav...@webmaster.com>
Date: Tue, 6 May 2008 15:51:15 -0700 (PDT)
Local: Tues, May 6 2008 6:51 pm
Subject: Re: Real mode BIOS call in x86_64 Linux environment
On May 6, 9:25 am, 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 ?

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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
smsabu2...@yahoo.com  
View profile
 More options May 6, 11:23 pm
Newsgroups: comp.os.linux.hardware, comp.os.linux.development.system, comp.os.linux.misc
From: smsabu2...@yahoo.com
Date: Tue, 6 May 2008 20:23:47 -0700 (PDT)
Local: Tues, May 6 2008 11:23 pm
Subject: Re: Real mode BIOS call in x86_64 Linux environment
On May 6, 5:51 pm, David Schwartz <dav...@webmaster.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.
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.

Thanks a lot.

Arun


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Schwartz  
View profile
 More options May 7, 12:02 am
Newsgroups: comp.os.linux.hardware, comp.os.linux.development.system, comp.os.linux.misc
From: David Schwartz <dav...@webmaster.com>
Date: Tue, 6 May 2008 21:02:18 -0700 (PDT)
Local: Wed, May 7 2008 12:02 am
Subject: Re: Real mode BIOS call in x86_64 Linux environment
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. 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.

DS


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rainer Weikusat  
View profile
 More options May 7, 6:03 am
Newsgroups: comp.os.linux.hardware, comp.os.linux.development.system, comp.os.linux.misc
From: Rainer Weikusat <rweiku...@mssgmbh.com>
Date: Wed, 07 May 2008 12:03:19 +0200
Local: Wed, May 7 2008 6:03 am
Subject: Re: Real mode BIOS call in x86_64 Linux environment

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.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Baron  
View profile
 More options May 7, 4:32 pm
Newsgroups: comp.os.linux.hardware, comp.os.linux.development.system, comp.os.linux.misc
Followup-To: comp.os.linux.hardware
From: Baron <baron.nos...@linuxmaniac.nospam.net>
Date: Wed, 07 May 2008 21:32:44 +0100
Local: Wed, May 7 2008 4:32 pm
Subject: Re: Real mode BIOS call in x86_64 Linux environment

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.

> Thanks a lot.

> Arun

HTH.
--
Best Regards:
                     Baron.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tim Roberts  
View profile
 More options May 8, 3:16 am
Newsgroups: comp.os.linux.hardware, comp.os.linux.development.system, comp.os.linux.misc
From: Tim Roberts <t...@probo.com>
Date: Thu, 08 May 2008 07:16:18 GMT
Local: Thurs, May 8 2008 3:16 am
Subject: Re: Real mode BIOS call in x86_64 Linux environment

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 ?

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.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
david  
View profile
 More options May 9, 8:20 am
Newsgroups: comp.os.linux.hardware, comp.os.linux.development.system, comp.os.linux.misc
From: david <n...@nospam.com>
Date: 09 May 2008 12:20:27 GMT
Local: Fri, May 9 2008 8:20 am
Subject: Re: Real mode BIOS call in x86_64 Linux environment
On Tue, 06 May 2008 21:02:18 -0700, David Schwartz rearranged some
electrons to say:

> 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. 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.

> DS

Sounds like a homework problem to me.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aragorn  
View profile
 More options May 9, 8:36 am
Newsgroups: comp.os.linux.hardware, comp.os.linux.development.system, comp.os.linux.misc
Followup-To: comp.os.linux.hardware
From: Aragorn <arag...@chatfactory.invalid>
Date: Fri, 09 May 2008 14:36:54 +0200
Local: Fri, May 9 2008 8:36 am
Subject: Re: Real mode BIOS call in x86_64 Linux environment

david wrote:
> On Tue, 06 May 2008 21:02:18 -0700, David Schwartz rearranged some
> electrons to say:

>> 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. 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. ;-)

--
*Aragorn*
(registered GNU/Linux user #223157)


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eric  
View profile
 More options May 10, 4:36 am
Newsgroups: comp.os.linux.hardware, comp.os.linux.development.system, comp.os.linux.misc
Followup-To: comp.os.linux.hardware
From: Eric <Scor...@gordinator.org>
Date: Sat, 10 May 2008 01:36:35 -0700
Local: Sat, May 10 2008 4:36 am
Subject: Re: Real mode BIOS call in x86_64 Linux environment

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

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aragorn  
View profile
 More options May 10, 8:11 am
Newsgroups: comp.os.linux.hardware
From: Aragorn <arag...@chatfactory.invalid>
Date: Sat, 10 May 2008 14:11:41 +0200
Local: Sat, May 10 2008 8:11 am
Subject: Re: Real mode BIOS call in x86_64 Linux environment

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. :-/

--
*Aragorn*
(registered GNU/Linux user #223157)


    Reply to author    Forward