Jump to content

How to boost the OS X boot process...


1,027 posts in this topic

Recommended Posts

I have explicit instructions not to use other peoples source code, and dad is right about one thing because a simple copy/paste fix won't bring me anything... so I won't. Thanks anyway.

 

I just noticed your new avatar. Well done. Bit of work I imagine, but now I know where to look for :)

Yeah, that thought did cross my mind so fair enough. The new avatar took seconds to create on the website though I haven't looked that young since before the dawn of time... ;)

Link to comment
Share on other sites

The new avatar took seconds to create on the website though I haven't looked that young since before the dawn of time... :)

I agree - Nice avatar :)

I've often admired those.. can I ask which website you get them from?

 

That fixes it - well done :)

Right - I'll try booting..

Latest boot progress report:

(rootUUID == NULL) false

 

Here's a picture of the debug output.

post-331032-1293990661_thumb.jpg

It does flick to finalizeEFITree-5 briefly before I get to see the multicoloured blocks.

Link to comment
Share on other sites

Not NULL because you have set it in c.a.B.plist We'll get it going, eventually.

okay.

 

Would you mind turning debug info on for the ACPI patcher?

Yep - thought of that a minute ago and rebooted with it for you. Sorry.. (so many directives to remember :))

Here you go.. (looks like success)..

 

post-331032-1293991349_thumb.jpg

Link to comment
Share on other sites

Not NULL because you have set it in c.a.B.plist We'll get it going, eventually.

 

 

Would you mind turning debug info on for the ACPI patcher?

 

And fix this stupid little typo:

		acpiTableAlias = "ACPI_10";
-		acpiTableEFIGUID = acpi20TableEFIGUID;
+		acpiTableEFIGUID = acpi10TableEFIGUID;
}

Done - I'll try a reboot now - and without the UUID in c.a.B.p.

 

But the length is wrong. We need to fix that.

Okay - let me know, when you know :)

Link to comment
Share on other sites

Cool - trying it now.

 

Okay - I have this is patcher.h

	// ACPI 1.0 compliance requires some changes, or it won't even boot.
if (rsdp->Revision == 0)
{
	rsdp->Length = 20;
	addressWidth = 4;
	acpiTableAlias = "ACPI_10";
	acpiTableEFIGUID = acpi10TableEFIGUID;
}

But I get the same result as before making the change?

rsdp->Revision   :0
rsdp->RsdtAddress: 0xdfee3040
rsdp->Length	 : 0xdfee3040
rsdp->XsdtAddress: 0xdfee30c0

Link to comment
Share on other sites

Yeah I'm also bound to quit. School tomorrow.

As it's a bank holiday here in England tomorrow I just assumed it would be for you too.. silly me.

 

BTW: I don't see messages about actual patching, which means that it skips this if clause:

if (xsdt && (uint64_t)rsdp->XsdtAddress < 0xffffffff && xsdt->Length < 0x10000)

What you can do is to add:

	printf("xsdt->Length: %d\n", xsdt->Length);
sleep(5);

above this line, but I think that we need to make more changes. Unfortenately I have ran out of time and thus see you next time.

You're right.. my DSDT is not actually loaded, I was just happy in that you have now enabled the code the successfully boot in to my OS X system with #define PATCH_ACPI_TABLE_DATA and #define LOAD_DSDT_TABLE_FROM_EXTRA_ACPI both set to 1 where before enabling those options caused the boot to fail.

 

I've added the above line and the xsdt->Length is reported as 244

 

Thanks for your great help!!!

You're welcome. I've enjoyed working on something different.

Link to comment
Share on other sites

Mine is ACPI 1.0

 

mine too:

/*
* Intel ACPI Component Architecture
* AML Disassembler version 20091112
*
* Disassembly of /Users/scriz/Downloads/Sessions/2010-12-09-023724/dsdtORIGINALE ZOTAC.aml, Thu Dec  9 02:48:24 2010
*
*
* Original Table Header:
*	 Signature		"DSDT"
*	 Length		   0x00007610 (30224)
*	 Revision		 0x01 **** ACPI 1.0, no 64-bit math support
*	 Checksum		 0x21
*	 OEM ID		   "NVIDIA"
*	 OEM Table ID	 "NVDAACPI"
*	 OEM Revision	 0x00001000 (4096)
*	 Compiler ID	  "INTL"
*	 Compiler Version 0x20100702 (537921282)
*/
Link to comment
Share on other sites

