Re: gptzfsboot problem on HP P410i Smart Array

2014-04-10 Thread Rainer Duffner
Am Thu, 10 Apr 2014 06:59:25 +0200
schrieb Andreas Nilsson andrn...@gmail.com:


  You never specified exactly how it fails. But I'll take a guess:
 
 *Attempting Boot From Hard Drive (C:)*
 
 *gptzfsboot: error 1 lba 32*
 
 *gptzfsboot: error 1 lba 1*
 
 *g**ptzfsboot: No ZFS pools located, can't boot*


True.

But as that was the failure-symptom of the original thread, I kind of
neglected to mention it
 
 A workaround is
 http://lists.freebsd.org/pipermail/freebsd-current/2011-August/026624.html



Yes, but that requires rebuilding FreeBSD.

Why has this never been patched properly?
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: gptzfsboot problem on HP P410i Smart Array

2014-04-10 Thread Andreas Nilsson
On Thu, Apr 10, 2014 at 12:25 PM, Rainer Duffner rai...@ultra-secure.dewrote:

 Am Thu, 10 Apr 2014 06:59:25 +0200
 schrieb Andreas Nilsson andrn...@gmail.com:


   You never specified exactly how it fails. But I'll take a guess:
 
  *Attempting Boot From Hard Drive (C:)*
 
  *gptzfsboot: error 1 lba 32*
 
  *gptzfsboot: error 1 lba 1*
 
  *g**ptzfsboot: No ZFS pools located, can't boot*


 True.

 But as that was the failure-symptom of the original thread, I kind of
 neglected to mention it


Sorry, I read on client without threading...



  A workaround is
 
 http://lists.freebsd.org/pipermail/freebsd-current/2011-August/026624.html



 Yes, but that requires rebuilding FreeBSD.

It does, yes.


 Why has this never been patched properly?

Ask HP, I guess. Whatever they are doing in that hardware is strange.

As is some other HP stuff as well, but that has been ranted about before so
I wont.

Best regards
Andreas
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: gptzfsboot problem on HP P410i Smart Array

2014-04-10 Thread Andreas Nilsson
On Thu, Apr 10, 2014 at 12:44 PM, Andreas Nilsson andrn...@gmail.comwrote:




 On Thu, Apr 10, 2014 at 12:25 PM, Rainer Duffner 
 rai...@ultra-secure.dewrote:

 Am Thu, 10 Apr 2014 06:59:25 +0200
 schrieb Andreas Nilsson andrn...@gmail.com:


   You never specified exactly how it fails. But I'll take a guess:
 
  *Attempting Boot From Hard Drive (C:)*
 
  *gptzfsboot: error 1 lba 32*
 
  *gptzfsboot: error 1 lba 1*
 
  *g**ptzfsboot: No ZFS pools located, can't boot*


 True.

 But as that was the failure-symptom of the original thread, I kind of
 neglected to mention it


 Sorry, I read on client without threading...



  A workaround is
 
 http://lists.freebsd.org/pipermail/freebsd-current/2011-August/026624.html



 Yes, but that requires rebuilding FreeBSD.

 It does, yes.

But only for a subdir. So it would be one binary to distribute to affected
systems.




 Why has this never been patched properly?

 Ask HP, I guess. Whatever they are doing in that hardware is strange


 As is some other HP stuff as well, but that has been ranted about before
 so I wont.

 Best regards
 Andreas


___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: gptzfsboot problem on HP P410i Smart Array

2014-04-10 Thread John Baldwin
On Thursday, April 10, 2014 12:59:25 am Andreas Nilsson wrote:
 On Thu, Apr 10, 2014 at 1:04 AM, Rainer Duffner rainer@ultra-
secure.dewrote:
 
 
  Am 10.04.2014 um 00:02 schrieb Matthew Seaman matt...@freebsd.org:
 
   On 09/04/2014 22:52, Rainer Duffner wrote:
   And no, as the server is in a remote datacenter, an USB-stick is not an
  option.
  
   It's slow enough booting via a virtual USB-image over iLO...
  
   Uh... it only has to read the kernel+modules from the USB stick one time
   while booting.  Otherwise, there really shouldn't be any IO inside /boot
   unless you login and do stuff in that directory manually.  Your root
   filesystem would be on the normal hard drives.
  
   Anyhow the question is moot, since you don't have the same problem I 
did.
  
   No, it's actually just a single RAID6-0 disk created by the P410i...
  
   If you're going to use the RAID controller to generate a virtual drive,
   do you really need to use ZFS on top of that?   Couldn't you partition
   your virtual drive and put / onto a small UFS partition and then make a
   zpool on the rest?
 
 
  I don't want to sacrifice two disks for a RAID1 boot-disk.
  Normally, I would actually do that, but in this case, the server is a
  MySQL-slave to a master that has 12 disks -  and should the master die,
  this system has to take over its work.
 
  You never specified exactly how it fails. But I'll take a guess:
 
 *Attempting Boot From Hard Drive (C:)*
 
 *gptzfsboot: error 1 lba 32*
 
 *gptzfsboot: error 1 lba 1*
 
 *g**ptzfsboot: No ZFS pools located, can't boot*
 
 
 A workaround is
 http://lists.freebsd.org/pipermail/freebsd-current/2011-August/026624.html

