Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
1.6 KiB

  1. /*++
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. haldtect.c
  5. Abstract:
  6. Provides HAL detection for ARC-compliant machines.
  7. Author:
  8. John Vert (jvert) 21-Oct-1993
  9. Revision History:
  10. --*/
  11. #if defined(_ALPHA_) || defined(_AXP64_) || defined(_MIPS_) || defined(_PPC_)
  12. #include "haldtect.h"
  13. #include <stdlib.h>
  14. PVOID InfFile;
  15. PVOID WinntSifHandle;
  16. PCHAR
  17. SlDetectHal(
  18. VOID
  19. )
  20. /*++
  21. Routine Description:
  22. Determines the canonical short machine name for the HAL to be loaded for
  23. this machine.
  24. It does this by enumerating the [Map.Computer] section of the INF file and
  25. comparing the strings there with the computer description in the ARC tree.
  26. [Map.Computer]
  27. msjazz_up = *Jazz
  28. desksta1_up = "DESKTECH-ARCStation I"
  29. pica61_up = "PICA-61"
  30. duo_mp = *Duo
  31. [Map.Computer]
  32. DECjensen = "DEC-20Jensen"
  33. DECjensen = "DEC-10Jensen"
  34. Arguments:
  35. None.
  36. Return Value:
  37. PCHAR - pointer to canonical shortname for the machine.
  38. NULL - the type of machine could not be determined.
  39. --*/
  40. {
  41. PCONFIGURATION_COMPONENT_DATA Node;
  42. PCHAR MachineName;
  43. //
  44. // Find the system description node
  45. //
  46. Node = KeFindConfigurationEntry(BlLoaderBlock->ConfigurationRoot,
  47. SystemClass,
  48. ArcSystem,
  49. NULL);
  50. if (Node==NULL) {
  51. SlError(0);
  52. return(NULL);
  53. }
  54. MachineName = Node->ComponentEntry.Identifier;
  55. MachineName = (MachineName ? SlSearchSection("Map.Computer", MachineName) : NULL);
  56. return(MachineName);
  57. }
  58. #endif