Skip to content

Commit

Permalink
more testing
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkFire01 committed Dec 9, 2024
1 parent 593552a commit db9941d
Show file tree
Hide file tree
Showing 30 changed files with 56 additions and 33 deletions.
5 changes: 5 additions & 0 deletions base/system/smss/smss.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,11 @@ _main(IN INT argc,
IN PCHAR envp[],
IN ULONG DebugFlag)
{
DPRINT1("Hello from SMSS entry point\n");
for(;;)
{

}
NTSTATUS Status;
KPRIORITY SetBasePriority;
ULONG_PTR Parameters[4];
Expand Down
9 changes: 2 additions & 7 deletions boot/bootdata/bootcd.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,11 @@ TitleText=ReactOS Setup & Live BootCD
MinimalUI=Yes

[Operating Systems]
LiveCD="ReactOS Setup (Graphics Mode) & Live"
LiveCD_Debug="ReactOS Live (Debug)"
LiveCD_Macpi="LiveCD ACPI SMP (Debug)"
LiveCD_Aacpi="LiveCD ACPI APIC (Debug)"
LiveCD_VBoxDebug="ReactOS Live (VBox Debug)"
LiveCD_Screen="ReactOS Live (Screen)"
; LiveCD_LogFile="ReactOS Live (Log file)"
LiveCD_RamDisk="ReactOS Setup (Graphics Mode) & Live in RAM"
LiveCD_RamDisk_Debug="ReactOS Live in RAM (Debug)"
LiveCD_RamDisk_Screen="ReactOS Live in RAM (Screen)"
;;;;
HddBoot="Boot from first hard disk"

Expand Down Expand Up @@ -74,12 +69,12 @@ Options=/DEBUG /DEBUGPORT=SCREEN /SOS /FASTDETECT /MININT
[LiveCD_RamDisk]
BootType=Windows2003
SystemPath=ramdisk(0)\reactos
Options=/FASTDETECT /MININT /RDPATH=liveimg.iso /RDEXPORTASCD
Options=/HAL=halmacpi.dll /KERNEL=ntkrnlmp.exe /SOS /FASTDETECT /MININT /RDPATH=liveimg.iso /RDEXPORTASCD

[LiveCD_RamDisk_Debug]
BootType=Windows2003
SystemPath=ramdisk(0)\reactos
Options=/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS /FASTDETECT /MININT /RDPATH=liveimg.iso /RDEXPORTASCD
Options=/HAL=halmacpi.dll /KERNEL=ntkrnlmp.exe /DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS /FASTDETECT /MININT /RDPATH=liveimg.iso /RDEXPORTASCD

[LiveCD_RamDisk_Screen]
BootType=Windows2003
Expand Down
4 changes: 2 additions & 2 deletions boot/freeldr/freeldr/ntldr/winldr.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,8 @@ WinLdrLoadBootDrivers(PLOADER_PARAMETER_BLOCK LoaderBlock,
else
{
/* Loading failed: cry loudly */
ERR("Cannot load boot driver '%wZ'!\n", &BootDriver->FilePath);
UiMessageBox("Cannot load boot driver '%wZ'!", &BootDriver->FilePath);
// ERR("Cannot load boot driver '%wZ'!\n", &BootDriver->FilePath);
// UiMessageBox("Cannot load boot driver '%wZ'!", &BootDriver->FilePath);
ret = FALSE;

/* Remove it from the list and try to continue */
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/usbaudio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ target_link_libraries(usbaudio
set_module_type(usbaudio kernelmodedriver)
add_importlibs(usbaudio ntoskrnl hal usbd ks)

add_cd_file(TARGET usbaudio DESTINATION reactos/system32/drivers NO_CAB FOR all)
#add_cd_file(TARGET usbaudio DESTINATION reactos/system32/drivers NO_CAB FOR all)
2 changes: 1 addition & 1 deletion drivers/usb/usbccgp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ target_link_libraries(usbccgp ${PSEH_LIB})
set_module_type(usbccgp kernelmodedriver)
add_importlibs(usbccgp ntoskrnl hal usbd)
add_pch(usbccgp usbccgp.h "${PCH_SKIP_SOURCE}")
add_cd_file(TARGET usbccgp DESTINATION reactos/system32/drivers NO_CAB FOR all)
#add_cd_file(TARGET usbccgp DESTINATION reactos/system32/drivers NO_CAB FOR all)
2 changes: 1 addition & 1 deletion drivers/usb/usbd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ add_library(usbd MODULE

set_module_type(usbd kernelmodedriver)
add_importlibs(usbd ntoskrnl hal)
add_cd_file(TARGET usbd DESTINATION reactos/system32/drivers NO_CAB FOR all)
#add_cd_file(TARGET usbd DESTINATION reactos/system32/drivers NO_CAB FOR all)
2 changes: 1 addition & 1 deletion drivers/usb/usbehci/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ add_library(usbehci MODULE
set_module_type(usbehci kernelmodedriver)
add_importlibs(usbehci usbport usbd hal ntoskrnl)
add_pch(usbehci usbehci.h SOURCE)
add_cd_file(TARGET usbehci DESTINATION reactos/system32/drivers NO_CAB FOR all)
#add_cd_file(TARGET usbehci DESTINATION reactos/system32/drivers NO_CAB FOR all)
2 changes: 1 addition & 1 deletion drivers/usb/usbhub/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ target_link_libraries(usbhub ${PSEH_LIB})
set_module_type(usbhub kernelmodedriver)
add_importlibs(usbhub ntoskrnl hal wmilib usbd)
add_pch(usbhub usbhub.h "${PCH_SKIP_SOURCE}")
add_cd_file(TARGET usbhub DESTINATION reactos/system32/drivers NO_CAB FOR all)
#add_cd_file(TARGET usbhub DESTINATION reactos/system32/drivers NO_CAB FOR all)
2 changes: 1 addition & 1 deletion drivers/usb/usbohci/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ add_library(usbohci MODULE
set_module_type(usbohci kernelmodedriver)
add_importlibs(usbohci usbport usbd hal ntoskrnl)
add_pch(usbohci usbohci.h SOURCE)
add_cd_file(TARGET usbohci DESTINATION reactos/system32/drivers NO_CAB FOR all)
#add_cd_file(TARGET usbohci DESTINATION reactos/system32/drivers NO_CAB FOR all)
2 changes: 1 addition & 1 deletion drivers/usb/usbport/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ add_library(usbport MODULE
add_pch(usbport usbport.h "${PCH_SKIP_SOURCE}")
set_module_type(usbport kernelmodedriver)
add_importlibs(usbport ntoskrnl hal)
add_cd_file(TARGET usbport DESTINATION reactos/system32/drivers NO_CAB FOR all)
#add_cd_file(TARGET usbport DESTINATION reactos/system32/drivers NO_CAB FOR all)
2 changes: 1 addition & 1 deletion drivers/usb/usbstor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ add_library(usbstor MODULE
set_module_type(usbstor kernelmodedriver)
add_importlibs(usbstor ntoskrnl hal usbd)
add_pch(usbstor usbstor.h "${PCH_SKIP_SOURCE}")
add_cd_file(TARGET usbstor DESTINATION reactos/system32/drivers NO_CAB FOR all)
#add_cd_file(TARGET usbstor DESTINATION reactos/system32/drivers NO_CAB FOR all)
add_driver_inf(usbstor usbstor.inf)
2 changes: 1 addition & 1 deletion drivers/usb/usbstor_new/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ add_library(usbstor MODULE
set_module_type(usbstor kernelmodedriver)
add_importlibs(usbstor ntoskrnl hal usbd)
add_pch(usbstor usbstor.h SOURCE)
add_cd_file(TARGET usbstor DESTINATION reactos/system32/drivers NO_CAB FOR all)
#add_cd_file(TARGET usbstor DESTINATION reactos/system32/drivers NO_CAB FOR all)
2 changes: 1 addition & 1 deletion drivers/usb/usbuhci/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ add_library(usbuhci MODULE
set_module_type(usbuhci kernelmodedriver)
add_importlibs(usbuhci usbport usbd hal ntoskrnl)
add_pch(usbuhci usbuhci.h SOURCE)
add_cd_file(TARGET usbuhci DESTINATION reactos/system32/drivers NO_CAB FOR all)
#add_cd_file(TARGET usbuhci DESTINATION reactos/system32/drivers NO_CAB FOR all)
2 changes: 1 addition & 1 deletion hal/halx86/smp/i386/spinup.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ extern PVOID HalpAPEntry16End;
extern HALP_APIC_INFO_TABLE HalpApicInfoTable;
extern PPROCESSOR_IDENTITY HalpProcessorIdentity;

ULONG HalpStartedProcessorCount = 1;
ULONG HalpStartedProcessorCount = 0;

#ifndef Add2Ptr
#define Add2Ptr(P,I) ((PVOID)((PUCHAR)(P) + (I)))
Expand Down
2 changes: 1 addition & 1 deletion modules/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/config/)
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/config/${item} DESTINATION reactos/system32/config NO_CAB NAME_ON_CD ${item} FOR all)
endforeach(item)
endif()
#
##
Binary file removed modules/drivers/atapi.sys
Binary file not shown.
Binary file removed modules/drivers/cdrom.sys
Binary file not shown.
Binary file removed modules/drivers/i8042prt.sys
Binary file not shown.
Binary file removed modules/drivers/isapnp.sys
Binary file not shown.
Binary file removed modules/drivers/kbdclass.sys
Binary file not shown.
Binary file removed modules/drivers/mouclass.sys
Binary file not shown.
Binary file removed modules/drivers/mouhid.sys
Binary file not shown.
Binary file removed modules/drivers/pciidex.sys
Binary file not shown.
Binary file removed modules/drivers/scsiport.sys
Binary file not shown.
Binary file removed modules/drivers/vga.sys
Binary file not shown.
Binary file removed modules/drivers/vgapnp.sys
Binary file not shown.
Binary file removed modules/drivers/videoprt.sys
Binary file not shown.
4 changes: 4 additions & 0 deletions ntoskrnl/ex/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1676,6 +1676,9 @@ Phase1InitializationDiscard(IN PVOID Context)
LastTzBias = ExpLastTimeZoneBias;
ExRefreshTimeZoneInformation(&SystemBootTime);

#if 0
__debugbreak();

/* Check if we're resetting timezone data */
if (ResetBias)
{
Expand All @@ -1693,6 +1696,7 @@ Phase1InitializationDiscard(IN PVOID Context)
if (LastTzBias != ExpLastTimeZoneBias)
ZwSetSystemTime(NULL, NULL);
}
#endif

/* Initialize the File System Runtime Library */
if (!FsRtlInitSystem()) KeBugCheck(FILE_INITIALIZATION_FAILED);
Expand Down
6 changes: 4 additions & 2 deletions ntoskrnl/ke/i386/freeze.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
#define IPI_FROZEN_FLAG_ACTIVE 0x20

PKPRCB KiFreezeOwner;

VOID
FASTCALL
KiTriggerFreezeAttempt(IN KAFFINITY TargetProcessors, IN ULONG IpiRequest, BOOLEAN UseNMI);
BOOLEAN
KiProcessorFreezeHandler(
_In_ PKTRAP_FRAME TrapFrame,
Expand Down Expand Up @@ -120,7 +122,7 @@ KxFreezeExecution(
}

/* Send the freeze IPI */
KiIpiSend(KeActiveProcessors & ~CurrentPrcb->SetMember, IPI_FREEZE);
KiTriggerFreezeAttempt(KeActiveProcessors & ~CurrentPrcb->SetMember, IPI_FREEZE, FALSE);

/* Wait for all targets to be frozen */
for (ULONG i = 0; i < KeNumberProcessors; i++)
Expand Down
37 changes: 27 additions & 10 deletions ntoskrnl/ke/i386/ipi.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,24 +151,34 @@ KiIpiServiceRoutine(IN PKTRAP_FRAME TrapFrame, IN PKEXCEPTION_FRAME ExceptionFra
{
#ifdef CONFIG_SMP
PKPRCB Prcb;
// ASSERT(KeGetCurrentIrql() == IPI_LEVEL);
ASSERT(KeGetCurrentIrql() == IPI_LEVEL);
Prcb = KeGetCurrentPrcb();

/* APC level! Trigger an APC interrupt */
if (InterlockedBitTestAndReset((PLONG)&Prcb->RequestSummary, IPI_APC))
{
// DPRINT1("Triggering APC as CPU %u\n", KeGetCurrentProcessorNumber());
HalRequestSoftwareInterrupt(APC_LEVEL);
}


/* DPC level! Trigger an DPC interrupt */
if (InterlockedBitTestAndReset((PLONG)&Prcb->RequestSummary, IPI_DPC))
{
// DPRINT1("Triggering DPC as CPU %u\n", KeGetCurrentProcessorNumber());
HalRequestSoftwareInterrupt(DISPATCH_LEVEL);
}

/* DPC level! Trigger an DPC interrupt */
if (InterlockedBitTestAndReset((PLONG)&Prcb->RequestSummary, IPI_FREEZE))
{
KiProcessorFreezeHandler(TrapFrame, ExceptionFrame);
}

/* SYNCH_REQUEST we have a function pointer to execute! */
if (InterlockedBitTestAndReset((PLONG)&Prcb->RequestSummary, IPI_SYNCH_REQUEST))
{
// __debugbreak();
PKIPI_WORKER WorkerCall;
WorkerCall = Prcb->WorkerRoutine;
if (WorkerCall)
Expand Down Expand Up @@ -278,6 +288,22 @@ KeIpiGenericCall(IN PKIPI_BROADCAST_WORKER Function,
return Status;
}

VOID
FASTCALL
KiTriggerFreezeAttempt(IN KAFFINITY TargetProcessors, IN ULONG IpiRequest, BOOLEAN UseNMI)
{
if (UseNMI)
{
/* On ? the freeze IPI is an NMI */
HalSendNMI(TargetProcessors);
}
else
{
/* Call private function */
KiIpiSendRequest(TargetProcessors, IpiRequest);
}
}

/**
* @brief
* Send a interrupt of whatever type is assigned in IpiRequest to the target CPU set
Expand All @@ -292,16 +318,7 @@ VOID
FASTCALL
KiIpiSend(IN KAFFINITY TargetProcessors, IN ULONG IpiRequest)
{
if (IpiRequest == IPI_FREEZE)
{
/* On ? the freeze IPI is an NMI */
HalSendNMI(TargetProcessors);
}
else
{

/* Call private function */
KiIpiSendRequest(TargetProcessors, IpiRequest);
}
}

0 comments on commit db9941d

Please sign in to comment.