[OpenBIOS] [commit] r1162 - trunk/openbios-devel/fs/hfsplus

Alexander Graf agraf at csgraf.de
Wed Jun 26 04:29:23 CEST 2013


On 26.06.2013, at 04:19, Programmingkid wrote:

> 
> On Jun 25, 2013, at 10:10 PM, Alexander Graf wrote:
> 
>> 
>> On 26.06.2013, at 01:25, Alexander Graf wrote:
>> 
>>> 
>>> On 25.06.2013, at 23:16, Programmingkid wrote:
>>> 
>>>> 
>>>> On Jun 25, 2013, at 1:23 PM, repository service wrote:
>>>> 
>>>>> Author: agraf
>>>>> Date: Tue Jun 25 19:23:09 2013
>>>>> New Revision: 1162
>>>>> URL: http://tracker.coreboot.org/trac/openbios/changeset/1162
>>>>> 
>>>>> Log:
>>>>> hfsplus: Fix disk support for disks > 4GB
>>>>> 
>>>>> The HFS+ driver was truncating the end of the disk to 32bit implicitly
>>>>> by multiplying a 32bit value with another 32bit value. Cast the first one
>>>>> to 64bit, making the result 64bit wide as well.
>>>>> 
>>>>> This fixes booting from big disks for me.
>>>>> 
>>>>> Signed-off-by: Alexander Graf <agraf at suse.de>
>>>>> 
>>>>> Modified:
>>>>> trunk/openbios-devel/fs/hfsplus/hfsp_volume.c
>>>>> 
>>>>> Modified: trunk/openbios-devel/fs/hfsplus/hfsp_volume.c
>>>>> ==============================================================================
>>>>> --- trunk/openbios-devel/fs/hfsplus/hfsp_volume.c	Tue Jun 25 18:11:57 2013	(r1161)
>>>>> +++ trunk/openbios-devel/fs/hfsplus/hfsp_volume.c	Tue Jun 25 19:23:09 2013	(r1162)
>>>>> @@ -207,7 +207,7 @@
>>>>>             ret = volume_readbuf(vh, p);
>>>>> 		if( !ret ) {
>>>>> 		    /* When reading the initial partition we must use 512 byte blocks */
>>>>> -		    vol_size = vh->blocksize * vh->total_blocks;
>>>>> +		    vol_size = (uint64_t)vh->blocksize * vh->total_blocks;
>>>>> 		    vol->maxblocks = vol_size / HFSP_BLOCKSZ;
>>>>> 		}
>>>>> 		
>>>> 
>>>> 
>>>> I tried booting from a Mac OS 10.4 install dvd, but it didn't work. The DVD image is only 2.83GB. Is anyone able to boot from DVD images yet?
>>> 
>>> Yes, I'm booting from the 10.4 install image for a while now. It just doesn't find its root device yet. I found that particular issue with a ready-installed 10.4.11 image that I had created earlier with MOL. I was planning to use that to debug the guest with self-compiled kexts.
>>> 
>>> As a nice side-effect, I can also boot my leopard DVD as well now. Though that one really does complain about the g3beige ;).
>> 
>> It looks like whether booting works is very timing sensitive. It almost feels as if DMA transfers are racy, but that's really just a wild guess.
> 
> There might be a timing issue involved. 
> 
> How did you make your DVD image files?

I simply dd'ed the DVD from Linux :).

> I used Disk Utility and made a DVD Master file.

That works too - just make sure that you pass -drive ...,format=raw into QEMU.


Alex




More information about the OpenBIOS mailing list