Commit 0d31cb9954bf864f7cf189d9a9198ff17e28a1c9

Authored by blueswir1
1 parent 71817e48

Add idprom

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4870 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 11 additions and 7 deletions
hw/sun4u.c
... ... @@ -98,7 +98,8 @@ static int sun4u_NVRAM_set_params (m48t59_t *nvram, uint16_t NVRAM_size,
98 98 const char *cmdline,
99 99 uint32_t initrd_image, uint32_t initrd_size,
100 100 uint32_t NVRAM_image,
101   - int width, int height, int depth)
  101 + int width, int height, int depth,
  102 + const uint8_t *macaddr)
102 103 {
103 104 unsigned int i;
104 105 uint32_t start, end;
... ... @@ -172,6 +173,8 @@ static int sun4u_NVRAM_set_params (m48t59_t *nvram, uint16_t NVRAM_size,
172 173 end = 0x1fd0;
173 174 OpenBIOS_finish_partition(part_header, end - start);
174 175  
  176 + Sun_init_header((struct Sun_nvram *)&image[0x1fd8], macaddr, 0x80);
  177 +
175 178 for (i = 0; i < sizeof(image); i++)
176 179 m48t59_write(nvram, i, image[i]);
177 180  
... ... @@ -396,12 +399,13 @@ static void sun4u_init(ram_addr_t RAM_size, int vga_ram_size,
396 399 floppy_controller = fdctrl_init(NULL/*6*/, 2, 0, 0x3f0, fd);
397 400 nvram = m48t59_init(NULL/*8*/, 0, 0x0074, NVRAM_SIZE, 59);
398 401 sun4u_NVRAM_set_params(nvram, NVRAM_SIZE, "Sun4u", RAM_size, boot_devices,
399   - KERNEL_LOAD_ADDR, kernel_size,
400   - kernel_cmdline,
401   - INITRD_LOAD_ADDR, initrd_size,
402   - /* XXX: need an option to load a NVRAM image */
403   - 0,
404   - graphic_width, graphic_height, graphic_depth);
  402 + KERNEL_LOAD_ADDR, kernel_size,
  403 + kernel_cmdline,
  404 + INITRD_LOAD_ADDR, initrd_size,
  405 + /* XXX: need an option to load a NVRAM image */
  406 + 0,
  407 + graphic_width, graphic_height, graphic_depth,
  408 + (uint8_t *)&nd_table[0].macaddr);
405 409  
406 410 }
407 411  
... ...