acr_r361.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  17. * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  20. * DEALINGS IN THE SOFTWARE.
  21. */
  22. #ifndef __NVKM_SECBOOT_ACR_R361_H__
  23. #define __NVKM_SECBOOT_ACR_R361_H__
  24. #include "acr_r352.h"
  25. /**
  26. * struct acr_r361_flcn_bl_desc - DMEM bootloader descriptor
  27. * @signature: 16B signature for secure code. 0s if no secure code
  28. * @ctx_dma: DMA context to be used by BL while loading code/data
  29. * @code_dma_base: 256B-aligned Physical FB Address where code is located
  30. * (falcon's $xcbase register)
  31. * @non_sec_code_off: offset from code_dma_base where the non-secure code is
  32. * located. The offset must be multiple of 256 to help perf
  33. * @non_sec_code_size: the size of the nonSecure code part.
  34. * @sec_code_off: offset from code_dma_base where the secure code is
  35. * located. The offset must be multiple of 256 to help perf
  36. * @sec_code_size: offset from code_dma_base where the secure code is
  37. * located. The offset must be multiple of 256 to help perf
  38. * @code_entry_point: code entry point which will be invoked by BL after
  39. * code is loaded.
  40. * @data_dma_base: 256B aligned Physical FB Address where data is located.
  41. * (falcon's $xdbase register)
  42. * @data_size: size of data block. Should be multiple of 256B
  43. *
  44. * Structure used by the bootloader to load the rest of the code. This has
  45. * to be filled by host and copied into DMEM at offset provided in the
  46. * hsflcn_bl_desc.bl_desc_dmem_load_off.
  47. */
  48. struct acr_r361_flcn_bl_desc {
  49. u32 reserved[4];
  50. u32 signature[4];
  51. u32 ctx_dma;
  52. struct flcn_u64 code_dma_base;
  53. u32 non_sec_code_off;
  54. u32 non_sec_code_size;
  55. u32 sec_code_off;
  56. u32 sec_code_size;
  57. u32 code_entry_point;
  58. struct flcn_u64 data_dma_base;
  59. u32 data_size;
  60. };
  61. void acr_r361_generate_hs_bl_desc(const struct hsf_load_header *, void *, u64);
  62. extern const struct acr_r352_ls_func acr_r361_ls_fecs_func;
  63. extern const struct acr_r352_ls_func acr_r361_ls_gpccs_func;
  64. extern const struct acr_r352_ls_func acr_r361_ls_pmu_func;
  65. extern const struct acr_r352_ls_func acr_r361_ls_sec2_func;
  66. #endif