ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

misc.c
Go to the documentation of this file.
00001 /*
00002  * PROJECT:         ReactOS HAL
00003  * LICENSE:         GPL - See COPYING in the top level directory
00004  * FILE:            hal/halx86/generic/misc.c
00005  * PURPOSE:         Miscellanous Routines
00006  * PROGRAMMERS:     Alex Ionescu (alex.ionescu@reactos.org)
00007  *                  Eric Kohl
00008  */
00009 
00010 /* INCLUDES ******************************************************************/
00011 
00012 #include <hal.h>
00013 #define NDEBUG
00014 #include <debug.h>
00015 
00016 /* PRIVATE FUNCTIONS *********************************************************/
00017 
00018 VOID
00019 NTAPI
00020 HalpCheckPowerButton(VOID)
00021 {
00022     /* Nothing to do on non-ACPI */
00023     return;
00024 }
00025 
00026 PVOID
00027 NTAPI
00028 HalpMapPhysicalMemory64(IN PHYSICAL_ADDRESS PhysicalAddress,
00029                         IN ULONG NumberPage)
00030 {
00031     /* Use kernel memory manager I/O map facilities */
00032     return MmMapIoSpace(PhysicalAddress,
00033                         NumberPage << PAGE_SHIFT,
00034                         MmNonCached);
00035 }
00036 
00037 VOID
00038 NTAPI
00039 HalpUnmapVirtualAddress(IN PVOID VirtualAddress,
00040                         IN ULONG NumberPages)
00041 {
00042     /* Use kernel memory manager I/O map facilities */
00043     MmUnmapIoSpace(VirtualAddress, NumberPages << PAGE_SHIFT);
00044 }
00045 
00046 /* FUNCTIONS *****************************************************************/
00047 
00048 /*
00049  * @implemented
00050  */
00051 VOID
00052 NTAPI
00053 HalHandleNMI(IN PVOID NmiInfo)
00054 {
00055     UCHAR ucStatus;
00056 
00057     /* Get the NMI Flag */
00058     ucStatus = READ_PORT_UCHAR((PUCHAR)0x61);
00059 
00060     /* Display NMI failure string */
00061     HalDisplayString ("\n*** Hardware Malfunction\n\n");
00062     HalDisplayString ("Call your hardware vendor for support\n\n");
00063 
00064     /* Check for parity error */
00065     if (ucStatus & 0x80)
00066     {
00067         /* Display message */
00068         HalDisplayString ("NMI: Parity Check / Memory Parity Error\n");
00069     }
00070 
00071     /* Check for I/O failure */
00072     if (ucStatus & 0x40)
00073     {
00074         /* Display message */
00075         HalDisplayString ("NMI: Channel Check / IOCHK\n");
00076     }
00077 
00078     /* Halt the system */
00079     HalDisplayString("\n*** The system has halted ***\n");
00080     //KeEnterKernelDebugger();
00081 }
00082 
00083 /*
00084  * @implemented
00085  */
00086 UCHAR
00087 FASTCALL
00088 HalSystemVectorDispatchEntry(IN ULONG Vector,
00089                              OUT PKINTERRUPT_ROUTINE **FlatDispatch,
00090                              OUT PKINTERRUPT_ROUTINE *NoConnection)
00091 {
00092     /* Not implemented on x86 */
00093     return FALSE;
00094 }
00095 
00096 /*
00097  * @implemented
00098  */
00099 VOID
00100 NTAPI
00101 KeFlushWriteBuffer(VOID)
00102 {
00103     /* Not implemented on x86 */
00104     return;
00105 }

Generated on Sat May 26 2012 04:15:49 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.