I believe the proper fix for that bug was committed here:

http://svnweb.freebsd.org/base?view=revisionrevision=243025

-- 
John Baldwin
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: gptzfsboot problem on HP P410i Smart Array

2014-04-10 Thread Sergey V. Dyatko
On Thu, 10 Apr 2014 13:13:22 -0400
John Baldwin j...@freebsd.org wrote: 

 On Thursday, April 10, 2014 12:59:25 am Andreas Nilsson wrote:
  On Thu, Apr 10, 2014 at 1:04 AM, Rainer Duffner rainer@ultra-
 secure.dewrote:
  
  
   Am 10.04.2014 um 00:02 schrieb Matthew Seaman matt...@freebsd.org:
  
On 09/04/2014 22:52, Rainer Duffner wrote:
And no, as the server is in a remote datacenter, an USB-stick is not an
   option.
   
It's slow enough booting via a virtual USB-image over iLO...
   
Uh... it only has to read the kernel+modules from the USB stick one time
while booting.  Otherwise, there really shouldn't be any IO inside /boot
unless you login and do stuff in that directory manually.  Your root
filesystem would be on the normal hard drives.
   
Anyhow the question is moot, since you don't have the same problem I 
 did.
   
No, it's actually just a single RAID6-0 disk created by the P410i...
   
If you're going to use the RAID controller to generate a virtual drive,
do you really need to use ZFS on top of that?   Couldn't you partition
your virtual drive and put / onto a small UFS partition and then make a
zpool on the rest?
  
  
   I don't want to sacrifice two disks for a RAID1 boot-disk.
   Normally, I would actually do that, but in this case, the server is a
   MySQL-slave to a master that has 12 disks -  and should the master die,
   this system has to take over its work.
  
   You never specified exactly how it fails. But I'll take a guess:
  
  *Attempting Boot From Hard Drive (C:)*
  
  *gptzfsboot: error 1 lba 32*
  
  *gptzfsboot: error 1 lba 1*
  
  *g**ptzfsboot: No ZFS pools located, can't boot*
  
  
  A workaround is
  http://lists.freebsd.org/pipermail/freebsd-current/2011-August/026624.html
 
 I believe the proper fix for that bug was committed here:
 
 http://svnweb.freebsd.org/base?view=revisionrevision=243025
 

possible, but it doesn't help in my case (lenovo b450 laptop). I install
fbsd11-current ~month ago in it and problem still persist, proposed by avg@
patch works fine in my case:

Index: sys/boot/i386/zfsboot/zfsboot.c
===
--- sys/boot/i386/zfsboot/zfsboot.c(revision 263419)
+++ sys/boot/i386/zfsboot/zfsboot.c(working copy)
@@ -302,6 +302,7 @@
  * region in the SMAP, use the last 3MB of 'extended' memory as a
  * high heap candidate.
  */
