now also rom image files dumped have the hardware ID's and location in it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15122 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -369,12 +369,17 @@ static nv_settings current_settings = { // see comments in nv.settings
|
|||||||
false, // vga_on_tv
|
false, // vga_on_tv
|
||||||
};
|
};
|
||||||
|
|
||||||
static void dumprom (void *rom, uint32 size)
|
static void dumprom (void *rom, uint32 size, pci_info pcii)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
uint32 cnt;
|
uint32 cnt;
|
||||||
|
char fname[64];
|
||||||
fd = open ("/boot/home/" DRIVER_PREFIX ".rom", O_WRONLY | O_CREAT, 0666);
|
|
||||||
|
/* determine the romfile name: we need split-up per card in the system */
|
||||||
|
sprintf (fname, "/boot/home/" DRIVER_PREFIX "." DEVICE_FORMAT ".rom",
|
||||||
|
pcii.vendor_id, pcii.device_id, pcii.bus, pcii.device, pcii.function);
|
||||||
|
|
||||||
|
fd = open (fname, O_WRONLY | O_CREAT, 0666);
|
||||||
if (fd < 0) return;
|
if (fd < 0) return;
|
||||||
|
|
||||||
/* apparantly max. 32kb may be written at once;
|
/* apparantly max. 32kb may be written at once;
|
||||||
@@ -700,7 +705,7 @@ static status_t map_device(device_info *di)
|
|||||||
|
|
||||||
/* dump ROM to file if selected in nv.settings
|
/* dump ROM to file if selected in nv.settings
|
||||||
* (ROM always fits in 64Kb: checked TNT1 - FX5950) */
|
* (ROM always fits in 64Kb: checked TNT1 - FX5950) */
|
||||||
if (current_settings.dumprom) dumprom (rom_temp, 65536);
|
if (current_settings.dumprom) dumprom (rom_temp, 65536, di->pcii);
|
||||||
/* make a copy of ROM for future reference */
|
/* make a copy of ROM for future reference */
|
||||||
memcpy (si->rom_mirror, rom_temp, 65536);
|
memcpy (si->rom_mirror, rom_temp, 65536);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user