[OpenBIOS] How does one use the partition access functions
Lennart Sorensen
lsorense at csclub.uwaterloo.ca
Mon Feb 9 19:04:28 CET 2009
On Mon, Feb 09, 2009 at 06:25:16PM +0100, Laurent Vivier wrote:
> Hi,
>
> look at CHRP System binding, http://www.openfirmware.info/data/docs/CHRP.ps
> , p. 56:
>
> 11.1.2. Open Method Algorithm
> ...
>
> 11.1.2.7.6. CHECK_FOR_MAC_DISK
> 11.1.2.7.7. If this is a Mac partitioned disk
> 11.1.2.7.7.1. Search the Mac partition table for the first
> "bootable" partition. A partition is "bootable"
> when the pmPartStatus flags indicate that this is
> a valid, allocated, readable and bootable
> partition and the pmProcessor field contains
> "powerpc" (using case-insensitive matching).
> 11.1.2.7.7.2. If a Mac "bootable" partition is found
> 11.1.2.7.7.2.1. If FILENAME$ is "%BOOT"
> 11.1.2.7.7.2.1.1. If the Nth partition is marked bootable
> 11.1.2.7.7.2.1.1.1. Set D.OFFSET to the byte offset from the
> beginning of the disk to the beginning of
> the boot area, as given by the
> pmLgBootStart field.
> 11.1.2.7.7.2.1.1.2. Set D.SIZE to the size of the partition in bytes
> denoted by pmBootSize.
> 11.1.2.7.7.2.1.1.3. Return OKAY
> 11.1.2.7.7.2.2. Else
> 11.1.2.7.7.2.2.1. If the FILENAME$ is the null string
> 11.1.2.7.7.2.2.1.1. Set D.OFFSET to the byte offset of the "real"
> partition data
> 11.1.2.7.7.2.2.1.2. Set D.SIZE to the size of the "real" partition
> data
> 11.1.2.7.7.2.2.2. Else
> 11.1.2.7.7.2.2.2.1. INTERPOSE_BY_TYPE
> 11.1.2.7.7.2.2.3. Return OKAY
> 11.1.2.7.7.3. Else
That looks pretty much like what I was planning to do, based on the
structure and how quik fills it in. At least something like it.
Now I just have to figure out how to check the values of the mac
partiton table structure from arch/ppc/qemu/main.c
--
Len Sorensen
More information about the OpenBIOS
mailing list