Author: blueswirl Date: 2007-04-29 21:57:01 +0200 (Sun, 29 Apr 2007) New Revision: 134
Modified: openbios-devel/drivers/obio.c Log: Fix nvram parameter area
Modified: openbios-devel/drivers/obio.c =================================================================== --- openbios-devel/drivers/obio.c 2007-04-29 19:55:08 UTC (rev 133) +++ openbios-devel/drivers/obio.c 2007-04-29 19:57:01 UTC (rev 134) @@ -291,19 +291,21 @@ void arch_nvram_get(char *data) { - memcpy(data, nvram, NVRAM_SIZE); + memcpy(data, &nvram[sizeof(struct qemu_nvram_v1)], + NVRAM_IDPROM - sizeof(struct qemu_nvram_v1)); }
void arch_nvram_put(char *data) { - memcpy(nvram, data, NVRAM_SIZE); + memcpy(&nvram[sizeof(struct qemu_nvram_v1)], data, + NVRAM_IDPROM - sizeof(struct qemu_nvram_v1)); }
int arch_nvram_size(void) { - return NVRAM_SIZE; + return (NVRAM_IDPROM - sizeof(struct qemu_nvram_v1)) & ~15; }
static void mb86904_init(void)