Jump to content

Clover Problems and Solutions


ErmaC
3,206 posts in this topic

Recommended Posts

The difference for example at address 0x3A

Slice, the difference introduced by rev 3444 is that there are some instructions in the code

leal MemoryMap, %edi

leal MemoryMap, %eax

movl %edi, MemoryMapSize # Save the size of the memory map

leal MemoryMapSize(%ebx), %edx # Physical base address of the memory map

 

That refer to MemoryMap and MemoryMapSize, both of which are located AFTER the IDT. Since the IDT got shortened, those memory references moved. That is why you see a change at address 0x3A and 3 others. Those are ok.

 

Please try padding with an extra entry like I suggested. The reason I said this, is that there was padding with an extra entry in CpuInterrupt.S, and I commented it out, because I didn't think it's needed.

But it could be that on some processors, the IDT needs to be padded.

 

BTW, the character 5 is showed on the screen in real mode before GDTR and IDTR are loaded, so why would IDT make a difference??

 

PS (disassemble with ndisasm -b 16.... is best. You can use -e to skip and -o to set origin)

Link to comment
Share on other sites

@Zenith432 I wanted to send you a PM, but it seems like you have disabled receiving such... Sorry for OT:

Did you see that Laszlo replied to your patch mail with a suggested splitting of commits? Hope you are still going to get it merged.

 

Regards,

DF.

Link to comment
Share on other sites

 

Clover3496.

 

I compiled clover 3496 (-t XCLANG,-t XCODE5,-t GCC53),using initially buildExtras.sh in the following systems - OS_X-10.9.5_Xcode6.2, OS_X-10.10.5_Xcode6.4,OS_X-10.11.4_Xcode7.3.

Boot the system  using boot6, boot7, UEFI succeeds.
 
 

 

I once again checked all.

Excuse me! I made a mistake.There are problems with Boot6 when compiling to OSX10.9.5 (Xcode4.6.2) and 10.10.5 (Xcode6.4) if you use the ToolChain XCODE5 . Everything else works.
Link to comment
Share on other sites

Problems as in it's doing...[fill in blanks]...

 

There are problems with Boot6 when compiling to OSX10.9.5 (Xcode4.6.2) and 10.10.5 (Xcode6.4) if you use the ToolChain XCODE5 . Everything else works.

 

Link to comment
Share on other sites

Problems as in it's doing...[fill in blanks]...

I have similar issue Compilling 10.10.5 

UEFI working perfect but Booting ESP Stock at 

 

-

 

Nothing else happened

Link to comment
Share on other sites

The problem could be with size of boot6.
In rev 3447 I added script code to use --std-ebda on-the-fly if the code does not fit in --low-ebda.
The --std-ebda size is until 0x96000.  However, the stage 1 bootloader does not check for ebda-overrun when loading boot6/boot7.

If the ebda on a system extends down under 0x96000, it is corrupted without early detection.

So check the size of the bootfile.  boot7 is smaller because of fewer Dxe.

 

OK, thanks. It may explain why the issue shown on some processor not for all.
I will test  and invite other users to test if this padding will help.


droples, chris1111, please post exact size of your boot6 that doesn't work.

Then please try this....

build with same compiler, but use --genpage option to ./ebuild.sh.  Note size of boot6 with --genpage, then check if it succeeds booting and if you encounter problems.

Link to comment
Share on other sites

 

droples, chris1111, please post exact size of your boot6 that doesn't work.

Then please try this....

build with same compiler, but use --genpage option to ./ebuild.sh.  Note size of boot6 with --genpage, then check if it succeeds booting and if you encounter problems.

Ok this is the boot6

018.png

 

Now test --genpage

 

217.png

 

Is this normal its bif init T  :) not 6

But same result stuck at the same point

-

 

 

EDIT**

this is strange on El Capitan10.11.5 with the same compiler but Xcode 7.3  everything is perfect?

Link to comment
Share on other sites

chris1111, 482816 = 471.5K is the size of --std-ebda.  But if --genpage ('T') does not give error message then ebda-overrun is not the cause of the hang.  It's something else.

What do you mean same compiler and Xcode 7.3?  They're both clang, but newer clang.  Can you upload the non-working boot6? I'll try to see if it hangs on my system too.

Link to comment
Share on other sites

chris1111, 482816 = 471.5K is the size of --std-ebda.  But if --genpage ('T') does not give error message then ebda-overrun is not the cause of the hang.  It's something else.

What do you mean same compiler and Xcode 7.3?  They're both clang, but newer clang.  Can you upload the non-working boot6? I'll try to see if it hangs on my system too.

I mean the script I using for compil

In Yosemite 10.10.5 I need to using Xcode 6.2.3 because if I used the latest thats not working

 

here the boot6

thanks

Link to comment
Share on other sites

The problem could be with size of boot6.

In rev 3447 I added script code to use --std-ebda on-the-fly if the code does not fit in --low-ebda.

The --std-ebda size is until 0x96000.  However, the stage 1 bootloader does not check for ebda-overrun when loading boot6/boot7.

If the ebda on a system extends down under 0x96000, it is corrupted without early detection.

So check the size of the bootfile.  boot7 is smaller because of fewer Dxe.

 

droples, chris1111, please post exact size of your boot6 that doesn't work.

Then please try this....

build with same compiler, but use --genpage option to ./ebuild.sh.  Note size of boot6 with --genpage, then check if it succeeds booting and if you encounter problems.

 

post-617057-0-59419100-1462114390_thumb.jpg

 

post-617057-0-14577100-1462114434_thumb.jpg

Link to comment
Share on other sites

Trying Xcode 7.2

OS X10.10.5

Even with -genpage Build failed

 

