From e13ac2cb1329d5b659b98b9e20d170d74ca603a1 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Thu, 25 Mar 2010 05:25:07 +0000 Subject: [PATCH] merge from amd64 branch: 34741 (tkreuzer) [BOOTVID] - make bootvid build for PLATFORM=PC instead of ARCH=i386 to share the files between i386 and amd64 - fix ULONG <-> pointer casts svn path=/trunk/; revision=46432 --- reactos/drivers/base/bootvid/bootvid.rbuild | 2 +- reactos/drivers/base/bootvid/i386/bootvid.c | 2 +- reactos/drivers/base/bootvid/i386/vga.c | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/reactos/drivers/base/bootvid/bootvid.rbuild b/reactos/drivers/base/bootvid/bootvid.rbuild index fc9f3ec3bf5..0c996310194 100644 --- a/reactos/drivers/base/bootvid/bootvid.rbuild +++ b/reactos/drivers/base/bootvid/bootvid.rbuild @@ -6,7 +6,7 @@ . ntoskrnl hal - + bootvid.c bootdata.c diff --git a/reactos/drivers/base/bootvid/i386/bootvid.c b/reactos/drivers/base/bootvid/i386/bootvid.c index c55ffc16255..3d0ae503167 100644 --- a/reactos/drivers/base/bootvid/i386/bootvid.c +++ b/reactos/drivers/base/bootvid/i386/bootvid.c @@ -355,7 +355,7 @@ BOOLEAN NTAPI VidInitialize(IN BOOLEAN SetMode) { - ULONG Context = 0; + ULONG_PTR Context = 0; PHYSICAL_ADDRESS TranslatedAddress; PHYSICAL_ADDRESS NullAddress = {{0, 0}}, VgaAddress; ULONG AddressSpace = 1; diff --git a/reactos/drivers/base/bootvid/i386/vga.c b/reactos/drivers/base/bootvid/i386/vga.c index e11aae77fab..eeb06fe8df5 100644 --- a/reactos/drivers/base/bootvid/i386/vga.c +++ b/reactos/drivers/base/bootvid/i386/vga.c @@ -319,8 +319,8 @@ VgaScroll(ULONG Scroll) do { /* Write value in the new position so that we can do the scroll */ - WRITE_REGISTER_UCHAR((PUCHAR)j, - READ_REGISTER_UCHAR((PUCHAR)j + i)); + WRITE_REGISTER_UCHAR(UlongToPtr(j), + READ_REGISTER_UCHAR(UlongToPtr(j + i))); /* Move to the next memory location to write to */ j++; @@ -1197,7 +1197,7 @@ VidSolidColorFill(IN ULONG Left, __outpw(0x3CE, 7); /* Calculate pixel position for the read */ - Offset = VgaBase + (Top * 80) + (PUCHAR)LeftOffset; + Offset = VgaBase + (Top * 80) + (PUCHAR)(ULONG_PTR)LeftOffset; /* Select the bitmask register and write the mask */ __outpw(0x3CE, (USHORT)lMask); @@ -1221,7 +1221,7 @@ VidSolidColorFill(IN ULONG Left, if (Distance) { /* Calculate new pixel position */ - Offset = VgaBase + (Top * 80) + (PUCHAR)RightOffset; + Offset = VgaBase + (Top * 80) + (PUCHAR)(ULONG_PTR)RightOffset; Distance--; /* Select the bitmask register and write the mask */ @@ -1247,7 +1247,7 @@ VidSolidColorFill(IN ULONG Left, if (Distance) { /* Calculate new pixel position */ - Offset = VgaBase + (Top * 80) + (PUCHAR)(LeftOffset + 1); + Offset = VgaBase + (Top * 80) + (PUCHAR)(ULONG_PTR)(LeftOffset + 1); /* Set the bitmask to 0xFF for all 4 planes */ __outpw(0x3CE, 0xFF08); -- 2.17.1