Commit in freeldr/freeldr on MAIN
machine.c+9-21.5 -> 1.6
arch/i386/machpc.c+2-11.5 -> 1.6
         /machpc.h+2-11.5 -> 1.6
         /machxbox.c+2-11.5 -> 1.6
         /machxbox.h+2-11.5 -> 1.6
         /mb.S+5-1141.4 -> 1.5
         /pcvideo.c+8-11.1 -> 1.2
         /xboxvideo.c+8-21.3 -> 1.4
include/machine.h+3-11.5 -> 1.6
reactos/reactos.c+1-11.39 -> 1.40
+42-125
10 modified files
Make transfer of control to kernel work on Xbox

freeldr/freeldr
machine.c 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- machine.c	14 Nov 2004 22:04:38 -0000	1.5
+++ machine.c	23 Nov 2004 11:28:02 -0000	1.6
@@ -1,4 +1,4 @@
-/* $Id: machine.c,v 1.5 2004/11/14 22:04:38 gvg Exp $
+/* $Id: machine.c,v 1.6 2004/11/23 11:28:02 gvg Exp $
  *
  *  FreeLoader
  *
@@ -35,6 +35,7 @@
 #undef MachVideoSetPaletteColor
 #undef MachVideoGetPaletteColor
 #undef MachVideoSync
+#undef MachVideoPrepareForReactOS
 #undef MachGetMemoryMap
 #undef MachDiskReadLogicalSectors
 #undef MachDiskGetPartitionEntry
@@ -131,7 +132,13 @@
 VOID
 MachVideoSync(VOID)
 {
-  return MachVtbl.VideoSync();
+  MachVtbl.VideoSync();
+}
+
+VOID
+MachVideoPrepareForReactOS(VOID)
+{
+  MachVtbl.VideoPrepareForReactOS();
 }
 
 U32

freeldr/freeldr/arch/i386
machpc.c 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- machpc.c	14 Nov 2004 22:04:38 -0000	1.5
+++ machpc.c	23 Nov 2004 11:28:02 -0000	1.6
@@ -1,4 +1,4 @@
-/* $Id: machpc.c,v 1.5 2004/11/14 22:04:38 gvg Exp $
+/* $Id: machpc.c,v 1.6 2004/11/23 11:28:02 gvg Exp $
  *
  *  FreeLoader
  *
@@ -46,6 +46,7 @@
   MachVtbl.VideoSetPaletteColor = PcVideoSetPaletteColor;
   MachVtbl.VideoGetPaletteColor = PcVideoGetPaletteColor;
   MachVtbl.VideoSync = PcVideoSync;
+  MachVtbl.VideoPrepareForReactOS = PcVideoPrepareForReactOS;
   MachVtbl.GetMemoryMap = PcMemGetMemoryMap;
   MachVtbl.DiskReadLogicalSectors = PcDiskReadLogicalSectors;
   MachVtbl.DiskGetPartitionEntry = PcDiskGetPartitionEntry;

freeldr/freeldr/arch/i386
machpc.h 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- machpc.h	14 Nov 2004 22:04:38 -0000	1.5
+++ machpc.h	23 Nov 2004 11:28:02 -0000	1.6
@@ -1,4 +1,4 @@
-/* $Id: machpc.h,v 1.5 2004/11/14 22:04:38 gvg Exp $
+/* $Id: machpc.h,v 1.6 2004/11/23 11:28:02 gvg Exp $
  *
  *  FreeLoader
  *
@@ -44,6 +44,7 @@
 VOID PcVideoSetPaletteColor(U8 Color, U8 Red, U8 Green, U8 Blue);
 VOID PcVideoGetPaletteColor(U8 Color, U8* Red, U8* Green, U8* Blue);
 VOID PcVideoSync(VOID);
+VOID PcVideoPrepareForReactOS(VOID);
 
 U32 PcMemGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MaxMemoryMapSize);
 

freeldr/freeldr/arch/i386
machxbox.c 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- machxbox.c	14 Nov 2004 22:04:38 -0000	1.5
+++ machxbox.c	23 Nov 2004 11:28:02 -0000	1.6
@@ -1,4 +1,4 @@
-/* $Id: machxbox.c,v 1.5 2004/11/14 22:04:38 gvg Exp $
+/* $Id: machxbox.c,v 1.6 2004/11/23 11:28:02 gvg Exp $
  *
  *  FreeLoader
  *
@@ -44,6 +44,7 @@
   MachVtbl.VideoSetPaletteColor = XboxVideoSetPaletteColor;
   MachVtbl.VideoGetPaletteColor = XboxVideoGetPaletteColor;
   MachVtbl.VideoSync = XboxVideoSync;
+  MachVtbl.VideoPrepareForReactOS = XboxVideoPrepareForReactOS;
   MachVtbl.GetMemoryMap = XboxMemGetMemoryMap;
   MachVtbl.DiskReadLogicalSectors = XboxDiskReadLogicalSectors;
   MachVtbl.DiskGetPartitionEntry = XboxDiskGetPartitionEntry;

freeldr/freeldr/arch/i386
machxbox.h 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- machxbox.h	14 Nov 2004 22:04:38 -0000	1.5
+++ machxbox.h	23 Nov 2004 11:28:02 -0000	1.6
@@ -1,4 +1,4 @@
-/* $Id: machxbox.h,v 1.5 2004/11/14 22:04:38 gvg Exp $
+/* $Id: machxbox.h,v 1.6 2004/11/23 11:28:02 gvg Exp $
  *
  *  FreeLoader
  *
@@ -45,6 +45,7 @@
 VOID XboxVideoSetPaletteColor(U8 Color, U8 Red, U8 Green, U8 Blue);
 VOID XboxVideoGetPaletteColor(U8 Color, U8* Red, U8* Green, U8* Blue);
 VOID XboxVideoSync(VOID);
+VOID XboxVideoPrepareForReactOS(VOID);
 
 VOID XboxMemInit(VOID);
 PVOID XboxMemReserveMemory(U32 MbToReserve);

freeldr/freeldr/arch/i386
mb.S 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- mb.S	11 Aug 2003 18:56:26 -0000	1.4
+++ mb.S	23 Nov 2004 11:28:02 -0000	1.5
@@ -25,118 +25,36 @@
 #include <multiboot.h>
 
 	/*
-     * Here we assume the kernel is loaded at 1mb
-     * This boots the kernel
+	 * Here we assume the kernel is loaded at 1mb
+	 * This boots the kernel
 	 */
 	.code32
 EXTERN(_boot_reactos)