clang: error: unable to execute command: Segmentation fault: 11

clang: error: linker command failed due to signal (use -v to see invocation)
make: *** [/users/chris/src/edk2/Build/Clover/RELEASE_XCODE5/X64/Clover/CpuDxe/Cpu/DEBUG/Cpu.dll] Error 254
 
----------------
OS X 10.11.5  no issue for long time ago  :)
Link to comment
Share on other sites

Xcode 7.3

I'm having several of these lines:

d: warning: object file (/Users/Ella/src/edk2/Clover/CloverPackage/sym/build/fdisk440/fdisk.o32) was built for newer OSX version (10.11) than being linked (10.5)
ld: warning: object file (/Users/Ella/src/edk2/Clover/CloverPackage/sym/build/fdisk440/getrawpartition.o32) was built for newer OSX version (10.11) than being linked (10.5)
ld: warning: object file (/Users/Ella/src/edk2/Clover/CloverPackage/sym/build/fdisk440/misc.o32) was built for newer OSX version (10.11) than being linked (10.5)
ld: warning: object file (/Users/Ella/src/edk2/Clover/CloverPackage/sym/build/fdisk440/opendev.o32) was built for newer OSX version (10.11) than being linked (10.5)
ld: warning: object file (/Users/Ella/src/edk2/Clover/CloverPackage/sym/build/fdisk440/part.o32) was built for newer OSX version (10.11) than being linked (10.5)
ld: warning: object file (/Users/Ella/src/edk2/Clover/CloverPackage/sym/build/fdisk440/user.o32) was built for newer OSX version (10.11) than being linked (10.5)
ld: warning: object file (/Users/Ella/src/edk2/Clover/CloverPackage/sym/build/fdisk440/mbr.o32) was built for newer OSX version (10.11) than being linked (10.5)

Is that Ok?

Link to comment
Share on other sites

chris1111, droples: Do you have the latest Patches_from_EDK2 up-to-date?  Building with Xcode < 7.3 requires at least

MdePkg/Include/Base.h

MdePkg/Library/UefiDevicePathLib/DevicePathToText.c

 

to be patched.  Otherwise, it'll fail for sure.

 

The problem is not ebda-overrun.

I'll try the bootfiles you uploaded later.

Link to comment
Share on other sites

chris1111, droples: Do you have the latest Patches_from_EDK2 up-to-date?  Building with Xcode < 7.3 requires at least

MdePkg/Include/Base.h

MdePkg/Library/UefiDevicePathLib/DevicePathToText.c

 

to be patched.  Otherwise, it'll fail for sure.

 

The problem is not ebda-overrun.

I'll try the bootfiles you uploaded later.

I have these patches.

 

post-617057-0-08488000-1462173949_thumb.jpg

 

PS

post-617057-0-53249200-1462176303_thumb.jpg

Link to comment
Share on other sites

I tried the uploaded boot files.
The one from post #686 hangs on blank screen.
The one from post #689 Xcode62 hangs on blank screen.
The one from post *689 Xcode73 works.
 
So it's a different problem.  Since the Xcode 7.3 works, I tend to think it's the VA_LIST problem again.  Can you help me check if this is it as follows:
modify edk2/MdePkg/Include/Base.h like this

 

diff a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h
--- a/MdePkg/Include/Base.h
+++ b/MdePkg/Include/Base.h
@@ -501,7 +501,7 @@ struct _LIST_ENTRY {
 #define VA_COPY(Dest, Start)          __va_copy (Dest, Start)
 
 //#elif defined(__GNUC__) && !defined(NO_BUILTIN_VA_FUNCS)
-#elif defined(USE_CLANG_BUILTIN_VA_LIST) || (defined(__GNUC__) && !defined(__x86_64__))
+#elif 1 // defined(USE_CLANG_BUILTIN_VA_LIST) || (defined(__GNUC__) && !defined(__x86_64__))^M
 //
 // Use GCC built-in macros for variable argument lists.
 //
@@ -521,6 +521,7 @@ typedef __builtin_va_list VA_LIST;
 #define VA_COPY(Dest, Start)         __builtin_va_copy (Dest, Start)
 
 #elif defined(USE_CLANG_BUILTIN_MS_VA_LIST) || (defined(__GNUC__) && defined(__x86_64__) && (GCC_VERSION >= 48))
+#error 1^M
 
   typedef __builtin_ms_va_list VA_LIST;
 

 

don't save it. Just modify it to make a build. Then build boot6 with xcode 7.3, try and see it hangs or gets to the menu. If it gets to the menu, try starting the EFI shell and see if it hangs. Thanks.

 

Update: never mind, I tried it myself with xcode 7.3 - and the boot works ok.  It's some other problem.

Link to comment
Share on other sites

chris1111, droples: Do you have the latest Patches_from_EDK2 up-to-date?  Building with Xcode < 7.3 requires at least

MdePkg/Include/Base.h

MdePkg/Library/UefiDevicePathLib/DevicePathToText.c

 

to be patched.  Otherwise, it'll fail for sure.

 

The problem is not ebda-overrun.

I'll try the bootfiles you uploaded later.

Yes I have the patch_from_edk2 .

 

Everything working perfect inside

El Capitan 10.11.5 the problem is only inside Yosemite 10.10.5

Link to comment
Share on other sites

Everything working perfect inside

El Capitan 10.11.5 the problem is only inside Yosemite 10.10.5

I'll download Xcode 7.2 and try reproduce the problem. It's not high priority to support older build environments though.

BTW, is the hang only with boot6? Does boot7 work with older compiler? (boot7 is -mc --no-usb)

Link to comment
Share on other sites

×
×
  • Create New...