Where does physical RAM start in kseg0?
Hi again, everyone;
A question about kseg0: Do system designers usually set things up such that kseg0 begins at the start of physical memory, regardless of the xkphys offset at which RAM starts?
Or is it necessary to add the offset at which RAM starts to the kseg0 base, making it possible that the system designers could start RAM addresses high enough (above 512M) to make kseg0 unusable? Does anyone have an implementation in which this is the case?
If kseg0 provides a window beginning at physical address 0, that means I'm going to try using Ralf's mapped kernel option, or I'll have to get the kernel up and running in 64 bit only mode (I believe 32 bit compat binaries would still work, since kuseg can be mapped).
Erik
Signature · 2 lines
Erik J. Green [email protected]
Quoted 4 lines · Erik J. Green
A question about kseg0: Do system designers usually set things up such that kseg0 begins at the start of physical memory, regardless of the xkphys offset at which RAM starts?
XKPHYS and KSEG0 map the same physical address space so the offsets is the same. Keep also in mind that XKPHYS maps the physical address space 8 times due to the 3 bits of the address that encode a caching mode.
Quoted 4 lines
Or is it necessary to add the offset at which RAM starts to the kseg0 base, making it possible that the system designers could start RAM addresses high enough (above 512M) to make kseg0 unusable? Does anyone have an implementation in which this is the case?
There is no requirement at all for a system to have physical memory in KSEG0 - the Octane to my knowledge one example. What every sane system needs to have in KSEG0 are exception handlers. Of course they could also reside in a ROM but that's insane so you should expect at least a few kb of RAM at physical address zero.
Quoted 4 lines
If kseg0 provides a window beginning at physical address 0, that means I'm going to try using Ralf's mapped kernel option, or I'll have to get the kernel up and running in 64 bit only mode (I believe 32 bit compat binaries would still work, since kuseg can be mapped).
Due to the Octane's funky address space layout and the current tools limitations the kernel will have to run in CKSEG2 instead of KSEG0 ...
Ralf
Quoting Ralf Baechle <[email protected]>:
Quoted 5 lines · Ralf
There is no requirement at all for a system to have physical memory in KSEG0 - the Octane to my knowledge one example. What every sane system needs to have in KSEG0 are exception handlers. Of course they could also reside in a ROM but that's insane so you should expect at least a few kb of RAM at physical address zero.
At this point I wouldn't put anything past SGI, but it's good to know my suspicions about kseg0 are confirmed.
Quoted 5 lines
Due to the Octane's funky address space layout and the current tools limitations the kernel will have to run in CKSEG2 instead of KSEG0 ...
Ralf
/nod. Onward and upward.
Thanks,
Erik
Signature · 2 lines
Erik J. Green [email protected]
Quoted 2 lines · Ralf Baechle
Due to the Octane's funky address space layout and the current tools limitations the kernel will have to run in CKSEG2 instead of KSEG0 ...
Recent tools (like these at my site) should be fine for making an XPHYS
kernel -- it's the assumption of being in the 32-bit address space made here and there in the kernel that bites...
Signature · 3 lines
+ Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: [email protected], PGP key available +