OemMiscLibD02.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /** @file
  2. *
  3. * Copyright (c) 2015, Hisilicon Limited. All rights reserved.
  4. * Copyright (c) 2015, Linaro Limited. All rights reserved.
  5. *
  6. * This program and the accompanying materials
  7. * are licensed and made available under the terms and conditions of the BSD License
  8. * which accompanies this distribution. The full text of the license may be found at
  9. * http://opensource.org/licenses/bsd-license.php
  10. *
  11. * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
  13. *
  14. **/
  15. #include <Uefi.h>
  16. #include <Library/DebugLib.h>
  17. #include <Library/IoLib.h>
  18. #include <Library/TimerLib.h>
  19. #include <Library/CpldIoLib.h>
  20. #include <Library/OemMiscLib.h>
  21. #include <PlatformArch.h>
  22. #include <Library/PlatformSysCtrlLib.h>
  23. #include <Library/OemAddressMapLib.h>
  24. #include <Library/SerialPortLib.h>
  25. // Right now we only support 1P
  26. BOOLEAN OemIsSocketPresent (UINTN Socket)
  27. {
  28. if (0 == Socket)
  29. {
  30. return TRUE;
  31. }
  32. return FALSE;
  33. }
  34. UINTN OemGetSocketNumber (VOID)
  35. {
  36. return 1;
  37. }
  38. UINTN OemGetDimmSlot(UINTN Socket, UINTN Channel)
  39. {
  40. return 2;
  41. }
  42. UINTN OemGetDdrChannel (VOID)
  43. {
  44. return 2;
  45. }
  46. VOID CoreSelectBoot(VOID)
  47. {
  48. if (!PcdGet64 (PcdTrustedFirmwareEnable))
  49. {
  50. StartupAp ();
  51. }
  52. return;
  53. }
  54. BOOLEAN OemIsMpBoot()
  55. {
  56. return FALSE;
  57. }
  58. VOID OemBiosSwitch(UINT32 Master)
  59. {
  60. return;
  61. }
  62. UINT32 OemIsWarmBoot(VOID)
  63. {
  64. return 0;
  65. }