|
|
|
|
|
#1
|
|||
|
|||
|
This forum is about programming EFI, C/Assembler and I've started it to get moving on a full on CSM solution.
I want to open this thread as the frustration of trying to co-ordinate all the scattered information accross the net is amazing. ![]() |
|
#2
|
|||
|
|||
So to kick this off.... My aim is to create a fully functional CSM which provides the "Glue" for BIOS/VGA on any "Legacy" OS. The XOM.efi is fantastic in it's achievement and I wish the source was available however it still isn't. It provides the initial target of getting XP installed and booted but I see this as the start of something better. I want to be able to put an undoctored CD/DVD for any OS (Linux, freeBSD, XP, 2000, vista etc) and install and boot just as if I were on a normal PC.BamBIOS sounds like a plausable idea but not sure about it until something starts to come out although I don't think using the Bochs Bios is the best solution). I think the final solution will be something like this : ElTorito functionality provided by an EFI driver rather than coded into the EFI bootstrapper. BIOS emulation possibly through an EFI driver (handles all interrupts and directs them to a module to process in EFI code). VGA emulation possibly through an EFI driver An Efi application (EFI Bootstrapper) would install the drivers (if not already installed) and possibly install itself in the NVRAM. This would be like xom.efi in that it would offer dual/triple boot functionality. I'd also like to intercept the holding down c key for any other OS to provide CD level booting. I have spent the best part of 3 weeks attempting to start work on creating a full solution and progress is slow. The issues I encounter are just how best to create the EFI. Their are so many little bits and pieces to get right and information is scattered accross the net. This forum hopes to get a collection together so we can all contribute and help each other out. So far I have investigated the Intel Toolkit (essential really) building using nmake. All was fine until I began to work on the assembly part (Switching to Real mode to plug into the interrupts which the OS uses). I had to use ML.exe cause I couldn't get the toolkit to recognise and build the assembler modules. My current status is as follows: 1) EFI boots okay and displays simple message 2) ElTorito CD functionality (initially coded into main module will be into a driver at some point) - Read CD and the Boot Block. 3) Passing control to the Assembler module to reconfigure the GDT/IDT and set up IVT tables. So not great really... IVT table is not being setup properly and all weekend when I passed in a GDT table and tried to load it triple faulted and restarted. (I think relocation of code may be an issue here). However when I coded the GDT into the assembly module it hung rather than rebooted so some minor progress. I am building on XP at the moment but would much rather get over and build on OS X. So what I am hoping for is some help, information, platform tools that others have used and how they got them to work. I think MASM is a pile of crap, options : NASM, TASM, FASM, GAS only using the Intel Toolkit and nmake causes all sorts of linking issues. So any of you guys out there who have played with the EFI and gotten it to work I'd love to hear from you. Also any one managed to test any of this stuff using the TianoCore Emulator ? If there is enough support and programmers available lets get it on and perhaps set up a sourceforge project ? Blanka - Narf you did good, but get that source out there... |
|
#3
|
|||
|
|||
|
I cheer your effort WandaLust. I am not an assembly programmer or I'd offer to get involved. Maybe later when the tools and techniques are laid out for the assembly aspriant?
One question I have is rather than reinventing the wheel, why not use something like rEFIt? http://refit.sourceforge.net Or use the built in Mac boot loader? I don't know all the details about booting, maybe rEFIt uses this? The partial solution offered by Clay on his blog, looked promising. You hold option down when booting the Mac and get an iconic list of bootable volumes. When I do this now on my MBP 2.0Ghz, I get my "Machintosh HD" volume only. Clay was able to get it to the point of selecting an alternate volume and apparently got stuck on the VGA support part. He mentioned that there were some disadvantages to this technique which explains why Blanka didn't do it this way. Here's the blog I am referring to which includes some screen shots, the source code, and commentry by Blanka himself: http://daemons.net/~clay/index.php/2006/03/15 What d'ya think?
__________________
-- Fuzz |
|
#4
|
|||
|
|||
|
Quote:
![]() |
|
#5
|
|||
|
|||
|
The source code has been released and there is now a "Developers" forum, maybe this thread should be moved there?
(I'll comment on the actual discussion later.) |
|
#6
|
|||||||
|
|||||||
|
Some random comments:
Quote:
Possible workarounds for the second item are building a cross-compile environment for Linux i386 on OS X, or using Linux inside QEMU. Quote:
Quote:
BTW, there's always the #winxponmac-dev channel on FreeNode IRC. Quote:
Quote:
Quote:
Quote:
|
|
#7
|
|||
|
|||
|
Thanks Chrisp, interesting reading. I have noticed that if I use Startup Disk that it reblesses the OS X boot.efi file and I need to rebless xom.efi to get dual booting back. If a small HFS+ partition were used to select the XP boot, then I suppose Startup Disk would work without damaging the dual boot setup, the NVRAM settings would work for selecting the default boot volume (which could be XP if desired) so the Mac would boot into the last selected OS on power up, with no user intervention. The required "pause" to select the OS would in fact be present by holding the Option key. This all sound about right? I personally would prefer this.
But I guess this is all using Apple's boot mechanism and has nothing to do with rEFIt. I noticed you posted the patch to XOM to support rEFIt. Have you tested that or are you just laying the groundwork? Can you comment on how rEFIt might interact with the Apple and XOM mechanisms and contrast it to the XOM solution we have now?
__________________
-- Fuzz |
|
#8
|
||||
|
||||
|
Quote:
Quote:
Quote:
Quote:
|
|
#9
|
|||
|
|||
|
So XOM is finally out there for all to see. I got it set up last night and have started to look at the processes used, I also have Clays stuff so these are both very good starting points.
The rEfit stuff I also have and very impressive. I may well tack onto the end of one of these projects when I get there... My current aim is to try and intercept the INT calls and will be looking to implement them using EFI calls. I am going tonight to look to an OS i was writing last year which intercepts and remaps GDT, IDT etc and look at whether I can use this to intercept and process those IDT, GDT calls. Looking at what Blanka and Clay have done. Also as reading the post was beginning to wonder if we just replaced boot.efi with the xom.efi (i.e renamed xom.efi to boot.efi) and wondered what effect that would have. this would solve the reblessing issues but at this time not sure exactly what boot.efi does. Anyway thanks for all the posts and keep em coming... ![]() |
|
#10
|
|||
|
|||
|
Hi,
I'm currently looking at CSM myself, and I was wondering: has everybody stopped since Apple released BootCamp ? As Wandalust said, it's really hard to find documents or people with knowledge about EFI ... Also, it seems that Clays site is currently down. Could someone send me his work (provided that the license permits it) ? I would like to have a look at it. |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
All times are GMT +1. The time now is 03:10 PM.





but I see this as the start of something better. I want to be able to put an undoctored CD/DVD for any OS (Linux, freeBSD, XP, 2000, vista etc) and install and boot just as if I were on a normal PC.
Linear Mode
