[USETUP]: Add an entry in freeldr.ini for EMS testing.
authorAlex Ionescu <aionescu@gmail.com>
Tue, 13 Aug 2013 03:11:02 +0000 (03:11 +0000)
committerAlex Ionescu <aionescu@gmail.com>
Tue, 13 Aug 2013 03:11:02 +0000 (03:11 +0000)
[HIVESYS]: Fix double-addition of "nmidebug". One of those should have been "sacdrv".
[FREELDR]: Fix bugs in WinLdrSetupEms which caused an invalid HEADLESS_LOADER_BLOCK to be created.
[FERELDR]: Move WinLdrSetupEms in LoadWindowsCommon, so that setupldr can use EMS too.

svn path=/trunk/; revision=59716

reactos/base/setup/usetup/bootsup.c
reactos/boot/bootdata/hivesys.inf
reactos/boot/freeldr/freeldr/windows/headless.c
reactos/boot/freeldr/freeldr/windows/winldr.c

index 0c05cbb..9865e26 100644 (file)
@@ -501,8 +501,14 @@ CreateFreeLoaderIniForReactos(
     /* ReactOS_Ram */
     CreateFreeLoaderEntry(IniCache, IniSection,
                           L"ReactOS_Ram", L"\"ReactOS (RAM Disk)\"",
     /* ReactOS_Ram */
     CreateFreeLoaderEntry(IniCache, IniSection,
                           L"ReactOS_Ram", L"\"ReactOS (RAM Disk)\"",
-                          L"ReactOS", L"ramdisk(0)\\ReactOS",
+                          L"Windows2003", L"ramdisk(0)\\ReactOS",
                           L"/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS /RDIMAGEPATH=reactos.img /RDIMAGEOFFSET=32256");
                           L"/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS /RDIMAGEPATH=reactos.img /RDIMAGEOFFSET=32256");
+
+    /* ReactOS_EMS */
+    CreateFreeLoaderEntry(IniCache, IniSection,
+                          L"ReactOS_EMS", L"\"ReactOS (Emergency Management Services)\"",
+                          L"Windows2003", ArcPath,
+                          L"/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS /redirect=com2 /redirectbaudrate=115200");
 #endif
 
     /* Save the ini file */
 #endif
 
     /* Save the ini file */
index 5c5f94e..751e1df 100644 (file)
@@ -1345,11 +1345,11 @@ HKLM,"SYSTEM\CurrentControlSet\Services\DHCP","Type",0x00010001,0x00000020
 HKLM,"SYSTEM\CurrentControlSet\Services\DHCP\Parameters","ServiceDll",0x00020000,"%SystemRoot%\system32\dhcpcsvc.dll"
 
 ; EMS Serial Administration Console Driver
 HKLM,"SYSTEM\CurrentControlSet\Services\DHCP\Parameters","ServiceDll",0x00020000,"%SystemRoot%\system32\dhcpcsvc.dll"
 
 ; EMS Serial Administration Console Driver
-HKLM,"SYSTEM\CurrentControlSet\Services\NMIDebug","ErrorControl",0x00010001,0x00000000
-HKLM,"SYSTEM\CurrentControlSet\Services\NMIDebug","Group",0x00000000,"EMS"
-HKLM,"SYSTEM\CurrentControlSet\Services\NMIDebug","ImagePath",0x00020000,"system32\drivers\sacdrv.sys"
-HKLM,"SYSTEM\CurrentControlSet\Services\NMIDebug","Start",0x00010001,0x00000000
-HKLM,"SYSTEM\CurrentControlSet\Services\NMIDebug","Type",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\sacdrv","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\sacdrv","Group",0x00000000,"EMS"
+HKLM,"SYSTEM\CurrentControlSet\Services\sacdrv","ImagePath",0x00020000,"system32\drivers\sacdrv.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\sacdrv","Start",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\sacdrv","Type",0x00010001,0x00000001
 
 ; Event logging service
 HKLM,"SYSTEM\CurrentControlSet\Services\EventLog",,0x00000010
 
 ; Event logging service
 HKLM,"SYSTEM\CurrentControlSet\Services\EventLog",,0x00000010
index 8f3a7a4..40db235 100644 (file)
@@ -246,7 +246,8 @@ WinLdrSetupEms(IN PCHAR BootOptions)
 
     /* Start fresh */
     RtlZeroMemory(&LoaderRedirectionInformation, sizeof(HEADLESS_LOADER_BLOCK));
 
     /* Start fresh */
     RtlZeroMemory(&LoaderRedirectionInformation, sizeof(HEADLESS_LOADER_BLOCK));
-        
+    LoaderRedirectionInformation.PciDeviceId = PCI_INVALID_VENDORID;
+
     /* Use a direction port if one was given, or use ACPI to detect one instead */
     RedirectPort = strstr(BootOptions, "/redirect=");
 
     /* Use a direction port if one was given, or use ACPI to detect one instead */
     RedirectPort = strstr(BootOptions, "/redirect=");
 
@@ -257,6 +258,7 @@ WinLdrSetupEms(IN PCHAR BootOptions)
         {
             RedirectPort += sizeof("com") - 1;
             LoaderRedirectionInformation.PortNumber = atoi(RedirectPort);
         {
             RedirectPort += sizeof("com") - 1;
             LoaderRedirectionInformation.PortNumber = atoi(RedirectPort);
+            LoaderRedirectionInformation.TerminalType = 1; //HeadlessSerialPort
         }
         else
         {
         }
         else
         {
index fec79d9..6163933 100644 (file)
@@ -673,11 +673,6 @@ LoadAndBootWindows(IN OperatingSystemItem* OperatingSystem,
     /* Allocate and minimalistic-initialize LPB */
     AllocateAndInitLPB(&LoaderBlock);
 
     /* Allocate and minimalistic-initialize LPB */
     AllocateAndInitLPB(&LoaderBlock);
 
-#ifdef _M_IX86
-    /* Setup redirection support */
-    WinLdrSetupEms(BootOptions);
-#endif
-
     /* Load Hive */
     UiDrawBackdrop();
     UiDrawProgressBarCenter(15, 100, "Loading system hive...");
     /* Load Hive */
     UiDrawBackdrop();
     UiDrawProgressBarCenter(15, 100, "Loading system hive...");
@@ -711,6 +706,11 @@ LoadAndBootWindowsCommon(
     LPCSTR SystemRoot;
     TRACE("LoadAndBootWindowsCommon()\n");
 
     LPCSTR SystemRoot;
     TRACE("LoadAndBootWindowsCommon()\n");
 
+#ifdef _M_IX86
+    /* Setup redirection support */
+    WinLdrSetupEms((PCHAR)BootOptions);
+#endif
+
     /* Convert BootPath to SystemRoot */
     SystemRoot = strstr(BootPath, "\\");
 
     /* Convert BootPath to SystemRoot */
     SystemRoot = strstr(BootPath, "\\");