Re: question about system memory space mapping

From: Min Wang (spamtrap_at_crayne.org)
Date: 10/18/04


Date: Mon, 18 Oct 2004 19:55:57 +0000 (UTC)

Thanks a lot, Herman, Dirk and Hutch. Your answers clarified some puzzles
confusing me for several years... I was a pure GUI software programmer and
now I want to know something low-level :)

Now I know that if OS programs the chipset properly, almost no system
resource would be wasted/ignored. When I tried to understand this, more and
more questions came into my mind. Is there any book/tutorial which details
how various chipsets/controllers are programmed during POST and how does
host bridge recognize all the other bridges/devices and assign address
ranges to them? I think this is mostly a hardware/bios issue and linux OS
tutorial can't help. I'm studing NT device driver programming and I need to
understand the translation for "cpu virtual address -> cpu logical
address -> cpu physical address -> bus logical address -> device logical
address". I already have some idea how cpu address translation works. Now I
need to know how information on cpu address bus reaches device address bus.

Can the video adapter work under both graphic mode and text mode at the same
time? Suppose I have a PCI video adapter and the frame buffer base address
is mapped to physical address 0xe1000000. When I put data to this physical
address, the screen would be overwritten. But if at the same time I write to
physical address a0000-bffff, what would happen?

Min

"Herman Dullink" <spamtrap@crayne.org> 写入消息新闻:ckqiio$kg5$1@reader10.wxs.nl...
>> Several more questions:
>> 1) If I have 1M physical memory in my system and I'm using DOS 6.0,
>> a0000-bffff of physical memory is disabled and therefore never
>> used/wasted, right?
> Depends on your hardware. The address decoders (usually in the chipset)
> can map the normally unused memory in that area (the Upper Memory Area;
> or UMA) to an address above 1MB. This way, of that 1MB, 640KB is used
> for conventional DOS memory, 256KB is used for Extended memory and
> 128KB is used for ROM shadowing (for holding a copy of the BIOS in RAM).
>
>> 2) For a typical PC system, such a way of mapping of video buffer and
>> bios is "hard-coded" by mainboard manufacturer. There is no programming
>> controller that Software/OS can use to change the way of mapping.
> It often _is_ programmable. It's controlled by the chipset, so when
> altering
> some chipset registers, you can change the way of mapping.
> These chipset registers are very, very specific to that chipset. You
> cannot (easily)
> create a piece of software that will work on all systems. But you can make
> it
> run on your 82444GX.
>
>> For example if I have 2M physical, I can't map 1M to 00000-fffff and the
>> other 1M to 300000-3fffff.
> For that answer, you have to look at your chipset registers.
>
>
>> How can DOS runs with 64K memory?
> DOS v1 was very, very small :-)
>
>> How is bios, video buffer and physical memory mapped(addressed by cpu) in
>> this case?
> That 64KB would be RAM, BIOS would stay in ROM (in older PC's, ROM isn't
> that
> much slower than RAM), and the video buffer would still be somewhere in
> the a0000-bffff
> area. A video adapter has it's own memory.
>
>
> H
>
>



Relevant Pages

  • Re: C++ sucks for games
    ... > mistakes it is possible for a programmer to make (although of course memory ... > references and memory management is a bit of a red herring here. ... you would use smart pointers too. ...
    (comp.lang.lisp)
  • Re: P4T533-C unstable with 1.5 GB RAM
    ... chipset limitation, so I downloaded the datasheet for the 850E Memory ... P4T533-C unstable with 1.5 GB RAM ... There is a limit on the number of CHIPS that the 850e (or ...
    (alt.comp.periphs.mainboard.asus)
  • Re: ASTs in assembler
    ... Absolutely I don't mean optimizing what has written by the programmer. ... idea of the assembler being able to have a "big picture" of the source. ... Because of the amount of memory modern machines have, ... Why not read macro bodies from macro symbol table? ...
    (alt.lang.asm)
  • Re: Garbage collection
    ... and that the allocations retained ... programmer to avoid bugs in MANUALLY done memory management? ... allocated memory, no recursion, and the maximum call depth and memory ...
    (comp.lang.c)
  • Re: A Silly Database Question
    ... I guess it's easy to see why it's always a can or a cylinder. ... The use of multiple platters was an attempt to increase the probability that more 'record's would be 'found'/accessed by a single head seek. ... I had one boss who said if he read one more resume of a system programmer who had invented a new VTOC manipulation program, ... They didn't want to use the generic subroutines for disk access provided by IBM which had memory sizes of thousands of bytes because they were short of 'main memmory' and it was too expensive to bump their main memory from 16Kilo-bytes. ...
    (comp.databases)