*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->NetBSD man pages -> i386/bioscall (9)              



NAME    [Toc]    [Back]

     bioscall - call system BIOS function from real mode

SYNOPSIS    [Toc]    [Back]

     #include <i386/bioscall.h>

     bioscall(int function, struct bioscallregs *regs);

DESCRIPTION    [Toc]    [Back]

     The bioscall function switches the processor into real mode, calls the
     BIOS interrupt numbered function, and returns to protected mode.

     This function is intended to be called during the initial system bootstrap
 when necessary to probe devices or pseudo-devices.

     The register values specified by *regs (with one exception) are installed
     before the BIOS interrupt is called.  The processor flags are handled
     specially.  Only the following flags are passed to the BIOS from the registers
 in regs (the remainder come from the processor's flags register at
     the time of the call): PSL_C, PSL_PF, PSL_AF, PSL_Z, PSL_N, PSL_D, PSL_V.

     The bioscallregs structure is defined to contain structures for each register,
 to allow access to 32-, 16- or 8-bit wide sections of the registers.
  Definitions are provided which simplify access to the union members.

RETURN VALUES    [Toc]    [Back]

     bioscall fills in *regs with the processor registers as returned from the
     BIOS call.

EXAMPLES    [Toc]    [Back]

     The Advanced Power Management driver calls bioscall by setting up a register
 structure with the APM installation check and device types in registers
 ax and bx, then calls the BIOS to fetch the details for calling
     the APM support through a protected-mode interface.  The BIOS returns
     these details in the registers:

     #include <i386/bioscall.h>
     #include <i386/apmvar.h>
     struct bioscallregs regs;

     regs.BX = APM_DEV_APM_BIOS;
     regs.CX = regs.DX = 0;
     regs.ESI = regs.EDI = regs.EFLAGS = 0;
     bioscall(APM_SYSTEM_BIOS, regs);

CODE REFERENCES    [Toc]    [Back]

     sys/arch/i386/i386/bioscall.s, sys/arch/i386/bioscall/biostramp.S

REFERENCES    [Toc]    [Back]


HISTORY    [Toc]    [Back]

     bioscall first appeared in NetBSD 1.3.

BUGS    [Toc]    [Back]

     Not all BIOS functions are safe to call through the trampoline, as they
     may depend on system state which has been disturbed or used for other
     purposes once the NetBSD kernel is running.

BSD                             October 1, 1998                            BSD
[ Back ]
 Similar pages
Name OS Title
doscmd FreeBSD run a subset of real-mode DOS programs
pam_vprompt FreeBSD call the conversation function
pam_prompt FreeBSD call the conversation function
cflow Linux print a function call hierarchy
syscall NetBSD indirect system call
__syscall NetBSD indirect system call
sgigsc IRIX SGI graphics system call
syscall Tru64 indirect system call
syscall FreeBSD indirect system call
__syscall FreeBSD indirect system call
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service