cpustep.c
上传用户:wzq_968
上传日期:2014-06-22
资源大小:4760k
文件大小:2k
源码类别:

操作系统开发

开发平台:

Windows_Unix

  1. /* 
  2. ** INTEL CONFIDENTIAL
  3. ** Copyright 2000-2003 Intel Corporation All Rights Reserved.
  4. **
  5. ** The source code contained or described herein and all documents
  6. ** related to the source code (Material) are owned by Intel Corporation
  7. ** or its suppliers or licensors.  Title to the Material remains with
  8. ** Intel Corporation or its suppliers and licensors. The Material contains
  9. ** trade secrets and proprietary and confidential information of Intel
  10. ** or its suppliers and licensors. The Material is protected by worldwide
  11. ** copyright and trade secret laws and treaty provisions. No part of the
  12. ** Material may be used, copied, reproduced, modified, published, uploaded,
  13. ** posted, transmitted, distributed, or disclosed in any way without Intel抯
  14. ** prior express written permission.
  15. ** No license under any patent, copyright, trade secret or other intellectual
  16. ** property right is granted to or conferred upon you by disclosure or
  17. ** delivery of the Materials, either expressly, by implication, inducement,
  18. ** estoppel or otherwise. Any license under such intellectual property rights
  19. ** must be express and approved by Intel in writing.
  20. */
  21. #include <windef.h>
  22. #include <windows.h>
  23. #include <types.h>
  24. #include "bvd1bd.h"
  25. #include <DRV_GLOB.H>
  26. #include "bvd1.h"
  27. /* ************************************************************************* */
  28. /*
  29. GetProcessorStepping
  30.    This function maps driver globals and returns the processor stepping 
  31.    information contained within the UNINIT_MISC driver globals area
  32. Parameters
  33.    none
  34. Return Value
  35.    Unsigned integer containing the processor stepping information as defined
  36.    by CP15
  37. */
  38. extern PVOID VirtualAllocCopy(unsigned size,char *str,PVOID pVirtualAddress);
  39. UINT GetProcessorStepping(void)
  40. {
  41.     volatile PDRIVER_GLOBALS v_pDriverGlobals;
  42.     v_pDriverGlobals = (PDRIVER_GLOBALS)VirtualAllocCopy(sizeof(DRIVER_GLOBALS_PHYSICAL_MEMORY_SIZE),
  43.                                                          "CPUStepDetection: v_pDriverGlobals",
  44.                                                          (PVOID)(DRIVER_GLOBALS_PHYSICAL_MEMORY_START));
  45.     return(v_pDriverGlobals->uninit_misc.CPUSteppingID); 
  46. }