Jump to content

Possible EFI Implementation booting trought EFI Intel toolkit


133 posts in this topic

Recommended Posts

I am getting idea that we would never need to actually flash Apple's Boot ROM on an EFI machine because EFI could just read it in from a file instead (albeit a little slower).

 

Yes, thats what I think , too. The Framework is just being loaded, and EFI does not care, whether its coming from the ROM or from a Floppy etc.

 

So likewise, the essential elements of an EFI-CSM might be some kind of switch and just a BIOS file to read in. In other words, the CSM could be implemented here on an EFI iMac with just some EFI files from the EFI Gateway machine. We might be able to avoid any flashing or even reading of the EFI-BIOS's.

 

However what is absolutely not clear in that diagram is the how CSM operates or even where it exists. I mean their appears to be only one operating system and two loaders ("legacy" and EFI). Moreover, it appears that the "legacy" OS loader operates only independently of the EFI system

 

Yes this mysterious CSM... What about if it is just another name for a feature that is already included? It could be, that CSM is just a name for the possibility to load every EFI-driver you want into EFI, and also can boot your firmware from wherever you want (even over every LAN with the PXE) and that EFI is also down-compatible to any BIOS. Maybe that is CSM!?

 

:excl:

Link to comment
Share on other sites

What exactly does "Standard Platform Initialization Mean" with respect to Apple's Boot ROM? Are we to assume this is the point where the Flash'd EPROM is read?

 

I think this is just the correct nerd-term for "Power ON"

 

Next, at what stage in the operation would we expect a CSM to operate? Shouldn't it preempt the EFI OS Loader and direct execution to the "legacy" loader?

 

If it really exists, as what we think now (I mean if it is not an already included feature) then CSM has to start up early, in order to handle the compatibility. That would be the point, where the EFI image loads. First possibility is that CSM is included in the image, .. brrb, no it HAS to be at this point. No other way, imho.

Link to comment
Share on other sites

If it really exists, as what we think now (I mean if it is not an already included feature) then CSM has to start up early, in order to handle the compatibility. That would be the point, where the EFI image loads. First possibility is that CSM is included in the image, .. brrb, no it HAS to be at this point. No other way, imho.

 

What is this "image"? Something loaded from firmware? That would might make sense.

 

~~~~~~~~~~~~~~~~~~~~~~~~~~~

 

I am looking for a specific CSM diagram that I saw before, but just ran across this. It is interesting and answers some of my questions, specifically it shows the co-existance of Legacy ROM (BIOS) and EFI, and also seems to state that the EFI-ROM is the same for IA32 and Itanium (but perhaps I am misinterpreting that part?)

 

EDIT: :excl: This might only pertain to devices like ATI video cards! But implies the new EFI-ATI cards also support BIOS system :excl:

 

However, this may be for "UGA" mode only.

 

But I will get back to it later:

 

rom9hd.jpg

Edited by bofors
Link to comment
Share on other sites

:excl: But it EFI so "supersimple" that we can write an EFI application that acts like a CSM?

 

Every EFI app it is written in C. Maybe it is just some modification. (hopefully) :excl:

 

What is this "image"? Something loaded from firmware? That would might make sense.

 

Yes, if we are on the right path here, it would be 100% firmware. Like the image that you can boot from intel.

 

 

@kinkadius:

 

just recieved the proof, that elilo is NOT running with OSX EFI out of the box. :excl: But they are willing to cooperate, as it seems: http://sourceforge.net/forum/forum.php?thr...forum_id=317083

Link to comment
Share on other sites

I am still looking for the CSM-EFI diagram that I saw before, I think on one the BIOS-vendors pages. But I just found this which has some potential useful intformation:

 

...

 

What is Aptio?

AptioTM is a complete next-generation BIOS solution from American Megatrends. Based on two decades of experience in

BIOS & firmware, AMI has developed a complete firmware solution around the Framework.

•Firmware Components - drivers & modules that conform to the Framework specifications

•Compatibility Support Module (CSM) - backwards compatibility with legacy OS & applications

•Development Tools - advanced development environment for the next-generation of BIOS

•Support Tools - firmware management for the end-user & manufacturing line

•PreBoot Applications (PBA) - value-add enhancements in the pre-OS space

 

...

 

Does an EFI implementation have to use Intel's EFI “Framework”?

No. Any firmware solution can implement a firmware interface based on the EFI Specification. AMI offers two other

solutions based on the EFI Specification that do not rely on the EFI Framework: AMI's Enterprise64 firmware for the

