[Modularkernel-developer] PhysicalMapsStart and other, in physical_memory.c
Status: Pre-Alpha
Brought to you by:
musteresel
|
From: Tomas K. <tom...@gm...> - 2010-04-20 21:33:10
|
Hi, I have a few controling question to check my understanding. Is PhysicalSuperMapStart always going to be equal to PhysicalManagedInfoStart? The PhysicalMapsStart is where we start to store the individual map contents? What is PhysicalLastFrame? I mean, I think I get how it is computed, but I question whether it is always going to be valid. For illustration, let's say Size will be (UINT32_MAX-Base+1). I think this can occur when the machine has 4 gigabytes of ram. Now, doing Base+Size will overflow, and the PhysicalLastFrame will be zero. Which I do not think is the desired outcome. What is it that I am not seeing here? Is PhysicalLastFrame actually the index of the first unmanaged frame? One that does not exist because it is beyond the actual available physical memory? About the line "PhysicalKernelEnd = PhysicalManagedInfoEnd;" PhysicalKernelEnd is, so far, where the kernel machine code and data structures end in the physical memory. Correct? Why are we doing address arithmetic in 4-byte quantities instead of 1-byte? I mean, we need >>5 because we are using UINT*, instead of, let's say char*, right? Is it because of the bitmaps? In _use_frames(), when (Start+Count >= PhysicalLastFrame) is true, shouldn't we panic, instead of just doing nothing? Btw, I have added a few more comments to the source file. It helps me a lot to quickly refresh my understanding of the source code. I did read enough from this file for now, and I am going to read other source files. Tomas |