Jump to content

VESA 3 fix for boot sector.


trac
 Share

100 posts in this topic

Recommended Posts

Hi!

 

I managed to track down the cause of the reboot with Darwin 8.0.1 Images (could be the prob of others too). The problem is that

a subfunction uses SSE opcodes, that need to have some CR4 flags set.

This should allow people with Geforce or ATI cards to use more than

60hz. Unfortunatly i was unable to test it, because my GeForce 6200

TC is NOT VBE 3 compatible, although NVIDIA says so. Now I would like

to have some feedback on it.

Just replace the code below, compile, use startupfiletool and it

should work. (USE AT UR OWN RISK!)

 

- TRAC

 

http://darwinsource.opendarwin.org/10.4.2/...oot2/graphics.c

 

if ( (vesaVersion >> 8) >= 3 && refreshRate >= 60 &&

(gBootMode & kBootModeSafe) == 0 )

{

VBECRTCInfoBlock timing;

 

// added by TRAC because of SSE bug in boot2

// activates SSE support by CPU

__asm__ ("movl %cr4,%eax \n"

"orl $1536,%eax \n"

"movl %eax,%cr4 \n");

 

// Generate CRTC timing for given refresh rate.

 

generateCRTCTiming( minfo.XResolution, minfo.YResolution,

refreshRate, kCRTCParamRefreshRate,

&timing );

Link to comment
Share on other sites

I managed to track down the cause of the reboot with Darwin 8.0.1 Images (could be the prob of others too). The problem is that

a subfunction uses SSE opcodes, that need to have some CR4 flags set.

This should allow people with Geforce or ATI cards to use more than

60hz.

I've no idea what you are saying,but any news on getting my Geforce 6600 to run above that damned @60Hz sounds cool to me. Did you post your findings at macvidia, the guys & gals that are working at a osx86 nividia driver? If not you really should ;)
Link to comment
Share on other sites

Someone said, that with the installation-DVD, the resolution-changes work as well. if true, you could copy the /usr/standalone/i386/* from the DVD to your Disk and do a startupfiletool /dev/rdisk0 /usr/standalone/i386/boot (repalce rdisk0 with your disk).

 

if that doesn't work, get the boot-122 from the darwinsources and edit the graphics.c as mentioned.

it fails to find the libcc_kext.o, cause there aint't that library in the gcc-3.3-folders, i simply copied it from/usr/lib/gcc/i686-apple-darwin8/4.0.0/ to the boot-122/sym-folder and compiled then with

 

CC=/usr/bin/gcc-3.3 make (boot-122 won't compile with gcc-4.0)

 

and than the startupfiletool thing as mentioned above...

 

that's it. good luck!

Link to comment
Share on other sites

There's one slight problem with this. The OS x86 doesn't appear to have an x86 gcc 3.3 compiler included with Xcode. So how do we compile this?

 

XCode includes several versions of gcc, but you need to specify at install.

Link to comment
Share on other sites

Someone said, that with the installation-DVD, the resolution-changes work as well. if true, you could copy the /usr/standalone/i386/* from the DVD to your Disk and do a startupfiletool /dev/rdisk0 /usr/standalone/i386/boot (repalce rdisk0 with your disk).

 

I get this after I wroite the command:

startupfiletool: opendev(/dev/rdisk0): Resource busy

Link to comment
Share on other sites

The 3.3 included with Xcode is PPC only. There's no x86 one. Although, I didn't realize that the Darwin installation disc had an x86 3.3 on it. This worked just fine.

 

Well, I got it compiled, installed and....it won't go beyond 60hz refresh, even if I set it higher. nVidia GF6800GT, supports VESA3.0, and both my monitors can do 75hz at 1280x1024. I've got no clue.

Link to comment
Share on other sites

I compiled it, installed it, startupfiletooled it, now it wont make reboots if I specify higher refresh rates but screen stays at 60hz

 

When i wrote the debugged the cause of the reboot i realized, that my GeForce 6200 TC 256MB IS NOT VBE 3 compatible although NVidia said so. I dont know whether u have the same problem with ur NVidia chip. The main problem is that (at least with the 6200) it totally ignores any CRTC refresh rates from BIOS function 0x4f02 (VESA!) and sets the default (mostly 60hz). Another problem is that some other VESA functions might crash on these chips, so actually NVidia produced rubbish with that cards! U might test it with Linux. Get it running run Xorg or XFree with VESA driver and specify a modeline. If it still fails to switch, it is NVidia`s fault! If not.... (ohoh)

 

Some of u guys have problems with refreshing the boot sector, so i write a more comprehensive docu:

 

1. Get the source from Apple.

http://darwinsource.opendarwin.org/10.4.2/

tar.gz right next to boot-122

 

2. get the Compiler gcc3.3 (should be included with every legal Apple image :( All the others have to get it at the same address :)) )

 

3. patch the graphics.c file with the lines above

 

4. run make in boot-122 folder

 

5. but the binary boot (in folder boot-122/sym/i386/boot) on a floppy or usb drive

get ur install cd image, put it into the drive, when it prompts for a install drive type shell

 

6. mount ur floppy / usb drive and use "startupfiletool <ur darwin partition with hfs> boot

 

7. reboot and pray :))

 

- TRAC

PS. for all of u who are not that willing to get the compiler, patch the file and compile it here it is:

PPS. USE AT UR OWN RISK -> u can seriously damage ur installation and hard disk content!

 

Ups, the forum said: i am not allowed to upload a file with this extension, so rename it to boot.

 

- TRAC

BOOT.txt

Link to comment
Share on other sites

I compiled it with XCode's gcc 3.3, it produces X86 code, even if gcc is only PPC binary program.

 

I tried to copy boot from the Install DVD, but since my processor is a SSE2 it shows the incompatible hardware error. I also tried with the boot of Darwin CD but it reboots instantly after the Graphics Mode command.

 

I'll try with the boot of the patched DVD.

Link to comment
Share on other sites

Am i stupid or aint?! I cant understand you instructions. Have been sitting here for 30 min and tryed to understand them but i cant. Can some on da a STEP BY STEP easy instruction for this one?

 

No offens Trac but you have e very "techy" style of posting. We deadly computer geeks cant understand you ;)

Link to comment
Share on other sites

Download this file: http://darwinsource.opendarwin.org/tarball...boot-122.tar.gz, then unzip and untar, edit the graphics.c file, then do a make in the root directory of boot-122.

 

Then put the resulting boot file (which is in boot-122/sym/i386/boot) on a floppy or usb drive boot with the Darwin CD or Install DVD in single user mode, then mount the floppy / usb drive and use "startupfiletool /dev/rdiskXsY /boot"

 

X is the pysical drive and Y is the partition number of your MacOSX.

Link to comment
Share on other sites

Download this file: http://darwinsource.opendarwin.org/tarball...boot-122.tar.gz, then unzip and untar, edit the graphics.c file, then do a make in the root directory of boot-122.

 

Then put the resulting boot file (which is in boot-122/sym/i386/boot) on a floppy or usb drive boot with the Darwin CD or Install DVD in single user mode, then mount the floppy / usb drive and use "startupfiletool /dev/rdiskXsY <mount point of floppy or usb>/boot"

 

X is the pysical drive and Y is the partition number of your MacOSX.

 

Will it be ok if I boot w/o the darwin/install disc?

 

And where do i put the graphics.c file after i edited it, in the "boot-122/sym/i386" before i "make" the directory? Thanks!

Link to comment
Share on other sites

Sorry im such a newbie in this field. i cant even make a compile or make....

 

I think i got it after that or maybe not. How do i use the startupfiletool?

 

i understand if you give up on me... it´s hard to handle the newbies :(

Link to comment
Share on other sites

Sorry im such a newbie in this field. i cant even make a compile or make....

 

I think i got it after that or maybe not. How do i use the startupfiletool?

 

i understand if you give up on me... it´s hard to handle the newbies :rolleyes:

Dont worry, Trac posted a compiled file, search some messages before.

 

As for the startupfiletool, the volume that you want to modify need to be unmounted, so you need to boot from other source, Darwin CD or Install DVD are just fine, but also you need the boot file in other media like a floppy , usb media, another partintion. When you boot you need to know wich disk is your partition of Mac OS, you can browse the /dev directory for rdiskXsY file that represents your X=your HD Y=your partition.

 

Asume that you MacOS is in disk0s1 and you got the boot file in a Floppy and you mounted in /mnt/floppy the command is like this:

startupfiletool /dev/rdkisk0s1 /mnt/floppy/boot

 

Since I have VMWare with a Mac OS X on an Image and my Physical HD with Mac OS I can boot in VMWare with the image as boot disk and the Physical HD as second disk, when Mac OS boots I only need to unmount the second disk to perform the startupfiletool.

Link to comment
Share on other sites

 Share

×
×
  • Create New...