-	call	switch_to_real
-	.code16
-
-    /* Save cursor position */
-	movw    $3,%ax          //! Reset video mode
-	int     $0x10
-
-
-	movb    $10,%bl
-	movb    $12,%ah
-	int     $0x10
-
-	movw    $0x1112,%ax		// Use 8x8 font
-	xorb	%bl,%bl
-	int     $0x10
-	movw    $0x1200,%ax		// Use alternate print screen
-	movb    $0x20,%bl
-	int     $0x10
-	movb    $1,%ah			// Define cursor (scan lines 6 to 7)
-	movw    $0x0607,%cx
-	int     $0x10
-
-	movb    $1,%ah
-	movw    $0x600,%cx
-	int     $0x10
-
-	movb	$6,%ah			// Scroll active page up
-	movb	$0x32,%al		// Clear 25 lines
-	movw	$0,%cx			// Upper left of scroll
-	movw	$0x314F,%dx		// Lower right of scroll
-	movb	$(1*0x00+0),%bh	// Use normal attribute on blanked line
-	int		$0x10			// Video-IO
-
-
-	movw	$0,%dx
-	movb	$0,%dh
-
-	movb	$2,%ah
-	movb	$0,%bh
-	int		$0x10
-
-	movw	$0,%dx
-	movb	$0,%dh
-
-	movb	$2,%ah
-	movb	$0,%bh
-	int		$0x10
+	call	_MachVideoPrepareForReactOS
 
 	call	_multi_boot
 
 	// Should never get here
 	cli
+bootloop:
 	hlt
+	jmp	bootloop
 
 
 	/*
 	 * After you have setup the _mb_header and _mb_info structures
 	 * then call this routine to transfer control to the kernel.
-	 * This routine must be entered in 16-bit mode.
 	 */
-	.code16
 EXTERN(_multi_boot)
 
 	cli
 
 	/*
-	 * Setup various variables
-	 */
-	movw	%ds,%bx
-	movzwl	%bx,%eax
-	shll	$4,%eax
-	addl	%eax,kernel_gdtbase
-
-	/*
 	 * Load the absolute address of the multiboot information structure
 	 */
 	movl	$_mb_info,%ebx
 
 	/*
-	 * load gdt
-	 */
-	lgdt	kernel_gdtptr
-
-	/*       
-	 * Enter pmode and clear prefetch queue
-	 */
-	movl	%cr0,%eax
-	orl		$0x10001,%eax
-	movl	%eax,%cr0
-	jmp		next
-next:
-	/*
-	 * NOTE: This must be position independant (no references to
-	 * non absolute variables)
-	 */
-
-	/*
-	 * Initalize segment registers
-	 */
-	movw	$KERNEL_DS,%ax
-	movw	%ax,%ds
-	movw	%ax,%ss
-	movw	%ax,%es
-	movw	%ax,%fs
-	movw	%ax,%gs
-
-	/*
 	 * Initalize eflags
 	 */
 	pushl	$0
@@ -155,33 +73,6 @@
 	pushl	_mb_entry_addr
 	lretl
 
