rts_sim.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * Copyright (C) 2011-2017 Intel Corporation. All rights reserved.
  3. *
  4. * Redistribution and use in source and binary forms, with or without
  5. * modification, are permitted provided that the following conditions
  6. * are met:
  7. *
  8. * * Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. * * Redistributions in binary form must reproduce the above copyright
  11. * notice, this list of conditions and the following disclaimer in
  12. * the documentation and/or other materials provided with the
  13. * distribution.
  14. * * Neither the name of Intel Corporation nor the names of its
  15. * contributors may be used to endorse or promote products derived
  16. * from this software without specific prior written permission.
  17. *
  18. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  19. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  20. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  21. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  22. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  23. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  24. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  25. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  26. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  27. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  28. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  29. *
  30. */
  31. #ifndef _RTS_SIM_H_
  32. #define _RTS_SIM_H_
  33. #include "arch.h"
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37. const sgx_cpu_svn_t DEFAULT_CPUSVN = {
  38. {
  39. 0x48, 0x20, 0xf3, 0x37, 0x6a, 0xe6, 0xb2, 0xf2,
  40. 0x03, 0x4d, 0x3b, 0x7a, 0x4b, 0x48, 0xa7, 0x78
  41. }
  42. };
  43. const sgx_cpu_svn_t UPGRADED_CPUSVN = {
  44. {
  45. 0x53, 0x39, 0xae, 0x8c, 0x93, 0xae, 0x8f, 0x3c,
  46. 0xe4, 0x32, 0xdb, 0x92, 0x4d, 0x0f, 0x07, 0x33
  47. }
  48. };
  49. const sgx_cpu_svn_t DOWNGRADED_CPUSVN = {
  50. {
  51. 0x64, 0xea, 0x4f, 0x3f, 0xa0, 0x03, 0x0c, 0x36,
  52. 0x38, 0x3c, 0x32, 0x2d, 0x4f, 0x3a, 0x8d, 0x4f
  53. }
  54. };
  55. typedef struct _global_data_sim_t
  56. {
  57. secs_t* secs_ptr;
  58. sgx_cpu_svn_t cpusvn_sim;
  59. uint64_t seed; /* to initialize the PRNG */
  60. } global_data_sim_t;
  61. #ifdef __cplusplus
  62. }
  63. #endif
  64. #endif