fixed VGA BIOS ROM dump to file option, updated docs, updated default settings.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9738 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -4,13 +4,15 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<p><h2>Changes done for each driverversion:</h2></p>
|
<p><h2>Changes done for each driverversion:</h2></p>
|
||||||
<p><h1>head 0.09 (Rudolf)</h1></p>
|
<p><h1>head 0.10 (Rudolf)</h1></p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Added full 2D acceleration for all remaining cards that did not have that yet with this driver (still largely untested);
|
<li>Added full 2D acceleration for all remaining cards that did not have that yet with this driver (still largely untested);
|
||||||
<li>Fixed a long standing problem with MagicMedia (all NM2200 and later) cards with overlay: buffer width is programmed correctly now. Can't believe I didn't see that before!
|
<li>Fixed a long standing problem with MagicMedia (all NM2200 and later) cards with overlay: buffer width is programmed correctly now. Can't believe I didn't see that before!
|
||||||
<li>Updated NM2200 and later cards workspace virtualsize restrictions for accelerated modes: it turns out these cards engines have the same restrictions as most older ones, being 1600x1024 resolution;
|
<li>Updated NM2200 and later cards workspace virtualsize restrictions for accelerated modes: it turns out these cards engines have the same restrictions as most older ones, being 1600x1024 resolution;
|
||||||
<li>Updated overlay scaling restrictions: officially the cards support upto and including 8x upscaling;
|
<li>Updated overlay scaling restrictions: officially the cards support upto and including 8x upscaling;
|
||||||
<li>Fixed error regarding calculating overlay engine register value for right-clipping video output: on NM2200 and later this was (probably) responsible for the big-time output distortions even without clipping!
|
<li>Fixed error regarding calculating overlay engine register value for right-clipping video output: on NM2200 and later this was (probably) responsible for the big-time output distortions even without clipping!
|
||||||
|
<li>Fixed BIOS ROM dump (to file) option;
|
||||||
|
<li>Fixed GET_TIMING_CONSTRAINTS and GET_ACCELERANT_DEVICE_INFO accelerant hooks to return valid data; updated modeline checking and modification code (used by ProposeDisplayMode) to adhere to one more timing constraint.
|
||||||
</ul>
|
</ul>
|
||||||
<p><h1>nm_driver 0.06 (Rudolf)</h1></p>
|
<p><h1>nm_driver 0.06 (Rudolf)</h1></p>
|
||||||
<ul>
|
<ul>
|
||||||
@@ -61,7 +63,7 @@ Acceleration engine benchmarked and tested for errors with BeRoMeter V1.2.6.
|
|||||||
<p><h1>Still todo:</h1></p>
|
<p><h1>Still todo:</h1></p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>fix for trouble with booting into modes above 800x600 resolution on some cards (please report this behaviour!);
|
<li>fix for trouble with booting into modes above 800x600 resolution on some cards (please report this behaviour!);
|
||||||
<li>MagicMedia series overlay update: still contains errors???.
|
<li>setup workarounds for MagicMedia series overlay engine and 2D acceleration engine hardware faults.
|
||||||
</ul>
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
Other authors:
|
Other authors:
|
||||||
Mark Watson;
|
Mark Watson;
|
||||||
Apsed;
|
Apsed;
|
||||||
Rudolf Cornelissen 5/2002-8/2004.
|
Rudolf Cornelissen 5/2002-11/2004.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* standard kernel driver stuff */
|
/* standard kernel driver stuff */
|
||||||
@@ -129,15 +129,22 @@ static settings current_settings = { // see comments in nm.settings
|
|||||||
// for accelerant
|
// for accelerant
|
||||||
0x00000000, // logmask
|
0x00000000, // logmask
|
||||||
0, // memory
|
0, // memory
|
||||||
false, // usebios
|
true, // usebios
|
||||||
false, // hardcursor
|
true, // hardcursor
|
||||||
};
|
};
|
||||||
|
|
||||||
static void dumprom (void *rom, size_t size)
|
static void dumprom (void *rom, uint32 size)
|
||||||
{
|
{
|
||||||
int fd = open ("/boot/home/" DRIVER_PREFIX ".rom", O_WRONLY | O_CREAT, 0666);
|
int fd;
|
||||||
|
uint32 cnt;
|
||||||
|
|
||||||
|
fd = open ("/boot/home/" DRIVER_PREFIX ".rom", O_WRONLY | O_CREAT, 0666);
|
||||||
if (fd < 0) return;
|
if (fd < 0) return;
|
||||||
write (fd, rom, size);
|
|
||||||
|
/* apparantly max. 32kb may be written at once;
|
||||||
|
* the ROM size is a multiple of that anyway. */
|
||||||
|
for (cnt = 0; (cnt < size); cnt += 32768)
|
||||||
|
write (fd, ((void *)(((uint8 *)rom) + cnt)), 32768);
|
||||||
close (fd);
|
close (fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -317,8 +324,8 @@ static status_t map_device(device_info *di)
|
|||||||
pci_info *pcii = &(di->pcii);
|
pci_info *pcii = &(di->pcii);
|
||||||
system_info sysinfo;
|
system_info sysinfo;
|
||||||
|
|
||||||
/*variables for making copy of ROM*/
|
/* variables for making copy of ROM */
|
||||||
char * rom_temp;
|
uint8* rom_temp;
|
||||||
area_id rom_area;
|
area_id rom_area;
|
||||||
|
|
||||||
int frame_buffer = 0;
|
int frame_buffer = 0;
|
||||||
@@ -408,19 +415,46 @@ static status_t map_device(device_info *di)
|
|||||||
di->pcii.vendor_id, di->pcii.device_id,
|
di->pcii.vendor_id, di->pcii.device_id,
|
||||||
di->pcii.bus, di->pcii.device, di->pcii.function);
|
di->pcii.bus, di->pcii.device, di->pcii.function);
|
||||||
|
|
||||||
/*place ROM over the fbspace (this is definately safe)*/
|
/* get ROM memory mapped base adress - this is defined in the PCI standard */
|
||||||
tmpUlong = di->pcii.u.h0.base_registers[frame_buffer];
|
tmpUlong = get_pci(PCI_rom_base, 4);
|
||||||
tmpUlong |= 0x00000001;
|
if (tmpUlong)
|
||||||
set_pci(PCI_rom_base, 4, tmpUlong);
|
{
|
||||||
|
/* ROM was assigned an adress, so enable ROM decoding - see PCI standard */
|
||||||
|
tmpUlong |= 0x00000001;
|
||||||
|
set_pci(PCI_rom_base, 4, tmpUlong);
|
||||||
|
|
||||||
rom_area = map_physical_memory(
|
rom_area = map_physical_memory(
|
||||||
buffer,
|
buffer,
|
||||||
(void *)di->pcii.u.h0.base_registers[frame_buffer],
|
(void *)di->pcii.u.h0.rom_base_pci,
|
||||||
32768,
|
di->pcii.u.h0.rom_size,
|
||||||
B_ANY_KERNEL_ADDRESS,
|
B_ANY_KERNEL_ADDRESS,
|
||||||
B_READ_AREA,
|
B_READ_AREA,
|
||||||
(void **)&(rom_temp)
|
(void **)&(rom_temp)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/* check if we got the BIOS signature (might fail on laptops..) */
|
||||||
|
if (rom_temp[0]!=0x55 || rom_temp[1]!=0xaa)
|
||||||
|
{
|
||||||
|
/* apparantly no ROM is mapped here */
|
||||||
|
delete_area(rom_area);
|
||||||
|
rom_area = -1;
|
||||||
|
/* force using ISA legacy map as fall-back */
|
||||||
|
tmpUlong = 0x00000000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!tmpUlong)
|
||||||
|
{
|
||||||
|
/* ROM was not assigned an adress, fetch it from ISA legacy memory map! */
|
||||||
|
rom_area = map_physical_memory(
|
||||||
|
buffer,
|
||||||
|
(void *)0x000c0000,
|
||||||
|
32768,
|
||||||
|
B_ANY_KERNEL_ADDRESS,
|
||||||
|
B_READ_AREA,
|
||||||
|
(void **)&(rom_temp)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/* if mapping ROM to vmem failed then clean up and pass on error */
|
/* if mapping ROM to vmem failed then clean up and pass on error */
|
||||||
if (rom_area < 0) {
|
if (rom_area < 0) {
|
||||||
@@ -437,12 +471,16 @@ static status_t map_device(device_info *di)
|
|||||||
return rom_area;
|
return rom_area;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* make a copy of ROM for future reference*/
|
/* dump ROM to file if selected in nm.settings
|
||||||
memcpy (si->rom_mirror, rom_temp, 32768);
|
* (ROM should always fit in 32Kb) */
|
||||||
if (current_settings.dumprom) dumprom (rom_temp, 32768);
|
if (current_settings.dumprom) dumprom (rom_temp, 32768);
|
||||||
|
/* make a copy of ROM for future reference */
|
||||||
|
memcpy (si->rom_mirror, rom_temp, 32768);
|
||||||
|
|
||||||
/*disable ROM and delete the area*/
|
/* disable ROM decoding - this is defined in the PCI standard, and delete the area */
|
||||||
set_pci(PCI_rom_base,4,0);
|
tmpUlong = get_pci(PCI_rom_base, 4);
|
||||||
|
tmpUlong &= 0xfffffffe;
|
||||||
|
set_pci(PCI_rom_base, 4, tmpUlong);
|
||||||
delete_area(rom_area);
|
delete_area(rom_area);
|
||||||
|
|
||||||
/* work out a name for the framebuffer mapping*/
|
/* work out a name for the framebuffer mapping*/
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
# accelerant "nm.accelerant"
|
# accelerant "nm.accelerant"
|
||||||
|
|
||||||
# nm.accelerant parameters
|
# nm.accelerant parameters
|
||||||
usebios false # if true rely on bios to coldstart the card instead of driver
|
usebios true # if true rely on bios to coldstart the card instead of driver
|
||||||
#memory 2048 # in Kb, override builtin memory size detection
|
#memory 2048 # in Kb, override builtin memory size detection
|
||||||
hardcursor true # if true use on-chip cursor capabilities
|
hardcursor true # if true use on-chip cursor capabilities
|
||||||
#logmask 0x00000000 # nothing logged, except errors, is default
|
#logmask 0x00000000 # nothing logged, except errors, is default
|
||||||
|
|||||||
Reference in New Issue
Block a user