1. fixed InbvPutPixels() to save the ebx register which caused bootvid to crash when built with optimizations
2. build bootvid with optimizations when enabled
Modified: trunk/reactos/drivers/dd/bootvid/bootvid.c
Modified: trunk/reactos/drivers/dd/bootvid/pixelsup_i386.S
Modified: trunk/reactos/tools/helper.mk

Modified: trunk/reactos/drivers/dd/bootvid/bootvid.c
--- trunk/reactos/drivers/dd/bootvid/bootvid.c	2005-01-28 06:10:01 UTC (rev 13345)
+++ trunk/reactos/drivers/dd/bootvid/bootvid.c	2005-01-28 11:37:09 UTC (rev 13346)
@@ -66,7 +66,6 @@
 /* Must be 4 bytes per entry */
 long maskbit[640];
 
-static HANDLE BitmapThreadHandle;
 static CLIENT_ID BitmapThreadId;
 static PUCHAR BootimageBitmap;
 
@@ -556,6 +555,7 @@
 VidInitialize(VOID)
 {
    NTSTATUS Status;
+   HANDLE BitmapThreadHandle;
 
    InbvMapVideoMemory();
    InbvInitVGAMode();
@@ -574,7 +574,7 @@
       return FALSE;
    }
 
-   NtClose(BitmapThreadHandle);
+   ZwClose(BitmapThreadHandle);
 
    return TRUE;
 }

Modified: trunk/reactos/drivers/dd/bootvid/pixelsup_i386.S
--- trunk/reactos/drivers/dd/bootvid/pixelsup_i386.S	2005-01-28 06:10:01 UTC (rev 13345)
+++ trunk/reactos/drivers/dd/bootvid/pixelsup_i386.S	2005-01-28 11:37:09 UTC (rev 13346)
@@ -28,6 +28,7 @@
 _InbvPutPixels:
 	pushl	%ebp
 	movl	%esp, %ebp
+	pushl	%ebx
 
   /* Compute mask and put it in EBX
      mask = maskbit[x] */
@@ -66,7 +67,7 @@
     (UCHAR) READ_REGISTER_UCHAR(VideoMemory + offset+0); */
   movl	(_VideoMemory), %esi
   addl	%ebx, %esi
-  movb  0x0(%esi), %bl
+   movb  0x0(%esi), %bl
   /* Write color index for first pixel
      *((PUCHAR)(VideoMemory + offset+0)) = (c >> 0*8) & 0xff; */
   movl  0x10(%ebp), %eax
@@ -96,6 +97,7 @@
   shrl  $0x8, %eax
   movb  %al, 0x3(%esi)
 
+  popl  %ebx
   popl  %ebp
 	ret
 

Modified: trunk/reactos/tools/helper.mk
--- trunk/reactos/tools/helper.mk	2005-01-28 06:10:01 UTC (rev 13345)
+++ trunk/reactos/tools/helper.mk	2005-01-28 11:37:09 UTC (rev 13346)
@@ -618,10 +618,8 @@
 # if needed, until their problems can be found
 #
 ifeq ($(OPTIMIZED), 1)
-  ifneq ($(TARGET_NAME), bootvid)
-    MK_CFLAGS += -O2 -Wno-strict-aliasing
-    MK_CPPFLAGS += -O2 -Wno-strict-aliasing
-  endif
+  MK_CFLAGS += -O2 -Wno-strict-aliasing
+  MK_CPPFLAGS += -O2 -Wno-strict-aliasing
 endif
 
 ifneq ($(TARGET_LIBS),)