|
From: Daniel R. <cos...@gm...> - 2006-01-14 22:19:24
|
> Manuel wrote: > I think that I can also contribute by adding some mp support since > I already implemented that part with my new OS. With my last update to the cvs I've now begun preparing the framework for the muli-pocessor code: - Entry.asm now contains code that can be relocated to 0x7C00 in order to boot the APs - main() is multi-processor aware and can be used by both BSP and APs - Basic (pysical) heap management allows allocation of memory for the hal-classes of each CPU - virtual memory map is the same for all CPUs: 0xE0000000 - Start of the kernel image + image_size - This CPU's Stack + 4096 bytes - Debugging console + 4096 bytes - Nodestructure of CPU #1 + 4096 bytes - Nodestructure of CPU #2 + 4096 bytes - Nodestructure of CPU #n 0xFFFC0000 - Pagedirectory of this CPU Nodestructure: offset 0x000-0x1FF -> gdt (loaded by entry.asm) offset 0x200-0x3FF -> idt (set-up in main.cpp) offset 0x400 -> Header containing pointers to hal objs offset 0x400++ -> ~3kb free space for the hal objects Apart from the multi-processor initilization routines in main.cpp there are three hal objects that are meant to provide an interface to the functionality of the APIC. Maybe you could have a look at these classes while I'll add some more multi-processor detection and booting code to main(): * irq.hpp The irq class initializes the APIC by mapping all IRQs to a certain range of interrupt numbers (ie: 0x20 - 0x3F). Whenever an IRQ occures the static methode DeliverIRQ() gets called and informs the driver of the device(s) using the just triggered IRQ via an IPC message. * timer.hpp This class allows timers to be set and calls the scheduler on a timer event. I would like to use single-shot only as they allow a much more fine grained scheduling of tasks than periodic timers. As we don't want to lose any time between the deli- very of a timer event and the reinitialization of the internal timer clock, the class supports the NEXT_TIMER to be set in advance. Immediately after CURRENT_TIMER ran off the hardware may thus be reseted. * ipi.hpp To send an ipi the caller first has to aquire the mutex of its own ipi-class aswell as the receiver's mutex. It then copies its message to the arguments fields of the receiving CPU and causes an IPI that will be processed by the receiver's ProcessIPI() methode. Once the receiver has finished it writes a return value to the sender's arguments field which will then in turn release the two mutex. > Stephen M. Webb wrote: > Okay, I reinstalled the old toolchain and build the code no problem. > I will now undertake to convert to autoconf (including automatically > generating a bootable floppy image). Thanks alot, also for fixing the website.. > Jeff Weeks wrote: > By the way, does anyone know if sourceforge supports email notification > ofcheckins? Perforce does this, and I miss it with CVS projects... it's > niceto see what changes are being made to the code, by who, and when, as > they'rebeing made. Sure, just register to the other mailing list: http://sourceforge.net/mail/?group_id=90198 I've, by the way, noticed that the cvs reposity contains a number of empty folders that don't seem to be used any longer: http://cvs.sourceforge.net/viewcvs.py/trion/Desktop/ http://cvs.sourceforge.net/viewcvs.py/trion/include/ http://cvs.sourceforge.net/viewcvs.py/trion/source/ http://cvs.sourceforge.net/viewcvs.py/trion/trion v0.2/cvsroot/ Would anybody here mind me asking the sf-team to remove these ? regards, Daniel |