Pptt.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /** @file
  2. *
  3. * Copyright (c) 2018, Hisilicon Limited. All rights reserved.
  4. * Copyright (c) 2018, 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. * Based on the files under Platform/ARM/JunoPkg/AcpiTables/
  15. *
  16. **/
  17. #ifndef _PPTT_H_
  18. #define _PPTT_H_
  19. #include <IndustryStandard/Acpi.h>
  20. #include <Library/ArmLib/ArmLibPrivate.h>
  21. #include <Library/BaseMemoryLib.h>
  22. #include <Library/DebugLib.h>
  23. #include <Library/MemoryAllocationLib.h>
  24. #include <Library/UefiBootServicesTableLib.h>
  25. #include <Library/UefiLib.h>
  26. #include <Protocol/AcpiSystemDescriptionTable.h>
  27. #include <Protocol/AcpiTable.h>
  28. #include "../D05AcpiTables/Hi1616Platform.h"
  29. #define PPTT_VENDOR_ID SIGNATURE_32('H', 'I', 'S', 'I')
  30. #define EFI_ACPI_MAX_NUM_TABLES 20
  31. #define PPTT_TABLE_MAX_LEN 0x6000
  32. #define PPTT_SOCKET_NO 0x2
  33. #define PPTT_SCCL_NO 0x2
  34. #define PPTT_CLUSTER_NO 0x4
  35. #define PPTT_CORE_NO 0x4
  36. #define PPTT_SOCKET_COMPONENT_NO 0x1
  37. #define PPTT_CACHE_NO 0x4
  38. typedef union {
  39. struct {
  40. UINT32 InD :1;
  41. UINT32 Level :3;
  42. UINT32 Reserved :28;
  43. } Bits;
  44. UINT32 Data;
  45. } CSSELR_DATA;
  46. typedef union {
  47. struct {
  48. UINT32 LineSize :3;
  49. UINT32 Associativity :10;
  50. UINT32 NumSets :15;
  51. UINT32 Wa :1;
  52. UINT32 Ra :1;
  53. UINT32 Wb :1;
  54. UINT32 Wt :1;
  55. } Bits;
  56. UINT32 Data;
  57. } CCSIDR_DATA;
  58. #endif // _PPTT_H_