via driver: fixed kerneldriver crashing system because of failing area mapping

This commit is contained in:
Rudolf Cornelissen 2016-01-05 21:20:00 +01:00
parent 8180539313
commit 32276e7762
1 changed files with 5 additions and 5 deletions

View File

@ -4,7 +4,7 @@
Other authors: Other authors:
Mark Watson; Mark Watson;
Rudolf Cornelissen 3/2002-4/2006. Rudolf Cornelissen 3/2002-1/2016.
*/ */
/* standard kernel driver stuff */ /* standard kernel driver stuff */
@ -418,7 +418,7 @@ static status_t map_device(device_info *di)
rom_area = map_physical_memory( rom_area = map_physical_memory(
buffer, buffer,
(void *)di->pcii.u.h0.rom_base_pci, di->pcii.u.h0.rom_base_pci,
di->pcii.u.h0.rom_size, di->pcii.u.h0.rom_size,
B_ANY_KERNEL_ADDRESS, B_ANY_KERNEL_ADDRESS,
B_READ_AREA, B_READ_AREA,
@ -441,7 +441,7 @@ static status_t map_device(device_info *di)
/* ROM was not assigned an adress, fetch it from ISA legacy memory map! */ /* ROM was not assigned an adress, fetch it from ISA legacy memory map! */
rom_area = map_physical_memory( rom_area = map_physical_memory(
buffer, buffer,
(void *)0x000c0000, 0x000c0000,
65536, 65536,
B_ANY_KERNEL_ADDRESS, B_ANY_KERNEL_ADDRESS,
B_READ_AREA, B_READ_AREA,
@ -477,7 +477,7 @@ static status_t map_device(device_info *di)
si->fb_area = map_physical_memory( si->fb_area = map_physical_memory(
buffer, buffer,
/* WARNING: Nvidia needs to map framebuffer as viewed from PCI space! */ /* WARNING: Nvidia needs to map framebuffer as viewed from PCI space! */
(void *) di->pcii.u.h0.base_registers_pci[frame_buffer], di->pcii.u.h0.base_registers_pci[frame_buffer],
di->pcii.u.h0.base_register_sizes[frame_buffer], di->pcii.u.h0.base_register_sizes[frame_buffer],
B_ANY_KERNEL_BLOCK_ADDRESS | B_MTR_WC, B_ANY_KERNEL_BLOCK_ADDRESS | B_MTR_WC,
B_READ_AREA + B_WRITE_AREA, B_READ_AREA + B_WRITE_AREA,
@ -488,7 +488,7 @@ static status_t map_device(device_info *di)
si->fb_area = map_physical_memory( si->fb_area = map_physical_memory(
buffer, buffer,
/* WARNING: Nvidia needs to map framebuffer as viewed from PCI space! */ /* WARNING: Nvidia needs to map framebuffer as viewed from PCI space! */
(void *) di->pcii.u.h0.base_registers_pci[frame_buffer], di->pcii.u.h0.base_registers_pci[frame_buffer],
di->pcii.u.h0.base_register_sizes[frame_buffer], di->pcii.u.h0.base_register_sizes[frame_buffer],
B_ANY_KERNEL_BLOCK_ADDRESS, B_ANY_KERNEL_BLOCK_ADDRESS,
B_READ_AREA + B_WRITE_AREA, B_READ_AREA + B_WRITE_AREA,