corrected all dummyreads to use volatile pointers. Thanks Marcus Overhagen for reading along.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13082 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rudolf Cornelissen 2005-06-13 09:23:26 +00:00
parent 3b10d8ead3
commit 081f461390
2 changed files with 10 additions and 10 deletions

View File

@ -1264,7 +1264,7 @@ static void nv_start_dma(void)
else
{
/* dummy read the first adress of the framebuffer to flush MTRR-WC buffers */
dummy = *((uint32 *)(si->framebuffer));
dummy = *((volatile uint32 *)(si->framebuffer));
}
/* actually start DMA to execute all commands now in buffer */

View File

@ -1,7 +1,7 @@
/* Read initialisation information from card */
/* some bits are hacks, where PINS is not known */
/* Author:
Rudolf Cornelissen 7/2003-5/2005
Rudolf Cornelissen 7/2003-6/2005
*/
#define MODULE_BIT 0x00002000
@ -1916,10 +1916,10 @@ static void setup_ram_config_nv10_up(uint8* rom)
/* reset first RAM adress */
((uint32 *)si->framebuffer)[0x00] = 0x00000000;
/* dummyread first RAM adress four times */
dummy = ((uint32 *)si->framebuffer)[0x00];
dummy = ((uint32 *)si->framebuffer)[0x00];
dummy = ((uint32 *)si->framebuffer)[0x00];
dummy = ((uint32 *)si->framebuffer)[0x00];
dummy = ((volatile uint32 *)si->framebuffer)[0x00];
dummy = ((volatile uint32 *)si->framebuffer)[0x00];
dummy = ((volatile uint32 *)si->framebuffer)[0x00];
dummy = ((volatile uint32 *)si->framebuffer)[0x00];
/* check testpattern to have survived */
if (((uint32 *)si->framebuffer)[(data >> 2)] == 0x4e564441) stat = B_OK;
cnt++;
@ -1958,13 +1958,13 @@ static void setup_ram_config_nv28(uint8* rom)
/* reset first RAM adress */
((uint32 *)si->framebuffer)[0x00000000] = 0x00000000;
/* dummyread first RAM adress four times */
dummy = ((uint32 *)si->framebuffer)[0x00000000];
dummy = ((volatile uint32 *)si->framebuffer)[0x00000000];
LOG(8,("INFO: (#%d) dummy1 = $%08x, ", cnt, dummy));
dummy = ((uint32 *)si->framebuffer)[0x00000000];
dummy = ((volatile uint32 *)si->framebuffer)[0x00000000];
LOG(8,("dummy2 = $%08x, ", dummy));
dummy = ((uint32 *)si->framebuffer)[0x00000000];
dummy = ((volatile uint32 *)si->framebuffer)[0x00000000];
LOG(8,("dummy3 = $%08x, ", dummy));
dummy = ((uint32 *)si->framebuffer)[0x00000000];
dummy = ((volatile uint32 *)si->framebuffer)[0x00000000];
LOG(8,("dummy4 = $%08x\n", dummy));
/* check testpattern to have survived */
if (((uint32 *)si->framebuffer)[0x01fc0000] == 0x4e564441) stat = B_OK;