Skip to contentSkip to conversation

Calling PnP bios routines like get device node from x86_84 arch

DISCUSSION PnP driver 2 participants 9 messages Sep 10, 2007 – Sep 12, 2007

lore
Share & tools
lore

PnP driver

author
#0 lore raw

Hi,
I am very new to linux kernel driver development. I need to develop a
driver for calling BIOS routines like get device node. I could call it in i386 architecture using the PnP driver.
But in x86_64 arch I couldn't see any support. Even I tried to
implement it similar to the i386. But there is no API get_cpu_gdt_table(). Is there any other way to get the cpu_gdt_table? or any other way to call the BIOS routines.

Please help me on this.

-mkr

Signature · 2 lines
View this message in context: http://www.nabble.com/Calling-PnP-bios-routines-like-get-device-node-from-x86_84-arch-tf4415380.html#a12594726
Sent from the linux-kernel mailing list archive at Nabble.com.
#1 lore raw
Quoted 5 lines · On Mon, 10 Sep 2007 08:06:20 -0700 (PDT) PnP driver <[email protected]>…

Hi,
I am very new to linux kernel driver development. I need to develop a
driver for calling BIOS routines like get device node. I could call it in i386 architecture using the PnP driver.

We use ACPI on AMD64 so you should be parsing the ACPI tables not trying to rely on legacy interfaces which if I rememeber the spec rightly aren't even guaranteed safe to call when ACPI is active.

What are you actually trying to achieve.

Quoted 4 lines

But in x86_64 arch I couldn't see any support. Even I tried to
implement it similar to the i386. But there is no API get_cpu_gdt_table(). Is there any other way to get the cpu_gdt_table? or any other way to call the BIOS routines.

Assuming you even have a BIOS - you may have EFI underlying or Linuxbios or be a virtual machine.

author
#2 lore raw

Hi Alan,
Thanks for your quick reply.

Actually I want to call the BIOS run time functions as per the PNPBIOSSpecification-v1.0a (attached).
Specifically I want to call the function no 0x0 to 0x03. I have Dual-Core AMD Opteron(tm) Processor 2216 and AMI BIOS with the pnp bios support.
So I could call this functions using the default PnP driver which comes along with the (API: call_pnp_bios()) i386 architecture. This driver is only available for i386. But not for x86_64.

So I am trying to implement a driver similar to this for x86_64 arch. But I couldn't . Because there is need for get_cpu_gdt_table() which is not available in x86_64. And also some inline asm needs to be totally modify for x86_64. For this

How can I achive this ? Is there any other alternate idea there instead of pnp driver?

Please help on this.

-mkr

Quoted 26 lines · Alan Cox
Quoted 5 lines · On Mon, 10 Sep 2007 08:06:20 -0700 (PDT) PnP driver <[email protected]>…

Hi,
I am very new to linux kernel driver development. I need to develop a
driver for calling BIOS routines like get device node. I could call it in i386 architecture using the PnP driver.

We use ACPI on AMD64 so you should be parsing the ACPI tables not trying to rely on legacy interfaces which if I rememeber the spec rightly aren't even guaranteed safe to call when ACPI is active.

What are you actually trying to achieve.

Quoted 4 lines

But in x86_64 arch I couldn't see any support. Even I tried to
implement it similar to the i386. But there is no API get_cpu_gdt_table().
Is there any other way to get the cpu_gdt_table? or any other way to call the BIOS routines.

Assuming you even have a BIOS - you may have EFI underlying or Linuxbios or be a virtual machine.

#3 lore raw
Quoted 2 lines

Actually I want to call the BIOS run time functions as per the PNPBIOSSpecification-v1.0a (attached).

We use ACPI for x86_64, which means you need to use the ACPI methods not the PnPBIOS ones. PnPBIOS isn't valid when ACPI is in use.

Alan

author
#4 lore raw

Thanks for the reply. I will try ACPI and let you know the result.

-mkr

Quoted 9 lines · Alan Cox
Quoted 2 lines

Actually I want to call the BIOS run time functions as per the PNPBIOSSpecification-v1.0a (attached).

We use ACPI for x86_64, which means you need to use the ACPI methods not the PnPBIOS ones. PnPBIOS isn't valid when ACPI is in use.

Alan

author
#5 lore raw
In reply to Alan Cox

Can I call the BIOS function using ACPI . I didn't work on it. If I asked a silly question please for give me. I am very new to this.

-MKR

Quoted 9 lines · Alan Cox
Quoted 2 lines

Actually I want to call the BIOS run time functions as per the PNPBIOSSpecification-v1.0a (attached).

We use ACPI for x86_64, which means you need to use the ACPI methods not the PnPBIOS ones. PnPBIOS isn't valid when ACPI is in use.

Alan

#6 lore raw
Quoted 2 lines · On Tue, 11 Sep 2007 21:18:53 +0530 mkrameshid <[email protected]> wrote:

Can I call the BIOS function using ACPI . I didn't work on it. If I asked a silly question please for give me. I am very new to this.

ACPI replaces the BIOS functions you are trying to use. You *can't* use those BIOS functions. Not only is there no code for it but it isn't valid to do so if the operating system is using ACPI.

Instead ACPI provides all the needed device enumerations by its own method.

author
#7 lore raw

Re: Calling PnP bios routines like get device node from x86_64 arch

In reply to Alan Cox

Hi Alan,

To be specific I want to call the function 0x60 ,0x61 and few more specified in the BBS specification (attached). These functions or alive in 16 bit mode (0xf000 segment) We can call this functions in i386 using the pnpbios driver (bioscalls.c). I must call this functions to change the boot order and reboot from linux x86_64 using my driver. I have seen in some forum that we can off the ACPI during the linux boot.

Can you help on this?

-mkr

Quoted 9 lines · Alan Cox
Quoted 2 lines

Actually I want to call the BIOS run time functions as per the PNPBIOSSpecification-v1.0a (attached).

We use ACPI for x86_64, which means you need to use the ACPI methods not the PnPBIOS ones. PnPBIOS isn't valid when ACPI is in use.

Alan

author
#8 lore raw
In reply to Alan Cox

Hi Alan,

To be specific I want to call the function 0x60 ,0x61 and few more specified in the BBS specification (attached). These functions or alive in 16 bit mode (0xf000 segment) We can call this functions in i386 using the pnpbios driver (bioscalls.c). I must call this functions to change the boot order and reboot from linux x86_64 using my driver. I have seen in some forum that we can off the ACPI during the linux boot.

Can you help on this?

-mkr

Quoted 9 lines · Alan Cox
Quoted 2 lines

Actually I want to call the BIOS run time functions as per the PNPBIOSSpecification-v1.0a (attached).

We use ACPI for x86_64, which means you need to use the ACPI methods not the PnPBIOS ones. PnPBIOS isn't valid when ACPI is in use.

Alan