提交 bd89f43f 编写于 作者: A aurel32

target-ppc: workaround OpenBIOS limitation

Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6133 c046a42c-6fe2-441c-8c8c-71466251a162
上级 3f7cbbbd
......@@ -43,6 +43,8 @@ struct MacIONVRAMState {
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 @@ void pmac_format_nvram_partition (MacIONVRAMState *nvr, int len)
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册