BTW: I don't see messages about actual patching, which means that it skips this if clause:

if (xsdt && (uint64_t)rsdp->XsdtAddress < 0xffffffff && xsdt->Length < 0x10000)

What you can do is to add:

	printf("xsdt->Length: %d\n", xsdt->Length);
sleep(5);

above this line, but I think that we need to make more changes. Unfortenately I have ran out of time and thus see you next time.

 

My DEBUG

boot0: GPT
boot0: testing
boot0: done
boot1: /bootBIOSDev :128
gArchCPUType (CPU):i386
gBootVolume:hd (0,1)
byChain -1:hd (0,1)
rootVolume:hd (1,2)
byChain:hd (0,1)
Setting mayUsePreLinkedKernel to false
Load Kernel:mach_kernel
Sleeping for 5 seconds
execkernel-0
execkernel-1
Kernel header data,
================================
Signature:0xfeedface
CompressType:0x00000007
adler32:0x00000003
uncompressed size: 0x00000002
compressed size:0x00000012
platformName:
rootpath: ♀
Press a key

execkernel-2
execkernel-3
execkernel-4
finalizingEFITree-1
finalizingEFITree-2
No SMBIOS replacement found
finalizingEFITree-3
finalizingEFITree-4
Entering setupACPI ()
getACPIBaseAddress () returned (0x000f03c0)
rsdp->Revison : 2
rsdp->RsdtAddress : 0x7f610f10
rsdp->Length:0x00000024
rsdp->XsdtAddress: 0x7f60ff10

sleeping for 5 seconds ….
We have 7 XSDT enteries to work with

Found tableSignature(1) :   FACP
Fixing the restart vector
Found tableSignature(2) :   APIC
Found tableSignature(3) :   MCFG
Found tableSignature(4) :   SLIC
Filtering out table: SLIC (Unused)
Found tableSignature(5):   SSDT
Found tableSignature(6):   SSDT
Found tableSignature(7):   SSDT

Recalculating checksums / Adding ACPI_10 to the tree
Will exit setupACPI() in 10 seconds
finalizingEFITree-5
execkernel-5
execkernel-6
execkernel-7 / gVerboseMode is true
sleeping for 6 seconds

 

Still no boot for me yet, after the 6 seconds at end of debug I go to grey screen and apple no throbber. (which BTW is off centre so there is a resolution issue to solve at some point)

 