-	//ljmpl	$KERNEL_CS,$(0x0200000+0x1000)
-	//ljmpl	$KERNEL_CS,(_mb_entry_addr)
-	//ljmpl	$KERNEL_CS,$(KERNEL_BASE+0x1000)
-
-
-	.p2align	2	/* force 4-byte alignment */
-kernel_gdt:
-	.word 0               // Zero descriptor
-	.word 0
-	.word 0
-	.word 0
-
-	.word 0xffff          // Kernel code descriptor 
-	.word 0x0000          // 
-	.word 0x9a00          // base 0h limit 4gb
-	.word 0x00cf
-                       
-	.word 0xffff          // Kernel data descriptor
-	.word 0x0000          // 
-	.word 0x9200          // base 0h limit 4gb
-	.word 0x00cf
-
-kernel_gdtptr:
-	.word	(3*8)-1			/* Limit */
-kernel_gdtbase:
-	.long	kernel_gdt				/* Base Address */
-
 
 EXTERN(_mb_header)
 _mb_magic:

freeldr/freeldr/arch/i386
pcvideo.c 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- pcvideo.c	14 Nov 2004 22:04:38 -0000	1.1
+++ pcvideo.c	23 Nov 2004 11:28:02 -0000	1.2
@@ -1,4 +1,4 @@
-/* $Id: pcvideo.c,v 1.1 2004/11/14 22:04:38 gvg Exp $
+/* $Id: pcvideo.c,v 1.2 2004/11/23 11:28:02 gvg Exp $
  *
  *  FreeLoader
  *
@@ -1106,4 +1106,11 @@
     }
 }
 
+VOID
+PcVideoPrepareForReactOS(VOID)
+{
+  PcVideoSetMode80x50_80x43();
+  PcVideoHideShowTextCursor(FALSE);
+}
+
 /* EOF */

freeldr/freeldr/arch/i386
xboxvideo.c 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- xboxvideo.c	14 Nov 2004 22:04:38 -0000	1.3
+++ xboxvideo.c	23 Nov 2004 11:28:02 -0000	1.4
@@ -1,4 +1,4 @@
-/* $Id: xboxvideo.c,v 1.3 2004/11/14 22:04:38 gvg Exp $
+/* $Id: xboxvideo.c,v 1.4 2004/11/23 11:28:02 gvg Exp $
  *
  *  FreeLoader
  *
@@ -35,7 +35,7 @@
 #define CHAR_WIDTH  8
 #define CHAR_HEIGHT 16
 
-#define TOP_BOTTOM_LINES 40
+#define TOP_BOTTOM_LINES 0
 
 #define FB_SIZE_MB 4
 
@@ -209,4 +209,10 @@
   /* Not supported */
 }
 
+VOID
+XboxVideoPrepareForReactOS(VOID)
+{
+  XboxVideoClearScreenColor(MAKE_COLOR(0, 0, 0), TRUE);
+}
+
 /* EOF */

freeldr/freeldr/include
machine.h 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- machine.h	14 Nov 2004 22:04:39 -0000	1.5
+++ machine.h	23 Nov 2004 11:28:02 -0000	1.6
@@ -1,4 +1,4 @@
-/* $Id: machine.h,v 1.5 2004/11/14 22:04:39 gvg Exp $
+/* $Id: machine.h,v 1.6 2004/11/23 11:28:02 gvg Exp $
  *
  *  FreeLoader
  *
@@ -52,6 +52,7 @@
   VOID (*VideoSetPaletteColor)(U8 Color, U8 Red, U8 Green, U8 Blue);
   VOID (*VideoGetPaletteColor)(U8 Color, U8* Red, U8* Green, U8* Blue);
   VOID (*VideoSync)(VOID);
+  VOID (*VideoPrepareForReactOS)(VOID);
 
   U32 (*GetMemoryMap)(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MaxMemoryMapSize);
 
@@ -82,6 +83,7 @@
 #define MachVideoSetPaletteColor(Col, R, G, B)	MachVtbl.VideoSetPaletteColor((Col), (R), (G), (B))
 #define MachVideoGetPaletteColor(Col, R, G, B)	MachVtbl.VideoGetPaletteColor((Col), (R), (G), (B))
 #define MachVideoSync()				MachVtbl.VideoSync()
+#define MachVideoPrepareForReactOS()		MachVtbl.VideoPrepareForReactOS()
 #define MachGetMemoryMap(MMap, Size)		MachVtbl.GetMemoryMap((MMap), (Size))
 #define MachDiskReadLogicalSectors(Drive, Start, Count, Buf)	MachVtbl.DiskReadLogicalSectors((Drive), (Start), (Count), (Buf))
 #define MachDiskGetPartitionEntry(Drive, Part, Entry)	MachVtbl.DiskGetPartitionEntry((Drive), (Part), (Entry))

freeldr/freeldr/reactos
reactos.c 1.39 -> 1.40
diff -u -r1.39 -r1.40
--- reactos.c	8 Nov 2004 22:02:48 -0000	1.39
+++ reactos.c	23 Nov 2004 11:28:02 -0000	1.40
@@ -686,7 +686,7 @@
 		rosPartition = 0;
 		while (1)
 		{
-		   if (!DiskGetPartitionEntry(BootDrive, ++i, &PartitionTableEntry))
+		   if (!MachDiskGetPartitionEntry(BootDrive, ++i, &PartitionTableEntry))
 		   {
 		      BootPartition = 0;
 		      break;
CVSspam 0.2.8