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
This commit is contained in:
Timo Kreuzer 2010-03-25 05:25:07 +00:00
parent 67c1ce90bd
commit e13ac2cb13
3 changed files with 7 additions and 7 deletions

View file

@ -6,7 +6,7 @@
<include base="bootvid">.</include>
<library>ntoskrnl</library>
<library>hal</library>
<if property="ARCH" value="i386">
<if property="PLATFORM" value="PC">
<directory name="i386">
<file>bootvid.c</file>
<file>bootdata.c</file>

View file

@ -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;

View file

@ -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);