Intel Itanium architecture and the EFI32 eModule for AMIBIOS8.

 

...

 

How did AMI create their Compatibility Support Module (CSM)?

The AMI CSM implementation is based on AMIBIOS8TM, which incorporates the proven technology of previous AMIBIOS®

releases along with support for the latest features.

Runtime services such as interrupt functions and data areas are provided by AMIBIOS8 code while platform initializa-

tion, ACPI functions & SMBIOS data are provided by firmware in the EFI Framework.

 

http://www.ami.com/support/downloaddoc.cfm....pdf&FileID=630

Edited by bofors
Link to comment
Share on other sites

I am looking for a specific CSM diagram that I saw before, but just ran across this.

 

lol, it seems that the NASA uses CSM, too if you do a google picture search on it :excl:.

 

But finally, I found this:

 

insyde_h20.jpg

 

but this tells us nothing about the boot chain. it just sais that the OS is exchanging stuff with the CSM.

But that is what we already know, because the OS is exchanging everything with EFI.

Edited by xtraa
Link to comment
Share on other sites

EDIT: I now see that Xtraa beat me to it.

 

Ok, here is one CSM diagram (I though there was another with more detail, maybe I am mistaken):

 

152_archi.JPG

 

NOTE: "BRD" == "BIOS Replacement Drivers"

 

Unlike traditional 16-bit real mode BIOS technology, InsydeH2O BRD (BIOS Replacement Drivers) runs in 32-bit flat mode. Yet, despite the modern software technologies InsydeH2O CSM (Compatibility Support Module) still provides all the necessary backwards compatibility including the run-time BIOS interface, support for option ROMs and USB legacy features.

 

http://www.insydesw.com.tw/en/Ps.asp?id=167&from=adm

 

I think we should try to determine who wrote the Gateway EFI (w/ CSM).

Edited by bofors
Link to comment
Share on other sites

I am looking through these "presentations" here starting from the top and going down:

 

http://www.intel.com/technology/framework/presentations.htm

 

This say that the "Non-BIOS Code + CSM" fit into the 4Mb Flash EEPROM. So, I am think it is becoming clear that a CSM is a "series of driver (which replace legacy drivers) and also something that is flashed into firmware. What is the purpose of the CSM-firmware element? Why is it needed, what does it do?

 

Otherwise, where does the BIOS firmware exist? Someplace outside of the 4Mb EEPROM?

 

Page 17:

ftp://download.intel.com/technology/frame...map_EFIS001.pdf

 

csm48sa.jpg

Edited by bofors
Link to comment
Share on other sites

This one shows the relationship of the CSM to the DXE Foundation, which clearly is the certainly component in the EFI sytsem, touching everthing but the legacy OS loader and legacy option ROMs.

 

I do not sure what DXE even stand for at this point, but it might be Driver Execution Environment. This needs to be checked in detail and well and the relationship between DXE and the PEI (Pre-EFI Intialization) Framework:

 

Page 15: ftp://download.intel.com/technology/frame...map_EFIS001.pdf

 

csmdxe0ta.jpg

 

Ok, now we getting somewhere. My question now is where exactly does a CSM fit into this diagram (and precisely how does it operate):

 

 

 

Page 3: ftp://download.intel.com/technology/frame...yde_EFIS004.pdf

 

bootprocess3bb.jpg

 

Ok, this the good {censored} is here:

 

"BIOS Compatibility within the Intel® Platform Innovation Framework for EFI - Intel Corporation and American Megatrends Inc."

 

ftp://download.intel.com/technology/frame...BiosCompS13.pdf

 

Page 9: Supra

 

bios2csm0fq.jpg

 

Page 11: Supra

 

csmfit5xe.jpg

Edited by bofors
Link to comment
Share on other sites

The critical detail below is the EFI Driver Dispatcher calls the "CSM Aware Boot Manager" instead of the regular EFI "Boot Manager". The Legacy CSM Driver(s) role and where they are stored is unclear to me.

 

P: 13, Supra

 

intecsm7eq.jpg

 

Below the "BDS is the "Boot Selection Device" which I think is the same thing as the "CSM Aware Boot Manager" triggered by it:

 

P: 23, supra:

 

csmimp4ct.jpg

Link to comment
Share on other sites

I am sorry if anybody is pissed off that I posted this stuff here, in hindsight perhaps I should have created a CSM thread. Anyways, I done for now and here are my final thoughts before I rest:

 

