public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5/5] x86_64 EFI support -v3: EFI document
@ 2007-07-31  3:13 Huang, Ying
  2007-07-31  4:40 ` Eric W. Biederman
  0 siblings, 1 reply; 22+ messages in thread
From: Huang, Ying @ 2007-07-31  3:13 UTC (permalink / raw)
  To: ak, akpm, Yinghai Lu, Eric W. Biederman, Randy Dunlap,
	Chandramouli Narayanan
  Cc: linux-kernel

This patch adds document for EFI x86_64 support. The boot parameters
added are documented in Documentation/i386/zero-page.txt. The setup
and operation guide of EFI based system is documented in
Documentation/x86_64/uefi.txt.

Signed-off-by: Chandramouli Narayanan <mouli@linux.intel.com>
Signed-off-by: Huang Ying <ying.huang@intel.com>

---

 i386/zero-page.txt |   18 ++++++++++++++----
 x86_64/uefi.txt    |   42 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 56 insertions(+), 4 deletions(-)

Index: linux-2.6.23-rc1/Documentation/i386/zero-page.txt
===================================================================
--- linux-2.6.23-rc1.orig/Documentation/i386/zero-page.txt	2007-07-30 11:28:45.000000000 +0800
+++ linux-2.6.23-rc1/Documentation/i386/zero-page.txt	2007-07-30 11:29:28.000000000 +0800
@@ -31,11 +31,11 @@
  0xb0 - 0x13f		Free. Add more parameters here if you really need them.
  0x140- 0x1be		EDID_INFO Video mode setup
 
-0x1c4	unsigned long	EFI system table pointer
-0x1c8	unsigned long	EFI memory descriptor size
-0x1cc	unsigned long	EFI memory descriptor version
+0x1c4	unsigned long	EFI system table pointer*
+0x1c8	unsigned long	EFI memory descriptor size*
+0x1cc	unsigned long	EFI memory descriptor version*
 0x1d0	unsigned long	EFI memory descriptor map pointer
-0x1d4	unsigned long	EFI memory descriptor map size
+0x1d4	unsigned long	EFI memory descriptor map size*
 0x1e0	unsigned long	ALT_MEM_K, alternative mem check, in Kb
 0x1e4	unsigned long	Scratch field for the kernel setup code
 0x1e8	char		number of entries in E820MAP (below)
@@ -87,3 +87,13 @@
 0x2d0 - 0xd00		E820MAP
 0xd00 - 0xeff		EDDBUF (edd.S) for disk signature read sector
 0xd00 - 0xeeb		EDDBUF (edd.S) for edd data
+
+Changes for x86_64 implementation:
+---------------------------------
+For alignment purposes, the following parameters are rearranged.
+
+0x1b8	unsigned long	EFI system table pointer
+0x1c0	unsigned long	EFI Loader signature
+0x1c4	unsigned long	EFI memory descriptor size
+0x1c8	unsigned long	EFI memory descriptor version
+0x1cc	unsigned long	EFI memory descriptor map size
Index: linux-2.6.23-rc1/Documentation/x86_64/uefi.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.23-rc1/Documentation/x86_64/uefi.txt	2007-07-30 11:29:28.000000000 +0800
@@ -0,0 +1,42 @@
+General note on [U]EFI x86_64 support
+-------------------------------------
+
+This provides documentation on [U]EFI support for x86_64 architecture.
+The nomenclature EFI and UEFI are used intechangeably in this document.
+
+Although the tools below are _not_ needed for building the kernel,
+the needed bootloader support and associated tools for x86_64 platforms
+with EFI firmware and specifications are listed below.
+
+1. UEFI specification:  http://www.uefi.org
+
+2. Booting EFI64 enabled kernel requires boot loader support.
+Patches to elilo and gnu-efi library with x86_64 support and documentation
+have been submitted to respective project maintainers.
+	elilo: http://sourceforge.net/projects/elilo
+	gnu-efi library: http://sourceforge.net/projects/gnu-efi/
+	gnu-efi-3.0d release now supports [U]EFI x86_64.
+
+3. The tool to convert ELF to PE-COFF image:
+	binutils-2.17.50.0.14 supports Intel64 EFI.
+	see http://www.kernel.org/pub/linux/devel/binutils/
+	[ elilo/gnu-efi with x86_64 support need this binutils support ]
+
+4. x86_64 platform with EFI/UEFI firmware.
+
+Mechanics:
+---------
+- Apply the EFI64 kernel patches and build with the following configuration.
+	CONFIG_EFI=y
+	EFI_FB=y
+	CONFIG_FRAMEBUFFER_CONSOLE=y
+	CONFIG_EFI_VARS=y
+
+- Create a VFAT partition on the disk
+- Copy the following to the VFAT partition:
+	elilo bootloader with x86_64 support and elilo configuration file
+	efi64 kernel image and initrd. Instructions on building elilo
+	and its dependencies can be found in the elilo sourceforge project.
+- Boot to EFI shell and invoke elilo choosing efi64 kernel image
+- On UEFI2.0 firmware systems, pass vga=normal for boot messages to show up
+  console. You can pass along the 'resume' boot option to test suspend/resume.

^ permalink raw reply	[flat|nested] 22+ messages in thread
* Re: [PATCH 5/5] x86_64 EFI support -v3: EFI document
@ 2007-08-09  9:47 Etienne Lorrain
  2007-08-09 10:51 ` Andi Kleen
  0 siblings, 1 reply; 22+ messages in thread
