memory areas

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
neowert

memory areas

Post by neowert »

what area are reserved by thr vpu and devices. I need to know what areas of memory I can use. I know the first 1K or so of memory is reserved for the IVT. I am fairly sure the video card uses some address space too. what else, or is there a standard way of knowing?
neowert

Re:memory areas

Post by neowert »

er, vpu=cpu. thr=the. sorry
neowert

Re:memory areas

Post by neowert »

er, vpu=cpu. thr=the. sorry
Tim

Re:memory areas

Post by Tim »

In general:
  • The bottom 4KB are reserved for the interrupt vector table and the BIOS Data Area
  • An area just below 640KB is reserved for an Extended BDA on some machines
  • A0000-FFFFF is full of ROMs and memory-mapped devices; don't touch that unless you're e.g. accessing video memory
  • PCI devices will put their memory areas higher up; you can ask PCI where these are. Note that these areas should be well away from physical memory (usually at the top of the 4GB physical address space)
neowert

Re:memory areas

Post by neowert »

thanks
Paul

Re:memory areas

Post by Paul »

Tim,

You said you can "ask" the PCI devices where their memory areas are......how?

Paul
Tim

Re:memory areas

Post by Tim »

It's not trivial: you need to either call the PCI BIOS functions or access the hardware directly. OpenBLT, NewOS and Mobius all contain more-or-less the same PCI code, so download the source to one of these and copy it from there.
Post Reply