trouble about trusted grub, help me please!!!

2009-01-11 Thread 洪鱼儿
hi,   I am trying to make trusted grub work (refer to
http://trousers.sourceforge.net/grub.html) in my linux system with kernel
2.6.27.10 and TPM chip 1.2, but i failed. What i had done is the following:

   (1) got the grub-0.27.patch from
http://trousers.sourceforge.net/grub.html
   (2) patch grub-0.27.patch into my grub-0.27.src.rpm source package
   (3) running "rpmbuild -bb  grub.spec"
   (4) running "rpm -Uvh grub-0.27.i386.tcg.rpm" and running "setup" command
in the GRUB shell
   (5) add the measure boot parameter such as "measure (hd0,6)/etc/fs"
   (6) lastly, reboot the system

   but the following error arised:

   "measure (hd0,6)/etc/fs" : Invalid argument.

   Could you tell me how to resolve the problem?

   xueyu.hong
   yuemaill...@gmail.com
___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


EFI through virtualization?

2009-01-11 Thread Jerone Young
You guys wouldn't happen to know any good ways to test out EFI through
virtualization. I see some Qemu stuff that is rather old. But I'm not too
trusting of it's funcationality now. I'd like to play around and test/debug
some of the grub2 efi support, without having to buy a Mac. Any ideas?
___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: EFI Boot on MacPro

2009-01-11 Thread Bean
On Mon, Jan 12, 2009 at 12:00 AM, peter cros  wrote:
> It is here - (return  checked in refit efi shell and gui)
> Can't go any further until that is fixed.
>
> kern/x86_64/efi/startup.S
> ---
>
> This hangs -
>
> codestart:
> movq%rcx, EXT_C(grub_efi_image_handle)
> movq%rdx, EXT_C(grub_efi_system_table)
>  +ret
> callEXT_C(grub_main)
> ret
> -
>
> This returns -
>
> codestart:
>  +ret
> movq%rcx, EXT_C(grub_efi_image_handle)
> movq%rdx, EXT_C(grub_efi_system_table)
> callEXT_C(grub_main)
> ret
> --
>
> Would really like to see the solution for the imac8,1.

Hi,

This is quite strange, it might be caused by the compiler. You can try
my version of grub.efi:

http://grub4dos.sourceforge.net/grub.zip

-- 
Bean


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: EFI Boot on MacPro

2009-01-11 Thread peter cros
It is here - (return  checked in refit efi shell and gui)
Can't go any further until that is fixed.

kern/x86_64/efi/startup.S
---

This hangs -

codestart:
movq%rcx, EXT_C(grub_efi_image_handle)
movq%rdx, EXT_C(grub_efi_system_table)
 +ret
callEXT_C(grub_main)
ret
-

This returns -

codestart:
 +ret
movq%rcx, EXT_C(grub_efi_image_handle)
movq%rdx, EXT_C(grub_efi_system_table)
callEXT_C(grub_main)
ret
--

Would really like to see the solution for the imac8,1.

peter cros


On Sun, Jan 11, 2009 at 6:35 PM, Bean  wrote:

> On Sun, Jan 11, 2009 at 10:44 AM, peter cros  wrote:
> > iMac8,1 - grub.efi x86_64 hangs.
> >
> > built and run on the imac81 --with-platfrom=efi --target=x86_64
> > version 1913 and 1940 (current).
> >
> > Host ubuntu 810 amd64 kernel Linux im64 2.6.27-9-server #1 SMP Thu Nov 20
> > 22:56:07 UTC 2008 x86_64 GNU/Linux
> >
> > grub.efi appears to be accepted by the firmware (started), but hangs
> > immediately without any message.
> > Tried with macosx bless, and with rEFIt, on HD and external usb.
> >
> >  This differs from the 64/32 mismatch behaviour with the refit message
> > 'unsupported while loading grub.efi') or the apple boot default to
> MacOSX.
> >
> > The x86_64 reult is different - bug in the start up?
> >
> > I will try to get some debug info.
>
> Hi,
>
> I only test the x86_64 version in macbook, which works nicely. Perhaps
> you can add some debug code in kern/main.c
>
> void
> grub_main (void)
> {
>  /* First of all, initialize the machine.  */
>  grub_machine_init ();
>
> + grub_env_set ("debug", "all");
> + grub_printf ("init\n");
>
>  /* Hello.  */
>  grub_setcolorstate (GRUB_TERM_COLOR_HIGHLIGHT);
>  grub_printf ("Welcome to GRUB!\n\n");
>  grub_setcolorstate (GRUB_TERM_COLOR_STANDARD);
>
>
> Also, the tsc code may has some effect, remove grub_tsc_init in
> kern/i366/efi/init.c:
>
> void
> grub_machine_init (void)
> {
>  grub_efi_init ();
> -grub_tsc_init ();
> }
>
> --
> Bean
>
>
> ___
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


[PATCH] Fix ATA compatibility mode check

2009-01-11 Thread Christian Franke
For the compatibility mode check, the ATA driver uses the bits in the 
"Revision" byte instead of the "Programming Interface Byte" of the class 
value (See T13/1510D). The compat_use[] flags are never set.


This patch fixes both issues.

Christian

2009-01-11  Christian Franke  

* disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
mode check.  Fix setting of compat_use[].


diff --git a/disk/ata.c b/disk/ata.c
index 6e0b8b8..4ca63c2 100644
--- a/disk/ata.c
+++ b/disk/ata.c
@@ -504,7 +504,7 @@ grub_ata_pciinit (int bus, int device, int func,
   for (i = 0; i < 2; i++)
 {
   /* Set to 0 when the channel operated in compatibility mode.  */
-  int compat = (class >> (2 * i)) & 1;
+  int compat = (class >> (8 + 2 * i)) & 1;
 
   rega = 0;
   regb = 0;
@@ -515,7 +515,7 @@ grub_ata_pciinit (int bus, int device, int func,
 	{
 	  rega = grub_ata_ioaddress[i];
 	  regb = grub_ata_ioaddress2[i];
-	  compat_use[i] = 0;
+	  compat_use[i] = 1;
 	}
   else if (compat)
 	{
___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel