Some older OS (particularly Darwin) will get stuck in a timing loop upon
boot if the CPU clock-frequency and timebase-frequency aren't set close
enough to "real" values.
The clock-frequency property is already fairly realistic, so create a new
boolean NVRAM variable "force-real-tbfreq?" which when set to true will
override the timebase-frequency value supplied by QEMU/KVM with that similar
to a real Mac.
Hence it is possible to boot these old OS from QEMU by adding the following
to the QEMU …
[View More]command line: -prom-env 'force-real-tbfreq?=true' (although of
course the guest timing may be inaccurate).
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland(a)ilande.co.uk>
CC: Alexander Graf <agraf(a)csgraf.de>
---
openbios-devel/arch/ppc/qemu/init.c | 10 +++++++++-
openbios-devel/forth/admin/nvram.fs | 1 +
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/openbios-devel/arch/ppc/qemu/init.c b/openbios-devel/arch/ppc/qemu/init.c
index fcbd04d..60a5303 100644
--- a/openbios-devel/arch/ppc/qemu/init.c
+++ b/openbios-devel/arch/ppc/qemu/init.c
@@ -258,7 +258,15 @@ cpu_generic_init(const struct cpudef *cpu)
push_str("icache-block-size");
fword("property");
- PUSH(fw_cfg_read_i32(FW_CFG_PPC_TBFREQ));
+ /* Some OS (early Darwin) require a value of timebase-frequency
+ that closely matches real hardware in order to prevent a
+ timing loop hang. Use CLOCKFREQ / 16 as a good approximation. */
+ fword("force-real-tbfreq?");
+ if (POP()) {
+ PUSH(fw_cfg_read_i32(FW_CFG_PPC_CLOCKFREQ) / 0x10);
+ } else {
+ PUSH(fw_cfg_read_i32(FW_CFG_PPC_TBFREQ));
+ }
fword("encode-int");
push_str("timebase-frequency");
fword("property");
diff --git a/openbios-devel/forth/admin/nvram.fs b/openbios-devel/forth/admin/nvram.fs
index 20f6462..cf3e905 100644
--- a/openbios-devel/forth/admin/nvram.fs
+++ b/openbios-devel/forth/admin/nvram.fs
@@ -336,6 +336,7 @@ s" -1" s" real-size" int-config
s" 4000000" s" load-base" int-config
s" -1" s" virt-base" int-config
s" -1" s" virt-size" int-config
+s" false" s" force-real-tbfreq?" bool-config
[THEN]
[IFDEF] CONFIG_X86
--
1.7.10.4
[View Less]
I'm aiming for a cpeek that catches the data faults on sparc32, so I've
coded up the attached test code.
The fault handler here is almost trivially simple: set a new instruction
pointer and return to it. All the magic is done in push_trap_handler
and do_trap_handler, and they act similar to setjmp/longjmp. Nesting is
allowed, so it should be possible to use this at the top level for
printing out pretty error messages for any fault just like OBP.
I'm looking for any comments and suggestions. …
[View More] This proof of concept
only handles mmu data faults, but is extendable. Example tests:
deadbeef try-fault
returns false (0),
10000 try-fault
returns true (-1) and the value at 0x10000
Bob
[View Less]
Author: mcayland
Date: Fri Jun 28 23:08:38 2013
New Revision: 1167
URL: http://tracker.coreboot.org/trac/openbios/changeset/1167
Log:
load: fix generation of /chosen bootpath property
It seems that some OS require the bootpath property to be the full, unaliased
path to the selected boot device, so use get-instance-path to ensure that
this is the case.
There is a slight issue here when auto-probing a partition, since the package
arguments won't contain the chosen partition id which semms to …
[View More]be mandatory
for bootpath. In order to resolve this, scan for a special
selected-partition-args property in the instance chain before
generating the bootpath, and if it exists use that for the device package
arguments instead.
Using this mechanism, we can set this property once we have auto-probed a
partition in mac-parts.c so bootpath is generated correctly. Finally it is
possible to remove the current hack of overwriting bootpath when calling
open-dev on a mac-parts partition, which would confuse some bootloaders
if they read bootpath after opening a new device.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland(a)ilande.co.uk>
Modified:
trunk/openbios-devel/forth/admin/userboot.fs
trunk/openbios-devel/forth/debugging/client.fs
trunk/openbios-devel/packages/mac-parts.c
Modified: trunk/openbios-devel/forth/admin/userboot.fs
==============================================================================
--- trunk/openbios-devel/forth/admin/userboot.fs Fri Jun 28 23:08:22 2013 (r1166)
+++ trunk/openbios-devel/forth/admin/userboot.fs Fri Jun 28 23:08:38 2013 (r1167)
@@ -16,7 +16,7 @@
execute
then
- (encode-bootpath) \ Setup bootpath/bootargs
+ (find-bootdevice) \ Setup bootargs
$load \ load and go
go
;
Modified: trunk/openbios-devel/forth/debugging/client.fs
==============================================================================
--- trunk/openbios-devel/forth/debugging/client.fs Fri Jun 28 23:08:22 2013 (r1166)
+++ trunk/openbios-devel/forth/debugging/client.fs Fri Jun 28 23:08:38 2013 (r1167)
@@ -59,12 +59,13 @@
then
;
-: (encode-bootpath) ( param-str param-len -- bootpath-str bootpath-len)
- \ Parse the <param> string from a load/boot command and set both
- \ the bootargs and bootpath properties as appropriate.
+: (find-bootdevice) ( param-str param-len -- bootpath-str bootpath-len)
+ \ Parse the <param> string which is a space-separated list of one or
+ \ more potential boot devices, and return the first one that can be
+ \ successfully opened.
- \ bootpath
- bl left-split \ argstr argstr-len bootdevstr bootdevstr-len
+ \ Space-separated bootpath string
+ bl left-split \ bootpathstr bootpathstr-len bootdevstr bootdevstr-len
dup 0= if
\ None specified. As per IEEE-1275 specification, search through each value
@@ -89,12 +90,6 @@
2drop
then
- \ Set the bootpath property
- 2dup encode-string
- " /chosen" (find-dev) if
- " bootpath" rot (property)
- then
-
\ bootargs
2swap dup 0= if
\ None specified, use default from nvram
@@ -108,6 +103,31 @@
then
;
+\ Locate the boot-device opened by this ihandle (currently taken as being
+\ the first non-interposed package in the instance chain)
+
+: ihandle>boot-device-handle ( ihandle -- 0 | device-ihandle -1 )
+ >r 0
+ begin r> dup >in.my-parent @ dup >r while
+ ( result ihandle R: ihandle.parent )
+ dup >in.interposed @ 0= if
+ \ Find the first non-interposed package
+ over 0= if
+ swap drop
+ else
+ drop
+ then
+ else
+ drop
+ then
+ repeat
+ r> drop drop
+
+ dup 0<> if
+ -1
+ then
+;
+
: $load ( devstr len )
open-dev ( ihandle )
dup 0= if
@@ -118,13 +138,53 @@
" load-base" evaluate swap ( load-base ihandle )
dup ihandle>phandle " load" rot find-method ( xt 0|1 )
if swap call-package !load-size else cr ." Cannot find load for this package" 2drop then
+
+ \ If the boot device path doesn't contain an explicit partition id, e.g. cd:,\\:tbxi
+ \ then the interposed partition package may have auto-probed a suitable partition. If
+ \ this is the case then it will have set the " selected-partition-args" property in
+ \ the partition package to contain the new device arguments.
+ \
+ \ In order to ensure that bootpath contains the partition argument, we use the contents
+ \ of this property if it exists to override the boot device arguments when generating
+ \ the full bootpath using get-instance-path.
+
+ my-self
+ r@ to my-self
+ " selected-partition-args" get-inherited-property 0= if
+ decode-string 2swap 2drop
+ ( myself-save partargs-str partargs-len )
+ r@ ihandle>boot-device-handle if
+ ( myself-save partargs-str partargs-len block-ihandle )
+ \ Override the arguments before get-instance-path
+ dup >in.arguments 2@ >r >r dup >r ( R: block-ihandle arg-len arg-str )
+ >in.arguments 2! ( myself-save )
+ r@ " get-instance-path" $find if
+ execute ( myself-save bootpathstr bootpathlen )
+ then
+ \ Now write the original arguments back
+ r> r> r> rot >in.arguments 2! ( myself-save bootpathstr bootpathlen R: )
+ rot ( bootpathstr bootpathlen myself-save )
+ then
+ else
+ my-self " get-instance-path" $find if
+ execute ( myself-save bootpathstr pathlen )
+ rot ( bootpathstr bootpathlen myself-save )
+ then
+ then
+ to my-self
+
+ \ Set bootpath property in /chosen
+ encode-string " /chosen" (find-dev) if
+ " bootpath" rot (property)
+ then
+
r> close-dev
init-program
;
: load ( "{params}<cr>" -- )
linefeed parse
- (encode-bootpath)
+ (find-bootdevice)
$load
;
Modified: trunk/openbios-devel/packages/mac-parts.c
==============================================================================
--- trunk/openbios-devel/packages/mac-parts.c Fri Jun 28 23:08:22 2013 (r1166)
+++ trunk/openbios-devel/packages/mac-parts.c Fri Jun 28 23:08:38 2013 (r1167)
@@ -50,14 +50,14 @@
{
char *str = my_args_copy();
char *parstr = NULL, *argstr = NULL;
- char *tmpstr, *bootpath;
+ char *tmpstr;
int bs, parnum=-1, apple_parnum=-1;
int parlist[2], parlist_size = 0;
desc_map_t dmap;
part_entry_t par;
int ret = 0, i = 0, j = 0;
int want_bootcode = 0;
- phandle_t ph, chosen_ph;
+ phandle_t ph;
ducell offs = 0, size = -1;
DPRINTF("macparts_open '%s'\n", str );
@@ -260,35 +260,20 @@
if( ph ) {
DPRINTF("mac-parts: filesystem found on partition %d with ph " FMT_ucellx " and args %s\n", parnum, ph, argstr);
di->filesystem_ph = ph;
-
- /* Update bootpath to reflect where we booted from */
- chosen_ph = find_dev("/chosen");
- tmpstr = get_property(chosen_ph, "bootpath", &i);
- if (tmpstr == NULL) {
- tmpstr = strdup("");
- }
- /* Find just the device */
- if (strlen(tmpstr)) {
- for (i = 0; i < strlen(tmpstr); i++) {
- if (tmpstr[i] == ':' || tmpstr[i] == ',') {
- tmpstr[i] = '\0';
- }
- }
-
- /* Rebuild bootpath with the currently selected partition number */
- bootpath = malloc(strlen(tmpstr) + strlen(str) + 4);
- sprintf(bootpath, "%s:%d", tmpstr, parnum);
- if (strlen(argstr)) {
- sprintf(bootpath, "%s:%d,%s", tmpstr, parnum, argstr);
- } else {
- sprintf(bootpath, "%s:%d", tmpstr, parnum);
- }
-
- DPRINTF("mac-parts: setting bootpath to %s\n", bootpath);
-
- set_property(chosen_ph, "bootpath", bootpath, strlen(bootpath) + 1);
+ /* In case no partition was specified, set a special selected-partition-args property
+ giving the device parameters that we can use to generate bootpath */
+ tmpstr = malloc(strlen(argstr) + 2 + 1);
+ if (strlen(argstr)) {
+ sprintf(tmpstr, "%d,%s", parnum, argstr);
+ } else {
+ sprintf(tmpstr, "%d", parnum);
}
+
+ push_str(tmpstr);
+ feval("strdup encode-string \" selected-partition-args\" property");
+
+ free(tmpstr);
/* If we have been asked to open a particular file, interpose the filesystem package with
the passed filename as an argument */
[View Less]
Author: mcayland
Date: Fri Jun 28 23:08:22 2013
New Revision: 1166
URL: http://tracker.coreboot.org/trac/openbios/changeset/1166
Log:
property.fs: fix off-by-one error in decode-string
The sequence 's" test" encode-string decode-string' suffered from an off-by-one
error whereby the trailing '\0' would still be left at the end of the decoded
string.
This fixes the extra "space" appearing at the end of property names, e.g. such
as in the output of "show-devs".
Signed-off-by: Mark Cave-Ayland …
[View More]<mark.cave-ayland(a)ilande.co.uk>
Modified:
trunk/openbios-devel/forth/device/property.fs
Modified: trunk/openbios-devel/forth/device/property.fs
==============================================================================
--- trunk/openbios-devel/forth/device/property.fs Fri Jun 28 23:08:08 2013 (r1165)
+++ trunk/openbios-devel/forth/device/property.fs Fri Jun 28 23:08:22 2013 (r1166)
@@ -185,7 +185,7 @@
>r >r >r ( R: prop-addr1 prop-addr2 prop-len2 nlen )
drop
r> r> r> ( nlen prop-len2 prop-addr2 )
- -rot swap ( prop-addr2 prop-len2 nlen )
+ -rot swap 1- ( prop-addr2 prop-len2 nlen )
r> swap ( prop-addr2 prop-len2 str len )
else
0 0
[View Less]
Author: mcayland
Date: Fri Jun 28 23:08:08 2013
New Revision: 1165
URL: http://tracker.coreboot.org/trac/openbios/changeset/1165
Log:
PPC: Fix quik bootloader on New World Macs
Currently quik assumes a fixed load-base of 0x3f4000, and only worked on Old
World Macs because of a special exception in bootcode_load.c. Since quik seems
to be the only user of %BOOT known to date, widen the check to all Apple
machines as per conversation with Alex. PReP machines will continue to use the
standard …
[View More]value of load-base as normal.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland(a)ilande.co.uk>
Modified:
trunk/openbios-devel/libopenbios/bootcode_load.c
Modified: trunk/openbios-devel/libopenbios/bootcode_load.c
==============================================================================
--- trunk/openbios-devel/libopenbios/bootcode_load.c Wed Jun 26 04:04:35 2013 (r1164)
+++ trunk/openbios-devel/libopenbios/bootcode_load.c Fri Jun 28 23:08:08 2013 (r1165)
@@ -33,8 +33,12 @@
loadbase = POP();
#ifdef CONFIG_PPC
- /* However Old World Macs need to load to a different address */
- if (is_oldworld()) {
+ /* ...except that QUIK (the only known user of %BOOT to date) is built
+ with a hard-coded address of 0x3f4000. Let's just use this for the
+ moment on both New World and Old World Macs, allowing QUIK to also
+ work under a New World Mac. If we find another user of %BOOT we can
+ rethink this later. PReP machines should be left unaffected. */
+ if (is_apple()) {
loadbase = OLDWORLD_BOOTCODE_BASEADDR;
}
#endif
[View Less]
It seems that some OS require the bootpath property to be the full, unaliased
path to the selected boot device, so use get-instance-path to ensure that
this is the case.
There is a slight issue here when auto-probing a partition, since the package
arguments won't contain the chosen partition id which semms to be mandatory
for bootpath. In order to resolve this, scan for a special
selected-partition-args property in the instance chain before
generating the bootpath, and if it exists use that …
[View More]for the device package
arguments instead.
Using the mechanism, we can set this property once we have auto-probed a
partition in mac-parts.c so bootpath is generated correctly. Finally it is
possible to remove the current hack of overwriting bootpath when calling
open-dev on a mac-parts partition, which would confuse some bootloaders
if they read bootpath after opening a new device.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland(a)ilande.co.uk>
---
openbios-devel/forth/admin/userboot.fs | 2 +-
openbios-devel/forth/debugging/client.fs | 84 +++++++++++++++++++++++++-----
openbios-devel/forth/device/property.fs | 2 +-
openbios-devel/packages/mac-parts.c | 43 +++++----------
4 files changed, 88 insertions(+), 43 deletions(-)
diff --git a/openbios-devel/forth/admin/userboot.fs b/openbios-devel/forth/admin/userboot.fs
index dd76958..3ae899c 100644
--- a/openbios-devel/forth/admin/userboot.fs
+++ b/openbios-devel/forth/admin/userboot.fs
@@ -16,7 +16,7 @@
execute
then
- (encode-bootpath) \ Setup bootpath/bootargs
+ (find-bootdevice) \ Setup bootargs
$load \ load and go
go
;
diff --git a/openbios-devel/forth/debugging/client.fs b/openbios-devel/forth/debugging/client.fs
index 9da9b33..e837e2a 100644
--- a/openbios-devel/forth/debugging/client.fs
+++ b/openbios-devel/forth/debugging/client.fs
@@ -59,12 +59,13 @@ variable file-size
then
;
-: (encode-bootpath) ( param-str param-len -- bootpath-str bootpath-len)
- \ Parse the <param> string from a load/boot command and set both
- \ the bootargs and bootpath properties as appropriate.
+: (find-bootdevice) ( param-str param-len -- bootpath-str bootpath-len)
+ \ Parse the <param> string which is a space-separated list of one or
+ \ more potential boot devices, and return the first one that can be
+ \ successfully opened.
- \ bootpath
- bl left-split \ argstr argstr-len bootdevstr bootdevstr-len
+ \ Space-separated bootpath string
+ bl left-split \ bootpathstr bootpathstr-len bootdevstr bootdevstr-len
dup 0= if
\ None specified. As per IEEE-1275 specification, search through each value
@@ -89,12 +90,6 @@ variable file-size
2drop
then
- \ Set the bootpath property
- 2dup encode-string
- " /chosen" (find-dev) if
- " bootpath" rot (property)
- then
-
\ bootargs
2swap dup 0= if
\ None specified, use default from nvram
@@ -108,6 +103,31 @@ variable file-size
then
;
+\ Locate the boot-device opened by this ihandle (currently taken as being
+\ the first non-interposed package in the instance chain)
+
+: ihandle>boot-device-handle ( ihandle -- 0 | device-ihandle -1 )
+ >r 0
+ begin r> dup >in.my-parent @ dup >r while
+ ( result ihandle R: ihandle.parent )
+ dup >in.interposed @ 0= if
+ \ Find the first non-interposed package
+ over 0= if
+ swap drop
+ else
+ drop
+ then
+ else
+ drop
+ then
+ repeat
+ r> drop drop
+
+ dup 0<> if
+ -1
+ then
+;
+
: $load ( devstr len )
open-dev ( ihandle )
dup 0= if
@@ -118,13 +138,53 @@ variable file-size
" load-base" evaluate swap ( load-base ihandle )
dup ihandle>phandle " load" rot find-method ( xt 0|1 )
if swap call-package !load-size else cr ." Cannot find load for this package" 2drop then
+
+ \ If the boot device path doesn't contain an explicit partition id, e.g. cd:,\\:tbxi
+ \ then the interposed partition package may have auto-probed a suitable partition. If
+ \ this is the case then it will have set the " selected-partition-args" property in
+ \ the partition package to contain the new device arguments.
+ \
+ \ In order to ensure that bootpath contains the partition argument, we use the contents
+ \ of this property if it exists to override the boot device arguments when generating
+ \ the full bootpath using get-instance-path.
+
+ my-self
+ r@ to my-self
+ " selected-partition-args" get-inherited-property 0= if
+ decode-string 2swap 2drop
+ ( myself-save partargs-str partargs-len )
+ r@ ihandle>boot-device-handle if
+ ( myself-save partargs-str partargs-len block-ihandle )
+ \ Override the arguments before get-instance-path
+ dup >in.arguments 2@ >r >r dup >r ( R: block-ihandle arg-len arg-str )
+ >in.arguments 2! ( myself-save )
+ r@ " get-instance-path" $find if
+ execute ( myself-save bootpathstr bootpathlen )
+ then
+ \ Now write the original arguments back
+ r> r> r> rot >in.arguments 2! ( myself-save bootpathstr bootpathlen R: )
+ rot ( bootpathstr bootpathlen myself-save )
+ then
+ else
+ my-self " get-instance-path" $find if
+ execute ( myself-save bootpathstr pathlen )
+ rot ( bootpathstr bootpathlen myself-save )
+ then
+ then
+ to my-self
+
+ \ Set bootpath property in /chosen
+ encode-string " /chosen" (find-dev) if
+ " bootpath" rot (property)
+ then
+
r> close-dev
init-program
;
: load ( "{params}<cr>" -- )
linefeed parse
- (encode-bootpath)
+ (find-bootdevice)
$load
;
diff --git a/openbios-devel/forth/device/property.fs b/openbios-devel/forth/device/property.fs
index d19546c..f9769fb 100644
--- a/openbios-devel/forth/device/property.fs
+++ b/openbios-devel/forth/device/property.fs
@@ -185,7 +185,7 @@
>r >r >r ( R: prop-addr1 prop-addr2 prop-len2 nlen )
drop
r> r> r> ( nlen prop-len2 prop-addr2 )
- -rot swap ( prop-addr2 prop-len2 nlen )
+ -rot swap 1- ( prop-addr2 prop-len2 nlen )
r> swap ( prop-addr2 prop-len2 str len )
else
0 0
diff --git a/openbios-devel/packages/mac-parts.c b/openbios-devel/packages/mac-parts.c
index c29b554..67d58e7 100644
--- a/openbios-devel/packages/mac-parts.c
+++ b/openbios-devel/packages/mac-parts.c
@@ -50,14 +50,14 @@ macparts_open( macparts_info_t *di )
{
char *str = my_args_copy();
char *parstr = NULL, *argstr = NULL;
- char *tmpstr, *bootpath;
+ char *tmpstr;
int bs, parnum=-1, apple_parnum=-1;
int parlist[2], parlist_size = 0;
desc_map_t dmap;
part_entry_t par;
int ret = 0, i = 0, j = 0;
int want_bootcode = 0;
- phandle_t ph, chosen_ph;
+ phandle_t ph;
ducell offs = 0, size = -1;
DPRINTF("macparts_open '%s'\n", str );
@@ -260,35 +260,20 @@ macparts_open( macparts_info_t *di )
if( ph ) {
DPRINTF("mac-parts: filesystem found on partition %d with ph " FMT_ucellx " and args %s\n", parnum, ph, argstr);
di->filesystem_ph = ph;
-
- /* Update bootpath to reflect where we booted from */
- chosen_ph = find_dev("/chosen");
- tmpstr = get_property(chosen_ph, "bootpath", &i);
- if (tmpstr == NULL) {
- tmpstr = strdup("");
- }
- /* Find just the device */
- if (strlen(tmpstr)) {
- for (i = 0; i < strlen(tmpstr); i++) {
- if (tmpstr[i] == ':' || tmpstr[i] == ',') {
- tmpstr[i] = '\0';
- }
- }
-
- /* Rebuild bootpath with the currently selected partition number */
- bootpath = malloc(strlen(tmpstr) + strlen(str) + 4);
- sprintf(bootpath, "%s:%d", tmpstr, parnum);
- if (strlen(argstr)) {
- sprintf(bootpath, "%s:%d,%s", tmpstr, parnum, argstr);
- } else {
- sprintf(bootpath, "%s:%d", tmpstr, parnum);
- }
-
- DPRINTF("mac-parts: setting bootpath to %s\n", bootpath);
-
- set_property(chosen_ph, "bootpath", bootpath, strlen(bootpath) + 1);
+ /* In case no partition was specified, set a special selected-partition-args property
+ giving the device parameters that we can use to generate bootpath */
+ tmpstr = malloc(strlen(argstr) + 2 + 1);
+ if (strlen(argstr)) {
+ sprintf(tmpstr, "%d,%s", parnum, argstr);
+ } else {
+ sprintf(tmpstr, "%d", parnum);
}
+
+ push_str(tmpstr);
+ feval("strdup encode-string \" selected-partition-args\" property");
+
+ free(tmpstr);
/* If we have been asked to open a particular file, interpose the filesystem package with
the passed filename as an argument */
--
1.7.10.4
[View Less]
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(a)suse.de>
Modified:
trunk/openbios-…
[View More]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;
}
[View Less]