+high_heap_size = 0;
 if (bios_extmem = HEAP_MIN  high_heap_size  HEAP_MIN) {
 high_heap_size = HEAP_MIN;
 high_heap_base = bios_extmem + 0x10 - HEAP_MIN;

--
wbr, tiger

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: gptzfsboot problem on HP P410i Smart Array

2014-04-09 Thread Rainer Duffner
Hi,

I found this old thread….

I can’t boot FreeBSD 10 installed with zfsroot on a DL380G7 (P410i controller).
I tried the installer and I tried installing with mfsbsd10se.
System has 48GB RAM.

Is there a PR for this?


Now, I’ve got to waste 2’600 GB disks (and 300-odd I/Os) for a boot-disk…..


___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: gptzfsboot problem on HP P410i Smart Array

2014-04-09 Thread Matthew Seaman
On 09/04/2014 22:17, Rainer Duffner wrote:
 Hi,
 
 I found this old thread….
 
 I can’t boot FreeBSD 10 installed with zfsroot on a DL380G7 (P410i 
 controller).
 I tried the installer and I tried installing with mfsbsd10se.
 System has 48GB RAM.
 
 Is there a PR for this?
 
 
 Now, I’ve got to waste 2’600 GB disks (and 300-odd I/Os) for a boot-disk…..

You've got more than 8 drives in your zpool?  I ran into a similar
problem a while back: the bios only tells the OS about the first 8
drives during boot, and that isn't enough to assemble a workin zpool from.

Solution I adopted was to have a USB mem stick with /boot on it --
enough to get the kernel up and running and to assemble the zpool, which
could then provide the root fs perfectly well.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey




signature.asc
Description: OpenPGP digital signature


Re: gptzfsboot problem on HP P410i Smart Array

2014-04-09 Thread Rainer Duffner

Am 09.04.2014 um 23:48 schrieb Matthew Seaman matt...@freebsd.org:

 On 09/04/2014 22:17, Rainer Duffner wrote:
 Hi,
 
 I found this old thread….
 
 I can’t boot FreeBSD 10 installed with zfsroot on a DL380G7 (P410i 
 controller).
 I tried the installer and I tried installing with mfsbsd10se.
 System has 48GB RAM.
 
 Is there a PR for this?
 
 
 Now, I’ve got to waste 2’600 GB disks (and 300-odd I/Os) for a boot-disk…..
 
 You've got more than 8 drives in your spool?  



No, it’s actually just a single RAID6-0 disk created by the P410i…

And no, as the server is in a remote datacenter, an USB-stick is not an option.

It’s slow enough booting via a virtual USB-image over iLO...

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: gptzfsboot problem on HP P410i Smart Array

2014-04-09 Thread Matthew Seaman
On 09/04/2014 22:52, Rainer Duffner wrote:
 And no, as the server is in a remote datacenter, an USB-stick is not an 
 option.
 
 It’s slow enough booting via a virtual USB-image over iLO...

Uh... it only has to read the kernel+modules from the USB stick one time
while booting.  Otherwise, there really shouldn't be any IO inside /boot
unless you login and do stuff in that directory manually.  Your root
filesystem would be on the normal hard drives.

Anyhow the question is moot, since you don't have the same problem I did.

 No, it’s actually just a single RAID6-0 disk created by the P410i…

If you're going to use the RAID controller to generate a virtual drive,
do you really need to use ZFS on top of that?   Couldn't you partition
your virtual drive and put / onto a small UFS partition and then make a
zpool on the rest?

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey




signature.asc
Description: OpenPGP digital signature


Re: gptzfsboot problem on HP P410i Smart Array

2014-04-09 Thread Rainer Duffner

Am 10.04.2014 um 00:02 schrieb Matthew Seaman matt...@freebsd.org:

 On 09/04/2014 22:52, Rainer Duffner wrote:
 And no, as the server is in a remote datacenter, an USB-stick is not an 
 option.
 
 It’s slow enough booting via a virtual USB-image over iLO...
 
 Uh... it only has to read the kernel+modules from the USB stick one time
 while booting.  Otherwise, there really shouldn't be any IO inside /boot
 unless you login and do stuff in that directory manually.  Your root
 filesystem would be on the normal hard drives.
 
 Anyhow the question is moot, since you don't have the same problem I did.
 
 No, it’s actually just a single RAID6-0 disk created by the P410i…
 
 If you're going to use the RAID controller to generate a virtual drive,
 do you really need to use ZFS on top of that?   Couldn't you partition
 your virtual drive and put / onto a small UFS partition and then make a
 zpool on the rest?


I don’t want to sacrifice two disks for a RAID1 boot-disk.
Normally, I would actually do that, but in this case, the server is a 
MySQL-slave to a master that has 12 disks -  and should the master die, this 
system has to take over its work.


___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: gptzfsboot problem on HP P410i Smart Array

2014-04-09 Thread Andreas Nilsson
On Thu, Apr 10, 2014 at 1:04 AM, Rainer Duffner rai...@ultra-secure.dewrote:


 Am 10.04.2014 um 00:02 schrieb Matthew Seaman matt...@freebsd.org:

  On 09/04/2014 22:52, Rainer Duffner wrote:
  And no, as the server is in a remote datacenter, an USB-stick is not an
 option.
 
  It's slow enough booting via a virtual USB-image over iLO...
 
  Uh... it only has to read the kernel+modules from the USB stick one time
  while booting.  Otherwise, there really shouldn't be any IO inside /boot
  unless you login and do stuff in that directory manually.  Your root
  filesystem would be on the normal hard drives.
 
  Anyhow the question is moot, since you don't have the same problem I did.
 
  No, it's actually just a single RAID6-0 disk created by the P410i...
 
  If you're going to use the RAID controller to generate a virtual drive,
  do you really need to use ZFS on top of that?   Couldn't you partition
  your virtual drive and put / onto a small UFS partition and then make a
  zpool on the rest?


 I don't want to sacrifice two disks for a RAID1 boot-disk.
 Normally, I would actually do that, but in this case, the server is a
 MySQL-slave to a master that has 12 disks -  and should the master die,
 this system has to take over its work.

 You never specified exactly how it fails. But I'll take a guess:

*Attempting Boot From Hard Drive (C:)*

*gptzfsboot: error 1 lba 32*

*gptzfsboot: error 1 lba 1*

*g**ptzfsboot: No ZFS pools located, can't boot*


A workaround is
http://lists.freebsd.org/pipermail/freebsd-current/2011-August/026624.html

Best regards
Andreas
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: gptzfsboot problem on HP P410i Smart Array

2013-04-04 Thread Andriy Gapon
on 19/03/2013 18:20 John Baldwin said the following:
 Yes, we likely could start using that, we would just need to ensure it has 
 some
 sort of minimum size.  However, maybe it would always have that minimum size 
 as you
 are only going to have additional ranges if you have more than 4GB of RAM 
 anyway.
 I think though that there were some odd BIOSes that would place a hole at 
 15-16MB,
 and for those the memory region at 1MB is too small.  A minimum size of 16MB 
 might
 handle that case correctly while using the first extended region in the common
 case.

How about something like this?

Author: Andriy Gapon a...@icyb.net.ua
Date:   Wed Apr 3 11:48:34 2013 +0300

[test] zfsboot: bios_getmem prefer extmem over another random chunk of high 
memory

If the extended memory region is sufficiently large.

diff --git a/sys/boot/i386/zfsboot/zfsboot.c b/sys/boot/i386/zfsboot/zfsboot.c
index 82402b6..12ceeb0 100644
--- a/sys/boot/i386/zfsboot/zfsboot.c
+++ b/sys/boot/i386/zfsboot/zfsboot.c
@@ -374,6 +374,16 @@ bios_getmem(void)
 }

 /*
+ * If extended memory is at least twice as large as the largest
+ * region of higher memory, then carve the high heap out of
+ * extended memory.
+ */
+if (bios_extmem  2 * high_heap_size) {
+   high_heap_base = 0x10 + bios_extmem / 2;
+   high_heap_size = bios_extmem / 2;
+}
+
+/*
  * If we have extended memory and did not find a suitable heap
  * region in the SMAP, use the last 3MB of 'extended' memory as a
  * high heap candidate.


-- 
Andriy Gapon
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: gptzfsboot problem on HP P410i Smart Array

2013-04-04 Thread John Baldwin
On Thursday, April 04, 2013 12:16:32 pm Andriy Gapon wrote:
 on 19/03/2013 18:20 John Baldwin said the following:
  Yes, we likely could start using that, we would just need to ensure it has 
some
  sort of minimum size.  However, maybe it would always have that minimum 
size as you
  are only going to have additional ranges if you have more than 4GB of RAM 
anyway.
  I think though that there were some odd BIOSes that would place a hole at 
15-16MB,
  and for those the memory region at 1MB is too small.  A minimum size of 
16MB might
  handle that case correctly while using the first extended region in the 
common
  case.
 
 How about something like this?
 
 Author: Andriy Gapon a...@icyb.net.ua
 Date:   Wed Apr 3 11:48:34 2013 +0300
 
 [test] zfsboot: bios_getmem prefer extmem over another random chunk of 
high memory
 
 If the extended memory region is sufficiently large.
 
 diff --git a/sys/boot/i386/zfsboot/zfsboot.c 
b/sys/boot/i386/zfsboot/zfsboot.c
 index 82402b6..12ceeb0 100644
 --- a/sys/boot/i386/zfsboot/zfsboot.c
 +++ b/sys/boot/i386/zfsboot/zfsboot.c
 @@ -374,6 +374,16 @@ bios_getmem(void)
  }
 
  /*
 + * If extended memory is at least twice as large as the largest
 + * region of higher memory, then carve the high heap out of
 + * extended memory.
 + */
 +if (bios_extmem  2 * high_heap_size) {
 + high_heap_base = 0x10 + bios_extmem / 2;
 + high_heap_size = bios_extmem / 2;
 +}
 +
 +/*
   * If we have extended memory and did not find a suitable heap
   * region in the SMAP, use the last 3MB of 'extended' memory as a
   * high heap candidate.
 

We should really use the same algorithm in boot2 and gptboot as well.

I think though that in this case you can just use the last 3MB of heap
rather than half of the extended memory as heap.

-- 
John Baldwin
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: gptzfsboot problem on HP P410i Smart Array

2013-04-04 Thread Andriy Gapon
on 04/04/2013 20:16 John Baldwin said the following:
 On Thursday, April 04, 2013 12:16:32 pm Andriy Gapon wrote:
 diff --git a/sys/boot/i386/zfsboot/zfsboot.c 
 b/sys/boot/i386/zfsboot/zfsboot.c
 index 82402b6..12ceeb0 100644
 --- a/sys/boot/i386/zfsboot/zfsboot.c
 +++ b/sys/boot/i386/zfsboot/zfsboot.c
 @@ -374,6 +374,16 @@ bios_getmem(void)
  }

  /*
 + * If extended memory is at least twice as large as the largest
 + * region of higher memory, then carve the high heap out of
 + * extended memory.
 + */
 +if (bios_extmem  2 * high_heap_size) {
 +high_heap_base = 0x10 + bios_extmem / 2;
 +high_heap_size = bios_extmem / 2;
 +}
 +
 +/*
   * If we have extended memory and did not find a suitable heap
   * region in the SMAP, use the last 3MB of 'extended' memory as a
   * high heap candidate.

 
 We should really use the same algorithm in boot2 and gptboot as well.

Yes, this is just something to start with.

BTW, all other components use bios_getmem from sys/boot/i386/libi386/biosmem.c ?

 I think though that in this case you can just use the last 3MB of heap
 rather than half of the extended memory as heap.

I thought the more the better? :-)
I've kept the block of code that tries to make high_heap_size at least 3MB.

-- 
Andriy Gapon
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: gptzfsboot problem on HP P410i Smart Array

2013-03-21 Thread Andriy Gapon

I think it could be useful if those who have the hardware and have a support
contract would try to get in touch with the _technical_ support and give them 
some
technical details.  Maybe it's something that could be easily fixed by the 
vendor
if they know about the problem.

-- 
Andriy Gapon
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: gptzfsboot problem on HP P410i Smart Array

2013-03-20 Thread Christoph Hoffmann
Dear All,

At present I do not have access to a HP box with a SmartArray 
but zfsboot works perfectly with FreeBSD 9.1-RELEASE #0 r245668 
(including EDD fix) on:

 /hpiLO- show system1
 [...]
   Properties
 name=ProLiant DL160 Gen8
 [...]

with the following firmware

 /hpiLO- show system1/firmware1 
 [...]
 /system1/firmware1
   Targets
   Properties
 version=J03
 date=08/20/2012
 [...]

I know it is not much help, but hope it might give you 
some input. 

Thank you very much indeed for your work on this issue.

Best Regards,

Christoph

--
Christoph Hoffmann
e-mail: christoph_hoffm...@me.com

On Mar 19, 2013, at 5:20 PM, John Baldwin j...@freebsd.org wrote:

 On Tuesday, March 19, 2013 5:55:45 am Andriy Gapon wrote:
 on 19/03/2013 07:41 Sergey Dyatko said the following:
 I was faced with same problem on my laptop. Adding printf() into main()
 before dsk = malloc(sizeof(struct dsk)); fix boot. Yesterday, avg@ proposed
 patch:
 Index: /usr/src/sys/boot/i386/zfsboot/zfsboot.c
 ===
 --- /usr/src/sys/boot/i386/zfsboot/zfsboot.c(revision 248421)
 +++ /usr/src/sys/boot/i386/zfsboot/zfsboot.c(working copy)
 @@ -302,6 +302,7 @@
  * region in the SMAP, use the last 3MB of 'extended' memory as a
  * high heap candidate.
  */
 +   high_heap_size = 0;
 if (bios_extmem = HEAP_MIN  high_heap_size  HEAP_MIN) {
high_heap_size = HEAP_MIN;
high_heap_base = bios_extmem + 0x10 - HEAP_MIN;
 
 it works for me, without printf() :) Can you test it ?
 
 A comment about a nature of this patch.
 
 Based on the previous investigation by Christoph Hoffmann and jhb:
 http://thread.gmane.org/gmane.os.freebsd.current/134199/focus=134309
 I made a guess that either BIOS/firmware provides incorrect memory map or 
 some
 agent in the BIOS/firmware (e.g. SMM handler) or controller firmware writes
 outside of a memory range reserved for it.
 I think that jhb made a similar guess at the time while Christoph conjectured
 that memory corruption was related to CPU caches or some such.
 My conjecture is that it is simply a combination of timing and a particular
 memory range.
 
 Just in case, here is how the memory map looks on the Sergey's system:
 SMAP type=01 base= end=0009fc00 len=0009fc00
 SMAP type=02 base=0009fc00 end=000a len=0400
 SMAP type=02 base=000e end=0010 len=0002
 SMAP type=01 base=0010 end=bc1a1000 len=bc0a1000
 SMAP type=04 base=bc1a1000 end=bc1a4000 len=3000
 SMAP type=01 base=bc1a4000 end=bdf04000 len=01d6
 SMAP type=04 base=bdf04000 end=bdf3f000 len=0003b000
 SMAP type=01 base=bdf3f000 end=bdf6a000 len=0002b000
 SMAP type=02 base=bdf6a000 end=bdfbf000 len=00055000
 SMAP type=01 base=bdfbf000 end=bdfeb000 len=0002c000
 SMAP type=03 base=bdfeb000 end=bdfff000 len=00014000
 SMAP type=01 base=bdfff000 end=be00 len=1000
 SMAP type=02 base=be00 end=c000 len=0200
 SMAP type=02 base=f800 end=fc00 len=0400
 SMAP type=02 base=fec0 end=fec01000 len=1000
 SMAP type=02 base=fed1 end=fed14000 len=4000
 SMAP type=02 base=fed18000 end=fed1a000 len=2000
 SMAP type=02 base=fed1c000 end=fed2 len=4000
 SMAP type=02 base=fee0 end=fee01000 len=1000
 SMAP type=02 base=ffe0 end=0001 len=0020
 SMAP type=01 base=0001 end=00014000 len=4000
 
 The algorithm for placing the heap picks up a range at bc1a4000, which is
 between two ranges of type '4' (ACPI NVS memory).
 So my idea was just to try a different memory range. Seems that it worked.
 
 P.S. I am not sure why our algorithm for selecting heap location is what it 
 is.
 On all systems that I have I see that the bios_extmem range (the one 
 starting
 at 0x10) is usually the largest one and has more than enough space for 
 both
 the heap and other things that are placed there.
 
 Yes, we likely could start using that, we would just need to ensure it has 
 some
 sort of minimum size.  However, maybe it would always have that minimum size 
 as you
 are only going to have additional ranges if you have more than 4GB of RAM 
 anyway.
 I think though that there were some odd BIOSes that would place a hole at 
 15-16MB,
 and for those the memory region at 1MB is too small.  A minimum size of 16MB 
 might
 handle that case correctly while using the first extended region in the common
 case.
 
 Additionally, in the case of zfsboot I think that we do not use 

Re: gptzfsboot problem on HP P410i Smart Array

2013-03-19 Thread Andriy Gapon
on 19/03/2013 07:41 Sergey Dyatko said the following:
 I was faced with same problem on my laptop. Adding printf() into main()
 before dsk = malloc(sizeof(struct dsk)); fix boot. Yesterday, avg@ proposed
 patch:
 Index: /usr/src/sys/boot/i386/zfsboot/zfsboot.c
 ===
 --- /usr/src/sys/boot/i386/zfsboot/zfsboot.c(revision 248421)
 +++ /usr/src/sys/boot/i386/zfsboot/zfsboot.c(working copy)
 @@ -302,6 +302,7 @@
   * region in the SMAP, use the last 3MB of 'extended' memory as a
   * high heap candidate.
   */
 +   high_heap_size = 0;
  if (bios_extmem = HEAP_MIN  high_heap_size  HEAP_MIN) {
 high_heap_size = HEAP_MIN;
 high_heap_base = bios_extmem + 0x10 - HEAP_MIN;
 
 it works for me, without printf() :) Can you test it ?

A comment about a nature of this patch.

Based on the previous investigation by Christoph Hoffmann and jhb:
http://thread.gmane.org/gmane.os.freebsd.current/134199/focus=134309
I made a guess that either BIOS/firmware provides incorrect memory map or some
agent in the BIOS/firmware (e.g. SMM handler) or controller firmware writes
outside of a memory range reserved for it.
I think that jhb made a similar guess at the time while Christoph conjectured
that memory corruption was related to CPU caches or some such.
My conjecture is that it is simply a combination of timing and a particular
memory range.

Just in case, here is how the memory map looks on the Sergey's system:
SMAP type=01 base= end=0009fc00 len=0009fc00
SMAP type=02 base=0009fc00 end=000a len=0400
SMAP type=02 base=000e end=0010 len=0002
SMAP type=01 base=0010 end=bc1a1000 len=bc0a1000
SMAP type=04 base=bc1a1000 end=bc1a4000 len=3000
SMAP type=01 base=bc1a4000 end=bdf04000 len=01d6
SMAP type=04 base=bdf04000 end=bdf3f000 len=0003b000
SMAP type=01 base=bdf3f000 end=bdf6a000 len=0002b000
SMAP type=02 base=bdf6a000 end=bdfbf000 len=00055000
SMAP type=01 base=bdfbf000 end=bdfeb000 len=0002c000
SMAP type=03 base=bdfeb000 end=bdfff000 len=00014000
SMAP type=01 base=bdfff000 end=be00 len=1000
SMAP type=02 base=be00 end=c000 len=0200
SMAP type=02 base=f800 end=fc00 len=0400
SMAP type=02 base=fec0 end=fec01000 len=1000
SMAP type=02 base=fed1 end=fed14000 len=4000
SMAP type=02 base=fed18000 end=fed1a000 len=2000
SMAP type=02 base=fed1c000 end=fed2 len=4000
SMAP type=02 base=fee0 end=fee01000 len=1000
SMAP type=02 base=ffe0 end=0001 len=0020
SMAP type=01 base=0001 end=00014000 len=4000

The algorithm for placing the heap picks up a range at bc1a4000, which is
between two ranges of type '4' (ACPI NVS memory).
So my idea was just to try a different memory range. Seems that it worked.

P.S. I am not sure why our algorithm for selecting heap location is what it is.
On all systems that I have I see that the bios_extmem range (the one starting
at 0x10) is usually the largest one and has more than enough space for both
the heap and other things that are placed there.
Additionally, in the case of zfsboot I think that we do not use memory above 1MB
for anything else besides the heap.

-- 
Andriy Gapon
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: gptzfsboot problem on HP P410i Smart Array

2013-03-19 Thread John Baldwin
On Tuesday, March 19, 2013 5:55:45 am Andriy Gapon wrote:
 on 19/03/2013 07:41 Sergey Dyatko said the following:
  I was faced with same problem on my laptop. Adding printf() into main()
  before dsk = malloc(sizeof(struct dsk)); fix boot. Yesterday, avg@ proposed
  patch:
  Index: /usr/src/sys/boot/i386/zfsboot/zfsboot.c
  ===
  --- /usr/src/sys/boot/i386/zfsboot/zfsboot.c(revision 248421)
  +++ /usr/src/sys/boot/i386/zfsboot/zfsboot.c(working copy)
  @@ -302,6 +302,7 @@
* region in the SMAP, use the last 3MB of 'extended' memory as a
* high heap candidate.
*/
  +   high_heap_size = 0;
   if (bios_extmem = HEAP_MIN  high_heap_size  HEAP_MIN) {
  high_heap_size = HEAP_MIN;
  high_heap_base = bios_extmem + 0x10 - HEAP_MIN;
  
  it works for me, without printf() :) Can you test it ?
 
 A comment about a nature of this patch.
 
 Based on the previous investigation by Christoph Hoffmann and jhb:
 http://thread.gmane.org/gmane.os.freebsd.current/134199/focus=134309
 I made a guess that either BIOS/firmware provides incorrect memory map or some
 agent in the BIOS/firmware (e.g. SMM handler) or controller firmware writes
 outside of a memory range reserved for it.
 I think that jhb made a similar guess at the time while Christoph conjectured
 that memory corruption was related to CPU caches or some such.
 My conjecture is that it is simply a combination of timing and a particular
 memory range.
 
 Just in case, here is how the memory map looks on the Sergey's system:
 SMAP type=01 base= end=0009fc00 len=0009fc00
 SMAP type=02 base=0009fc00 end=000a len=0400
 SMAP type=02 base=000e end=0010 len=0002
 SMAP type=01 base=0010 end=bc1a1000 len=bc0a1000
 SMAP type=04 base=bc1a1000 end=bc1a4000 len=3000
 SMAP type=01 base=bc1a4000 end=bdf04000 len=01d6
 SMAP type=04 base=bdf04000 end=bdf3f000 len=0003b000
 SMAP type=01 base=bdf3f000 end=bdf6a000 len=0002b000
 SMAP type=02 base=bdf6a000 end=bdfbf000 len=00055000
 SMAP type=01 base=bdfbf000 end=bdfeb000 len=0002c000
 SMAP type=03 base=bdfeb000 end=bdfff000 len=00014000
 SMAP type=01 base=bdfff000 end=be00 len=1000
 SMAP type=02 base=be00 end=c000 len=0200
 SMAP type=02 base=f800 end=fc00 len=0400
 SMAP type=02 base=fec0 end=fec01000 len=1000
 SMAP type=02 base=fed1 end=fed14000 len=4000
 SMAP type=02 base=fed18000 end=fed1a000 len=2000
 SMAP type=02 base=fed1c000 end=fed2 len=4000
 SMAP type=02 base=fee0 end=fee01000 len=1000
 SMAP type=02 base=ffe0 end=0001 len=0020
 SMAP type=01 base=0001 end=00014000 len=4000
 
 The algorithm for placing the heap picks up a range at bc1a4000, which is
 between two ranges of type '4' (ACPI NVS memory).
 So my idea was just to try a different memory range. Seems that it worked.
 
 P.S. I am not sure why our algorithm for selecting heap location is what it 
 is.
 On all systems that I have I see that the bios_extmem range (the one 
 starting
 at 0x10) is usually the largest one and has more than enough space for 
 both
 the heap and other things that are placed there.

Yes, we likely could start using that, we would just need to ensure it has some
sort of minimum size.  However, maybe it would always have that minimum size as 
you
are only going to have additional ranges if you have more than 4GB of RAM 
anyway.
I think though that there were some odd BIOSes that would place a hole at 
15-16MB,
and for those the memory region at 1MB is too small.  A minimum size of 16MB 
might
handle that case correctly while using the first extended region in the common
case.

 Additionally, in the case of zfsboot I think that we do not use memory above 
 1MB
 for anything else besides the heap.

You load either /boot/zfsloader or the kernel there.

-- 
John Baldwin
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: gptzfsboot problem on HP P410i Smart Array

2013-03-18 Thread Sergey Dyatko
2012/8/20 Bjorn Larsson bjw...@gmail.com

 Hi Andrey,

 We are installing freeBSD using ZFS as root filesystem using the GPT
 method as described on the freeBSD ZFS wiki. We are creating a GPT
 boot partition with the gptzfsboot program embedded and then a zroot
 partition with the freeBSD binaries. This works well and boots on
 every system we tested except HP P410i smart array systems. The
 problem is that no disks are identified in gptzfsboot and the
 following error code is displayed:

 gptzfsboot: error 1 lba 32
 gptzfsboot: error 1 lba 1

 It appears that gptzfsboot is not identifying the drives properly.
 However, when we insert a printf() command in main() in zfsboot.c to
 troubleshoot the identification problem, the system boots perfectly
 fine.

 This is a problem that I believe was fixed last year in 9-CURRENT by
 implementing a proper struct for edd rather than using a char array
 for BIOS communication. However, it doesn't seems to have fixed the on
 the p410i smart arrays.


I was faced with same problem on my laptop. Adding printf() into main()
before dsk = malloc(sizeof(struct dsk)); fix boot. Yesterday, avg@ proposed
patch:
Index: /usr/src/sys/boot/i386/zfsboot/zfsboot.c
===
--- /usr/src/sys/boot/i386/zfsboot/zfsboot.c(revision 248421)
+++ /usr/src/sys/boot/i386/zfsboot/zfsboot.c(working copy)
@@ -302,6 +302,7 @@
  * region in the SMAP, use the last 3MB of 'extended' memory as a
  * high heap candidate.
  */
+   high_heap_size = 0;
 if (bios_extmem = HEAP_MIN  high_heap_size  HEAP_MIN) {
high_heap_size = HEAP_MIN;
high_heap_base = bios_extmem + 0x10 - HEAP_MIN;

it works for me, without printf() :) Can you test it ?

 Best regards,

 Björn Larsson


 On Sun, Aug 19, 2012 at 6:41 PM, Andrey V. Elsukov bu7c...@yandex.ru
 wrote:
 
  On 19.08.2012 11:22, Bjorn Larsson wrote:
   We are having problems with gptzfsboot on a HP DL360 G7 using the P410i
   Smart Array Controller.
   I’ve some information on this in the archive on this mailing list that
 this
   has supposedly been fixed with revision 227400, by implementing the edd
   data structure.
   However we still see the same problem and by adding a printf() in
 zfsboot.c
   fixes the problem.
   Please, let me know if anyone have seen this problem and if there is a
 fix
   for it?
 
  Hi,
 
  what exactly do you have?
 
  --
  WBR, Andrey V. Elsukov
 
 ___
 freebsd-current@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-current
 To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: gptzfsboot problem on HP P410i Smart Array

2012-08-20 Thread Bjorn Larsson
Hi Andrey,

We are installing freeBSD using ZFS as root filesystem using the GPT
method as described on the freeBSD ZFS wiki. We are creating a GPT
boot partition with the gptzfsboot program embedded and then a zroot
partition with the freeBSD binaries. This works well and boots on
every system we tested except HP P410i smart array systems. The
problem is that no disks are identified in gptzfsboot and the
following error code is displayed:

gptzfsboot: error 1 lba 32
gptzfsboot: error 1 lba 1

It appears that gptzfsboot is not identifying the drives properly.
However, when we insert a printf() command in main() in zfsboot.c to
troubleshoot the identification problem, the system boots perfectly
fine.

This is a problem that I believe was fixed last year in 9-CURRENT by
implementing a proper struct for edd rather than using a char array
for BIOS communication. However, it doesn't seems to have fixed the on
the p410i smart arrays.

Best regards,

Björn Larsson


On Sun, Aug 19, 2012 at 6:41 PM, Andrey V. Elsukov bu7c...@yandex.ru wrote:

 On 19.08.2012 11:22, Bjorn Larsson wrote:
  We are having problems with gptzfsboot on a HP DL360 G7 using the P410i
  Smart Array Controller.
  I’ve some information on this in the archive on this mailing list that this
  has supposedly been fixed with revision 227400, by implementing the edd
  data structure.
  However we still see the same problem and by adding a printf() in zfsboot.c
  fixes the problem.
  Please, let me know if anyone have seen this problem and if there is a fix
  for it?

 Hi,

 what exactly do you have?

 --
 WBR, Andrey V. Elsukov

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


gptzfsboot problem on HP P410i Smart Array

2012-08-19 Thread Bjorn Larsson
Dear


We are having problems with gptzfsboot on a HP DL360 G7 using the P410i
Smart Array Controller.


I’ve some information on this in the archive on this mailing list that this
has supposedly been fixed with revision 227400, by implementing the edd
data structure.

However we still see the same problem and by adding a printf() in zfsboot.c
fixes the problem.


Please, let me know if anyone have seen this problem and if there is a fix
for it?


Best regards,


Björn Larsson
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: gptzfsboot problem on HP P410i Smart Array

2012-08-19 Thread Andrey V. Elsukov
On 19.08.2012 11:22, Bjorn Larsson wrote:
 We are having problems with gptzfsboot on a HP DL360 G7 using the P410i
 Smart Array Controller.
 I’ve some information on this in the archive on this mailing list that this
 has supposedly been fixed with revision 227400, by implementing the edd
 data structure.
 However we still see the same problem and by adding a printf() in zfsboot.c
 fixes the problem.
 Please, let me know if anyone have seen this problem and if there is a fix
 for it?

Hi,

what exactly do you have?

-- 
WBR, Andrey V. Elsukov



signature.asc
Description: OpenPGP digital signature