www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/02/24/14:45:10

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: "MarKol" <markol4 AT wp DOT pl>
Newsgroups: comp.os.msdos.djgpp
Subject: Charless Sandmann
Date: Sun, 24 Feb 2002 19:04:29 +0100
Organization: tp.internet - http://www.tpi.pl/
Lines: 88
Message-ID: <a5bf05$nrv$1@news.tpi.pl>
NNTP-Posting-Host: seazone.gda.pl
Mime-Version: 1.0
X-Trace: news.tpi.pl 1014579014 24447 195.117.175.253 (24 Feb 2002 19:30:14 GMT)
X-Complaints-To: usenet AT tpi DOT pl
NNTP-Posting-Date: Sun, 24 Feb 2002 19:30:14 +0000 (UTC)
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MSMail-Priority: Normal
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi

It's me again ;-)

Now it seem's that may PM interrupts work fine.
Now I'm trying to cope with RM interrupts.
I've studied cwsdpmi some time ago, but now I'm not sure
about some aspects. Would be great if you could help me.

Assumption.
We are working on a plain DOS (7.xx).
We are using CWSDPMI as our DPMI host (should work on CWSDPR0 too)
Single app is running (no spawning other apps by exec() or sth)

1.
What about changing PD and PT. Is it harmfull to CWSDPMI or my
program when I change some PD or PT entries?

e.g

I'd like to map whole (or fragment) DOS (0-1MB) memory
to my virtual address space.
(I allocate 1MB of memory, commit all pages, lock this region,
go thorugh PD and PT changing physical addresses to point to
DOS memory)

I'd like to map APIC register space to my program
virtual address space.

I've tried this before and it worked, but I'm not sure about
consequences.

Doing this I make some silent assumptions:
+cwsdpmi won't change my program base linear address
+cwsdpmi won't remap this modified linear fragment to other physical
address
+cwsdpmi will be able to allocate memory if asked by DJGPP libc

If answer for some of these questions is NO maybe there is way changing
this answer to YES?


2.
I'd like to install RM interrupt in the same way as I did in PM (
directly via IDT)
I assume that I've service routine in DOS memory.

Now I can put its address directly into Interrupt Vector Table (IVT).
But where is it? Where begins IVT for real mode interrupts?
Does it still begin at 0000 or it's moved somewhere?

Now I think it's sufficient to put address of my ISR to this table,
and everything should work fine AFAIR (I've never tried so far)
As in PM case CWSDPMI won't even see this interrupt when it arrives
and will get served by my RM ISR.

3.
What abount NMI? I intend to use Local APIC and some "Local interrupts"
Some interrupts generated by APIC must be carried as NMI.
Is it possible to crash CWSDPMI by NMI interrupt?
I mean moment when modes are changed (RM->PM or vice versa)

When mode is switched from PM->RM there is moment when
LDT (by LIDT instruction) must be loaded, so there is very short
(but IS) time, when IDT is invalid.
Since NMI interrupt cannot be masked, there is possibility
(very small, but IS) that everything will crash - I think.

If I'm wrong (I hope I'm) correct me.

If I'm right is this really dangerous?
Maybe probability of this is very small e.g 10^-50 ??




Any help would be appreciated.



Best regards
--
  /     |_|_|_|_|     void identification(){               \
 /       |mov e|        printf("   Marek  Kolacz  ");       \
||       |cld  |        printf("   markol4 AT wp DOT pl  ");       ||
 \       |movsd|      }                                     /
  \_____/_______\__________________________________________/

- Raw text -


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