From: Etienne Lorrain @ 2007-08-09  9:47 UTC (permalink / raw)
  To: linux-kernel; +Cc: ebiederm, ak

Eric W Biederman wrote:
> >> This is the classic skip the 16bit code and enter the kernel
> >> in 32bit mode filling in the fields that the 16bit mode code would
> >> have filled in the same way approach.
> > ......
> >
> > For in tree code it can be just updated. But weirdo-EFI-boot loader
> > cannot.
>
> So far the logic has been.
>
> Inspect bzImage.  And get boot protocol version.
> If field we need for returning data is not supported do not give
> data.  Or something like that.  Usually the fields always exist
> and you can just fill them in and we only append to the boot
> protocol structure.
>
> In practice this has been working for the last 7 years or so,
> for EFI, and LinuxBIOS, and kexec, and Gujin and I don't remember what
> else.

 Note that Gujin has a simple problem by using that 32 bits entry point:
there is no way to detect if the bzImage is compiled for 32 bits or 64 bits,
and Linux-real-mode calls a BIOS service for 64 bits only (to tell the BIOS you
are going to 64 bits - interrupt not really documented).
 Gujin can now be set to start at the 16 bits entry point, and load ELF32/ELF64
where you now the target word size, but the 32 bits entry point will "forget"
to call that service if the Linux kernel is 64 bits.
 The 32 bits entry point can still be used (-p parameter of tiny.exe) because
there seems to be a problem using the 16 bits entry point under DOS, at least
the old assembly version of the code - no more details known.

 Etienne.


      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2007-08-10 13:03 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-31  3:13 [PATCH 5/5] x86_64 EFI support -v3: EFI document Huang, Ying
2007-07-31  4:40 ` Eric W. Biederman
2007-07-31  6:58   ` Huang, Ying
2007-08-01 17:16     ` Eric W. Biederman
2007-08-07  9:29       ` Huang, Ying
2007-08-07  9:54         ` Andi Kleen
2007-08-08  8:18           ` Huang, Ying
2007-08-08 10:08             ` Andi Kleen
2007-08-08 13:46               ` Huang, Ying
2007-08-08 14:09                 ` Andi Kleen
2007-08-08 15:11                   ` huang ying
2007-08-08 16:23                     ` Andi Kleen
2007-08-08 16:10               ` Eric W. Biederman
2007-08-08 16:22                 ` Andi Kleen
2007-08-08 17:17                   ` Eric W. Biederman
  -- strict thread matches above, loose matches on Subject: below --
2007-08-09  9:47 Etienne Lorrain
2007-08-09 10:51 ` Andi Kleen
2007-08-09 14:09   ` huang ying
2007-08-09 16:29     ` H. Peter Anvin
2007-08-09 17:01     ` Andi Kleen
2007-08-09 17:25       ` H. Peter Anvin
2007-08-10 13:03       ` Huang, Ying

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox