flat assembler
Message board for the users of flat assembler.
Index
> DOS > Question about real mode addressing Goto page Previous 1, 2, 3, 4 Next |
Author |
|
revolution 23 Jan 2009, 04:03
neville wrote: Unreal mode or Flat Real mode has several advantages for me. It provides a convenient no-hassle easily set-up environment for processing bulk data held in a linear 32-bit address space, up to 4 gigabytes. For example, it gives me direct access to all BIOS interrupts which saves a lot of time if you don't have to first write, then test and then debug your own I/O routines, for example. (16-bit code is not a problem - it works with 32-bit addresses just fine) |
|||
23 Jan 2009, 04:03 |
|
neville 23 Jan 2009, 06:22
Quote: But it is not laid out in contiguous blocks is it. It is broken up by LFB's and I/O buffers. revolution wrote: I always think of paging as having two major advantages. All devices memories are already in known locations, and they are never in the way. Very ironically, your virtually-addressed "contiguous blocks" are not actual contiguous memory at all... In fact after multi-level page translations they are probably even more fragmented small blocks of physical memory, as small as 4kbytes each! Your contiguous memory is an illusion, done with smoke, mirrors and page tables So there goes your two major advantages of paging. Hmm, I think we've had this discussion before... _________________ FAMOS - the first memory operating system |
|||
23 Jan 2009, 06:22 |
|
neville 23 Jan 2009, 06:27
Quote: DPMI does is nicely by using protected mode the way it was designed for. Even with unreal mode you still have to switch back to RM to run BIOS 16bit code. _________________ FAMOS - the first memory operating system |
|||
23 Jan 2009, 06:27 |
|
revolution 23 Jan 2009, 06:45
So you must be running unreal mode code in a 16bit mode selector? Assuming 32bit code then I would have thought that each interrupt needed to transition back to 16bit code selectors if one needs to run BIOS code. And if you are running 16bit code in unreal mode then it seems to me it kind of defeats the purpose of unreal mode.
neville wrote: who needs DPMI? |
|||
23 Jan 2009, 06:45 |
|
revolution 23 Jan 2009, 06:50
neville wrote:
Also what happens if you have 8GB memory, the LFB's and things do get in the way. And moving it out of the way can be very convenient. Perhaps I can mention a third advantage of paging. Being able to access more than 4GB in 32bit code. The OS can allocate up to 4GB per process, not possible with flat addressing. |
|||
23 Jan 2009, 06:50 |
|
neville 23 Jan 2009, 09:19
Quote: And if you are running 16bit code in unreal mode then it seems to me it kind of defeats the purpose of unreal mode. Quote: Hehe, people with non-performing unreal mode CPUs. Quote: Plus the two main advantages I listed above. Quote: Smoke and mirrors maybe Quote: It makes some software easier to write. Quote: Also what happens if you have 8GB memory Quote: the LFB's and things do get in the way Quote: Perhaps I can mention a third advantage of paging Quote: Being able to access more than 4GB in 32bit code. Quote: The OS can allocate up to 4GB per process, not possible with flat addressing. _________________ FAMOS - the first memory operating system |
|||
23 Jan 2009, 09:19 |
|
revolution 23 Jan 2009, 09:34
neville: Since the Pentium Pro the x86 CPUs have had 36 bit address capability. Impossible to address it all without paging.
Where is the LFB usually? Will it never get into the midst of the SDRAM space? Just because you call it smoke and mirrors does not mean any sort of discredit. If I can move the LFB (and other hardware buffers) to the top of the address space and move the SDRAM back into the hole how does that complicate app programming when the SDRAM now appears contiguous? Do you really believe that paging creates RAM fragmentation? Is it not more important that the apps see contiguous space? The hardware doesn't care what order you access RAM it just simply gives you that data. The name is Random Access Memory. [edit]I checked the old docs, the Pentium Pro was the first to introduce a 36bit hardware address bus. |
|||
23 Jan 2009, 09:34 |
|
neville 23 Jan 2009, 19:36
Quote: neville: Since the Pentium Pro the x86 CPUs have had 36 bit address capability. Impossible to address it all without paging. Quote: Where is the LFB usually? Will it never get into the midst of the SDRAM space? Quote: ...how does that complicate app programming... Quote: Do you really believe that paging creates RAM fragmentation? Quote: the Pentium Pro was the first to introduce a 36bit hardware address bus. _________________ FAMOS - the first memory operating system |
|||
23 Jan 2009, 19:36 |
|
revolution 23 Jan 2009, 19:45
Yes, 36 real physical hardware address lines. Pure and simple. So how to address it all? With paging.
[edit] Although, of course, being a 64bit data bus, A0-A2 are not made external, but let's not get too picky, it is still 64GB physical address capability. |
|||
23 Jan 2009, 19:45 |
|
revolution 23 Jan 2009, 19:56
neville wrote:
* At least at the 4kB page level, smaller random access will suffer from a SDRAM page switch latency. However since both (CPU and SDRAM) page sizes are usually matched 4kB this has no effect upon performance. Both paged and non-paged systems will have to endure the SDRAM page change latency. |
|||
23 Jan 2009, 19:56 |
|
revolution 23 Jan 2009, 20:03
neville wrote: In my expereience the VESA LFB is always "automatically" mapped to the top of installed physical RAM, so my answer in "no". Think about it. If it is put above all the SDRAM then how to access it without some type of paging. And if it is put somewhere in the first 4GB then it is putting a hole in the SDRAM continuity. Hmm ... [edit] Replace 8GB with 4GB and the argument still holds. |
|||
23 Jan 2009, 20:03 |
|
DJ Mauretto 23 Jan 2009, 20:06
Usually from p2 p3 Ppro ( p6 family) untyl today
northbridge chipset use the following line to interface with CPU A [31:3] for address bus (28bit) D [63:0] for data bus (64bit) Check Intel chipset spec for this. Note that Address [3:0] are used by northbridge to select memory chip _________________ Nil Volentibus Arduum |
|||
23 Jan 2009, 20:06 |
|
revolution 23 Jan 2009, 20:10
DJ Mauretto: Yes, not all the older motherboards could support all the CPU features. Things like dual CPUs and >4GB RAM were often only available on server machines.
|
|||
23 Jan 2009, 20:10 |
|
revolution 23 Jan 2009, 20:14
DJ Mauretto wrote: Note that Address [3:0] are used by northbridge to select memory chip |
|||
23 Jan 2009, 20:14 |
|
DJ Mauretto 23 Jan 2009, 20:20
For server machine intel chipset use
A [39:3] D [63:0] Note that i have in front to me Intel chipset documents and i am reporting data from chipset _________________ Nil Volentibus Arduum |
|||
23 Jan 2009, 20:20 |
|
revolution 23 Jan 2009, 20:28
A[39:3]? I presume this is for the 64bit Xeon CPUs with the 40bit address bus?
|
|||
23 Jan 2009, 20:28 |
|
DJ Mauretto 23 Jan 2009, 20:32
Seem also for Dual Core or Quad Core,
in fact some year ago i wanted to buy a Server chipset for my desktop pc because more faster I understand because i don't bought anymore ,beacause it's for Xeon 64 bit CPU _________________ Nil Volentibus Arduum Last edited by DJ Mauretto on 23 Jan 2009, 20:38; edited 3 times in total |
|||
23 Jan 2009, 20:32 |
|
neville 23 Jan 2009, 20:34
D J Mauretto, I find your version much easier to believe than revolution's! Starting at A3 just means all memory accesses are 64-bit (8 bytes), so its still really a 32-bit address bus, but not 36-bit...?
revolution, if both page size and CPU cache are 4Kb, wouldn't that decrease the probability of cache hits and so increase latency when paging is enabled? _________________ FAMOS - the first memory operating system |
|||
23 Jan 2009, 20:34 |
|
revolution 23 Jan 2009, 20:41
neville wrote: D J Mauretto, I find your version much easier to believe than revolution's! Starting at A3 just means all memory accesses are 64-bit (8 bytes), so its still really a 32-bit address bus, but not 36-bit... neville wrote: revolution, if both page size and CPU cache are 4Kb, wouldn't that decrease the probability of cache hits and so increase latency when paging is enabled? |
|||
23 Jan 2009, 20:41 |
|
Goto page Previous 1, 2, 3, 4 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.