@blackosx great you got to boot :( I thought mine might after you did as I can normally boot without dsdt also. Maybe your tricked bios helping!

 

(dutchhockeypro @ Jan 2 2011, 07:08 PM)

Yeah I'm also bound to quit. School tomorrow.

As it's a bank holiday here in England tomorrow I just assumed it would be for you too.. silly me.

Wish I was back at school. Bank Holiday for me also. Back to the toil tomorrow.

Link to comment
Share on other sites

We have to replace the new line with rsdpLength = 20; and replace rsdp->Length in two other place (use search) with the new variable which we'll define as int rsdpLength = rsdp->Length; and put right below int addressWidth = 8;. Now we have something we can adjust.

 

p.s. rsdpLength = 36 here. You may need that instead because I do not know where the old value (20) is coming from.

I looked in to the rdsp length and for ACPI v1.0 it should equal 20, and for ACPI v2.0 it should equal 36. Source

 

My DEBUG

.....

Hi DB1 - I'm looking at your posted DEBUG output and I see some differences to mine.

* rootvolume: hd(1,2) (Does revolution correctly detect the location of your OSX Volume? - I don't see rootvolume in my Debug) EDIT: - Did you add this code to find out if the UUID is detected?

* rsdp->Revison : 2 (I think that means you have ACPI v3.0 source)

* rsdp->Length:0x00000024 ( I guess that's correct for ACPI v3.0?)

* The booter is detecting 7 ACPI tables (7 XSDT entries) for you - I guess this is a good thing..(It doesn't detect any for me)

 

@blackosx great you got to boot :thumbsup_anim: I thought mine might after you did as I can normally boot without dsdt also. Maybe your tricked bios helping!

I used to be able to boot my OS X system with the standard Gigabyte BIOS without using a patched DSDT. The only side affect was I would suffer the CMOS reset bug due to the incorrect Device RTC Length (and of course all of the other non-Mac OS friendly Gigabyte code - but still it booted). So maybe I could still boot Revolution with an unmodified BIOS? Just a guess... But as the current version of the Revolution code here still doesn't load my DSDT.aml then the only things that are allowing it to boot my system is the UUID value in the kernel flags of my c.a.B.p. (I think)

 

Wish I was back at school. Bank Holiday for me also. Back to the toil tomorrow.

Lol... yeah.. I was playing ZX Spectrum games back then.. :)

Link to comment
Share on other sites

Hi DB1 - I'm looking at your posted DEBUG output and I see some differences to mine.

* rootvolume: hd(1,2) (Does revolution correctly detect the location of your OSX Volume? - I don't see rootvolume in my Debug) EDIT: - Did you add this code to find out if the UUID is detected?

* rsdp->Revison : 2 (I think that means you have ACPI v3.0 source)

* rsdp->Length:0x00000024 ( I guess that's correct for ACPI v3.0?)

* The booter is detecting 7 ACPI tables for you - It doesn't detect any for me.

 

Lol... yeah.. I was playing ZX Spectrum games back then.. :thumbsup_anim:

 

Hi blackosx - Yes does locate my root volume but it may be being helped by that being identified in caBp, I cannot try it without at the moment because her in doors is on the netbook.

Yeah I thought that strange Rev 2 and the length, the extracted dsdt and linux acpi dumps previous all show ACPI 1.0! Don't understand why your not getting the ACPI table detection.

doesn't load my DSDT.aml then the only things that are allowing it to boot my system is the UUID value in the kernel flags of my c.a.B.p. (I think)

 

When i can get back on the netbook I'll try UUID to see if I can get a boot.

 

 

ZX Spectrum! - sad old git I am can remember pong

 

EDIT

 

Tried with UUID in caBp still no boot. Took out default partition form caBp and Revolution still finds root partition (SD card)

 

EDIT 2

 

Just realised I missed something in my debug output: XSDTLength : 92

Link to comment
Share on other sites

ZX Spectrum! - sad old git I am can remember pong

Pong!.. now that's old - old but still a classic Lol ;)

 

@DHP - You're welcome with the source and thanks for letting me know why the booter doesn't doesn't detect the ACPI tables.

p.s. PS3's might be all the rage but sometimes fancy graphics doesn't necessarily equal a good game. :)

 

I attempted to create a separate SSDT for my GFX earlier, convert it to a struct and add it to /acpi/static_data.h. It's the only thing left to get running when I boot from Revolution. It didn't work though and I'll get round to trying again in future.

Link to comment
Share on other sites

I attempted to create a separate SSDT for my GFX earlier, convert it to a struct and add it to /acpi/static_data.h. It's the only thing left to get running when I boot from Revolution. It didn't work though and I'll get round to trying again in future.

 

Tried EFIstring in caBp?

Link to comment
Share on other sites

Okay.. Thanks for the confirmation and happy frenching.. au revior

 

I'm playing with that avatar generator to keep up with everybody else here.. (so I might have a new avatar soon.. if I like the result.. he he)

 

Which one?

Link to comment
Share on other sites

Which one?

http://faceyourmanga.com/faceyourmanga_eng.html

 

Nice one DB1 ;)

I edited mine in Photoshop to continue my perfecto theme.

 

ps. sorry for going off topic here DHP..

 

Thanks. And here are two SSDT examples, which might be helpful for you.

Thanks for the examples - I'll have a look at them.

For my earlier attempt I looked at the reference one MC posted in the first post.

Link to comment
Share on other sites

http://faceyourmanga.com/faceyourmanga_eng.html

 

Nice one DB1 :)

I edited mine in Photoshop to continue my perfecto theme.

 

Thanks for the link. Obviously you like a bit of Oaky.

 

Just had a thought loading by SD card may be one of my problem especially as the OS does not detect it as a USB SD card reader, however have sorted it so it does detect now but makes no difference.

 

Nice job on the avatar

Link to comment
Share on other sites

Thanks for the link. Obviously you like a bit of Oaky.

Yeah - Used to love his music big time and still listen to some of it now and then (although the Foo Fighters are on at the moment).

 

Just had a thought loading by SD card may be one of my problem especially as the OS does not detect it as a USB SD card reader, however have sorted it so it does detect now but makes no difference.

Good thinking.. though hopefully DHP can throw some light on your problem soon. Then we can all progress together.

 

Nice job on the avatar

Cheers.. They somehow give us all more of a personality.. (I think?)

Link to comment
Share on other sites

@DHP - I've been playing further with my SSDT GPU addition and I've come to the conclusion that it doesn't work on my system as the booter doesn't enter the following code within /acpi/patcher.h

	if (xsdt && (uint64_t)rsdp->XsdtAddress < 0xffffffff && xsdt->Length < 0x10000)
{
...

and therefore doesn't reach:

#if STATIC_GPU_TABLE_INJECTION
				xsdt_entries[i - dropoffset] = (uint32_t)customSSDT_GPU;

I know you're busy and this isn't really a priority but maybe it's something that's being fixed in relation to the ACPI v1.0 support?

Link to comment
Share on other sites

ZX Spectrum! - sad old git I am can remember pong

 

ZX Spectrum? That were luxury, I had to make do wi' pebbles from gutter, and that were on a good day...

 

DB1 and BlackOSX, I like your new avatars, they do give us more of an identity. Sorry I can't contribute much to the thread at the moment as I'm no coder. I'll help when I can.

Link to comment
Share on other sites

Hi dgsga

 

Pebbles?.. lol, you're funny :) and it was you that gave me the inclination to search for the avatar designer after you created a new one.. so thank you.

 

As for contributing here, no need for apologies. We are all learning as we go so chip in when you can. I have no doubt that dutchhockeypro can benefit from any feedback we give.

Link to comment
Share on other sites

I haven't yet done the last modifications but i've added my dsdt in libsaio/acpi/static_data.h and addded:

#define STATIC_DSDT_TABLE_INJECTION 1

in libsaio/acpi_patcher.c

and I've the base address (0xf7d40) in private data with my smbios data

 

acpi_patcher.c options:

#define STATIC_ACPI_BASE_ADDRESS 1

#define PATCH_ACPI_TABLE_DATA 1 // Must be set to 1 !!!

#define DROP_SSDT_TABLES 0 // Defaults to off.

#define STATIC_APIC_TABLE_INJECTION 0

#define STATIC_SSDT_PR_TABLE_INJECTION 0

#define STATIC_SSDT_USB_TABLE_INJECTION 0

#define STATIC_DSDT_TABLE_INJECTION 1 //Added by scrax

#define STATIC_ATI_TABLE_INJECTION 0

#define LOAD_DSDT_TABLE_FROM_EXTRA_ACPI 0

#define LOAD_SSDT_TABLE_FROM_EXTRA_ACPI 0

#define DUMP_ADDRESS 0

boot.c options:

#define DEBUG 1

 

 

I have this dump:

 

post-464373-1294164484_thumb.jpg

and then a: can't find smbios sobstitute message just before that coloured screen:

 

 

in the dsdt I have also the code for the graphic card.

post-464373-1294164547_thumb.jpg

 

This is my diskutil list:

 

 

/dev/disk0
  #:					   TYPE NAME					SIZE	   IDENTIFIER
  0:	  GUID_partition_scheme						*1.0 TB	 disk0
  1:						EFI						 209.7 MB   disk0s1
  2:				  Apple_HFS ScraxMac				100.0 GB   disk0s2
  3:				  Apple_HFS Data					876.0 GB   disk0s3
  4:				  Apple_HFS Test					23.6 GB	disk0s4
/dev/disk1
  #:					   TYPE NAME					SIZE	   IDENTIFIER
  0:	  GUID_partition_scheme						*128.0 GB   disk1
  1:	   Microsoft Basic Data EFI					 209.7 MB   disk1s1
  2:				  Apple_HFS Gskill				  115.0 GB   disk1s2
  3:				  Apple_HFS Mac OS X Install DVD	12.6 GB	disk1s3

 

I don't know why my working install on the Gskill has a "Microsoft Basic Data EFI" instead of a "EFI" volume but it's related to my test on the chameleon installer.

 

Revolution is installed on ScraxMac (my test installation)

 

Note on disk0s4 there is another installation of Chameleon used for test. Could be better if I reinitialize it?

 

I'll try to ad the last changes and report back how it goes.

Link to comment
Share on other sites

hi dutchhockeypro,

 

i checked kextcache_main.c, and you were right, "boot-device-path" can be a string, i would even say that it must be a string,

but maybe "boot-device-path" is used for another boot process which need a device patch ???

 

but a better approach might come from Apple themselves, just by using "boot-kernelcache-adler32" if exist, i have slicely modified kextcache_main.c to support it, tell me what you think :)

 

 

Link to comment
Share on other sites

 Share

×
×
  • Create New...