delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/11/07:10:09

From: "Rob van Berkel" <rvberkel AT EuroNet DOT NL>
To: <djgpp AT delorie DOT com>
Subject: Q: Should I set up a TSS to make a long call to a linear address??
Date: Mon, 11 May 1998 13:07:04 +0200
Message-ID: <000001bd7ccc$edbcfc00$0201a8c0@king>
MIME-Version: 1.0
Importance: Normal

Hi,

Im currently having lotsa trouble with a program that is supposed to find
and call the BIOS32 entry point.
My program finds the entrypoint (following the guidelines of the Standard
BIOS 32-bit Service Directory Proposal), which is a linear pmode address.
Next I set up a suitable selector (base, limit and accessrights) and save
the entrypoint and the selector in a struct. This causes the struct to hold
an 48bit addres suitable to use in an __asm__(lcall (struct_address))
statement. Compiling and running the program results in the following
output:

+++++
pcibios_init : BIOS32 Service Directory structure at 000fd9f0
pcibios_init : BIOS32 Service Directory entry at 000fda00

Exiting due to signal SIGSEGV
General Protection Fault at eip=00001dc1
eax=49435024 ebx=00000000 ecx=00000000 edx=00000005 esi=00055000
edi=000096a0
ebp=0004cec8 esp=0004ce68 program=C:\PROJECTS\MMIO.EXE
cs: sel=00a7  base=8331a000  limit=0008ffff
ds: sel=00af  base=8331a000  limit=0008ffff
es: sel=00af  base=8331a000  limit=0008ffff
fs: sel=00d7  base=c12d5000  limit=0001ffff
gs: sel=00bf  base=00000000  limit=ffffffff
ss: sel=00af  base=8331a000  limit=0008ffff

Call frame traceback EIPs:
  0x00001dc1
+++++

EIP address 00001dc1 is the address where the inline LCALL instruction
occurs. With the coding of this part nothing seems to be wrong - I compiled
and disassembled the object files to see what instructions the compiler and
assembler generated. It was coded as I expected it to be.

No matter how I set up the selector that accompanies the 32bit entrypoint,
it seems I'm not allowed to make the call. After doing a bit of reading
about LDT, GDT and protected mode (in the Intel 386 programmers guide) I get
the feeling I should set up my own TSS (task status segment) and use the
task-selector instead of the current selector+offset to make the LCALL. Will
DPMI allow me to do so?
Does anyone out there have any experience in this field? Should I really
bother myself with TSS'es etc??
Please try and help me out.
TIA

Rob.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019