(1) The EFI system may be flexible enough implement a "poor man's" CSM strickly through software that does useful things on EFI-Macs like boot BIOS operating system. I think the BIOS code be store on disk and read by the EFI system.

 

(2) I do not understand how to intergrate a real Boot ROM like Apple's with EFI. But a similiar approach could be taken whereas, Apple's EFI-Boot Rom could be stored on disk and loaded with the "poor man's" CSM described above.

 

I know that I have taken this thread off track, but I think it was on the right track. The goal should be to boot EFI, both on PC's and Mac's, and then load soft-copy of a firmware (either BIOS or Apple's Boot ROM) and then call the appropriate "boot manager". I am much less interested in getting the Gateway EFI (w/CSM) implementation now.

Edited by bofors
Link to comment
Share on other sites

I think we should start looking at the ELILO: EFI Linux Boot Loader source code. That is basically what we want to copy. We want to make some EFI Boot Loaders, perhaps one for OS X 10.4.4, one for Windows XP and one for DOS.

 

But I do not understand why ELILO would not work to the load and execute the linux kernel. Perhaps that Linux install would have to be been formated correctly (not HFS) and added to some EFI GUID Partition Table (GPT), but there is no reason why it should not work.

 

Perhaps kinkadius would like to try?

 

 

~~~~~~~~~~~~~~~~~~~~~~~~~~

 

The ELILO source (elilo-3.6.src.tgz) is avalible here:

 

http://sourceforge.net/project/showfiles.php?group_id=91879

 

It contains about ten documentation texts files like this:

 

--------------------------------------------------------------------

ELILO.EFI: Linux boot loader for EFI/IA-64 and EFI/IA-32 based systems

--------------------------------------------------------------------

Stephane Eranian <eranian@hpl.hp.com>

 

August 2003

 

Copyright © 2000-2003 Hewlett-Packard Co.

 

 

I/ Introduction

------------

 

This document describes how to use ELILO on for both IA-64 and IA-32 EFI-based platforms.

This document describes ELILO version 3.4.

 

II/ Command line options

--------------------

 

elilo [-hDpPVvaE] [-d nsec] [-C config] [-i initrd] [-c chooser] [kernel [kernel options...]]

 

...

 

 

This might be the main file:

/*
*  Copyright © 2001-2003 Hewlett-Packard Co.
*	Contributed by Stephane Eranian <eranian@hpl.hp.com>
*
* This file is part of the ELILO, the EFI Linux boot loader.
*
*  ELILO is free software; you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation; either version 2, or (at your option)
*  any later version.
*
*  ELILO is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with ELILO; see the file COPYING.  If not, write to the Free
*  Software Foundation, 59 Temple Place - Suite 330, Boston, MA
*  02111-1307, USA.
*
* Please check out the elilo.txt for complete documentation on how
* to use this program.
*/

#include <efi.h>
#include <efilib.h>

#include "elilo.h"
#include "loader.h"

extern loader_ops_t plain_loader;
extern loader_ops_t gzip_loader;

static loader_ops_t *ldops_list;

loader_ops_t *
loader_probe(CHAR16 *kname)
{
loader_ops_t *ops;

for (ops= ldops_list; ops; ops = ops->next) {
	if (ops->ld_probe(kname) == 0) {
		return ops;
	}
}
return NULL;
}

INTN
loader_register(loader_ops_t *ldops)
{
if (ldops == NULL) return -1;

/* cheap sanity check */
if (ldops->next) {
	ERR_PRT((L"loader %s is already registered", ldops->ld_name));
	return -1;
}

ldops->next = ldops_list;
ldops_list  = ldops;

VERB_PRT(3, Print(L"New loader registered: %s\n", ldops->ld_name));

return 0;
}

 

Really, there is not much to ELILO at all, it looks pretty good for out purposes. We just need to convert it to load and execute other OS's besides Linux.

Edited by bofors
Link to comment
Share on other sites

THANK YOU!

and if i may ask, which scripts did you execute to make it?

 

I used floppy image which was posted somewhere on osx86project forum

and I have copyed some files from framework(mainly efi test aplications and documentation)

I don't realy know what scripts do you have on mind...

Link to comment
Share on other sites

THANK U !

And can u updata the boot cd zip to rapidshare.de.the one too slow to me can't download.

 

thank again!

 

Please see original post, I have just edited it.. mytempdir & rapidshare added

(rulez.sk removed - too many downloads)

Link to comment
Share on other sites

 Share

×
×
  • Create New...