delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/06/02:38:43

Date: Thu, 5 Feb 1998 20:55:16 -0800 (PST)
Message-Id: <199802060455.UAA04142@adit.ap.net>
Mime-Version: 1.0
To: =?iso-8859-1?Q?=22S=E9rgio_Vale_e_Pace=22?= <space AT gold DOT com DOT br>,
djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: Mapping

At 07:13  2/5/1998 -0200, Sérgio Vale e Pace wrote:
>Hello out there...
>
>    This is probably a silly question, but can somebody explain me what
>exactly is the physical mapping process and why it is needed (e.g.
>linear frame buffer)? I mean, if in linear memory you have access to all
>up memory why you need to map an area to use it?
But you don't have access to all memory. In protected mode, there are two
levels of address translation. The segment-relative virtual address (if not
exceeding the segment limit) is added to the segment base address to form
the linear address. This linear address is then looked up in the page
tables, where each 4K chunk of memory is one page, and may resolve to
anywhere in physical memory (or generate a page fault). The DPMI protection
mechanism (I believe) makes pages other than those which a program is
legally allowed to access illegal, and it doesn't know about other physical
devices (like linear framebuffers). You have to tell it, which is the
purpose of the physical memory mapping. On this request, the DPMI server
maps that physical region into linear memory by adjusting the page tables,
whereupon you can access it by creating a selector that points there.

If you need a nuts-and-bolts description of how to do this, see FAQ section
18.7.

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


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