[bikeshed] Re: Loading the ramdisk

  • From: "WALTER LITWINCZYK (RIT Student)" <wtl4112@xxxxxxx>
  • To: bikeshed@xxxxxxxxxxxxx
  • Date: Sat, 28 Apr 2012 11:25:46 -0400

You are correct, so you're loading routine would look something like the
following:

void* phys_address = 0x40 000;
for (void* i = 0xE000 0000; i < (void *)(0xE000 0000 + file_sys_size); i +=
4096, phys_address += 4096)
{
       __phys_set_bit(phys_address);
       __virt_map_page(phys_address, i); // Check the order of the
arguments I don't remember
}

(If this was D we could put underscores in the constants)

As for the 508MiB, probably not, I still need some space to map PCI devices
and I was hoping to put those at 0xF000 0000, leaving you 256MiB, but it's
possible the PCI devices don't need 256MiB and I can probably get away with
124-128MiB for the PCI devices, but I wouldn't worry about it, if we have a
512MiB ramdisk we probably have other problems.

On Sat, Apr 28, 2012 at 3:43 AM, David Larsen <dcl9934@xxxxxxx> wrote:

> Hi Walter,
>
> So, I'll be merging master into my branch in a few days (and later my
> branch into master (once I implement the syscalls)). I want to be sure that
> I remember how we decided we should load the ramdisk into memory.
>
> I'll have FancyCat load the filesystem at 0x40 0000 in physical memory and
> map the filesystem to 0xE000 0000 in virtual memory (after the kernel heap).
>
> I'll use __phys_set_bit() to mark those pages as occupied and
> __virt_map_page() to actually map 0x40 0000 physical -> 0xE000 0000
> virtual. I'll have to use these in 4kb page increments.
>
> I'm going to leave the filesystem size at 120kb in the meantime, but I
> should eventually be able to expand it to 508MiB, correct?
>
> Is there anything else I need to worry about?
>
>
> Thanks,
> David
>
>

Other related posts: