From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LGLkE-0007Ff-8w for qemu-devel@nongnu.org; Fri, 26 Dec 2008 18:05:26 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LGLkD-0007FD-2Y for qemu-devel@nongnu.org; Fri, 26 Dec 2008 18:05:25 -0500 Received: from [199.232.76.173] (port=37629 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LGLkC-0007F7-Up for qemu-devel@nongnu.org; Fri, 26 Dec 2008 18:05:24 -0500 Received: from savannah.gnu.org ([199.232.41.3]:43726 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LGLkC-0007VC-IY for qemu-devel@nongnu.org; Fri, 26 Dec 2008 18:05:24 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LGLkC-0005mb-9F for qemu-devel@nongnu.org; Fri, 26 Dec 2008 23:05:24 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LGLkC-0005mX-3F for qemu-devel@nongnu.org; Fri, 26 Dec 2008 23:05:24 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Fri, 26 Dec 2008 23:05:24 +0000 Subject: [Qemu-devel] [6133] target-ppc: workaround OpenBIOS limitation Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 6133 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6133 Author: aurel32 Date: 2008-12-26 23:05:23 +0000 (Fri, 26 Dec 2008) Log Message: ----------- target-ppc: workaround OpenBIOS limitation Signed-off-by: Aurelien Jarno Modified Paths: -------------- trunk/hw/mac_nvram.c Modified: trunk/hw/mac_nvram.c =================================================================== --- trunk/hw/mac_nvram.c 2008-12-26 23:05:15 UTC (rev 6132) +++ trunk/hw/mac_nvram.c 2008-12-26 23:05:23 UTC (rev 6133) @@ -43,6 +43,8 @@ uint8_t *data; }; +#define DEF_SYSTEM_SIZE 0xc10 + /* Direct access to NVRAM */ uint32_t macio_nvram_read (void *opaque, uint32_t addr) { @@ -151,6 +153,10 @@ nvr->data[end++] = '\0'; end = start + ((end - start + 15) & ~15); + /* XXX: OpenBIOS is not able to grow up a partition. Leave some space for + new variables. */ + if (end < DEF_SYSTEM_SIZE) + end = DEF_SYSTEM_SIZE; OpenBIOS_finish_partition(part_header, end - start); // free partition