iorpc_mpipe_info.c 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*
  2. * Copyright 2012 Tilera Corporation. All Rights Reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation, version 2.
  7. *
  8. * This program is distributed in the hope that it will be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
  11. * NON INFRINGEMENT. See the GNU General Public License for
  12. * more details.
  13. */
  14. /* This file is machine-generated; DO NOT EDIT! */
  15. #include "gxio/iorpc_mpipe_info.h"
  16. struct instance_aux_param {
  17. _gxio_mpipe_link_name_t name;
  18. };
  19. int gxio_mpipe_info_instance_aux(gxio_mpipe_info_context_t *context,
  20. _gxio_mpipe_link_name_t name)
  21. {
  22. struct instance_aux_param temp;
  23. struct instance_aux_param *params = &temp;
  24. params->name = name;
  25. return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
  26. sizeof(*params), GXIO_MPIPE_INFO_OP_INSTANCE_AUX);
  27. }
  28. EXPORT_SYMBOL(gxio_mpipe_info_instance_aux);
  29. struct enumerate_aux_param {
  30. _gxio_mpipe_link_name_t name;
  31. _gxio_mpipe_link_mac_t mac;
  32. };
  33. int gxio_mpipe_info_enumerate_aux(gxio_mpipe_info_context_t *context,
  34. unsigned int idx,
  35. _gxio_mpipe_link_name_t *name,
  36. _gxio_mpipe_link_mac_t *mac)
  37. {
  38. int __result;
  39. struct enumerate_aux_param temp;
  40. struct enumerate_aux_param *params = &temp;
  41. __result =
  42. hv_dev_pread(context->fd, 0, (HV_VirtAddr) params, sizeof(*params),
  43. (((uint64_t)idx << 32) |
  44. GXIO_MPIPE_INFO_OP_ENUMERATE_AUX));
  45. *name = params->name;
  46. *mac = params->mac;
  47. return __result;
  48. }
  49. EXPORT_SYMBOL(gxio_mpipe_info_enumerate_aux);
  50. struct get_mmio_base_param {
  51. HV_PTE base;
  52. };
  53. int gxio_mpipe_info_get_mmio_base(gxio_mpipe_info_context_t *context,
  54. HV_PTE *base)
  55. {
  56. int __result;
  57. struct get_mmio_base_param temp;
  58. struct get_mmio_base_param *params = &temp;
  59. __result =
  60. hv_dev_pread(context->fd, 0, (HV_VirtAddr) params, sizeof(*params),
  61. GXIO_MPIPE_INFO_OP_GET_MMIO_BASE);
  62. *base = params->base;
  63. return __result;
  64. }
  65. EXPORT_SYMBOL(gxio_mpipe_info_get_mmio_base);
  66. struct check_mmio_offset_param {
  67. unsigned long offset;
  68. unsigned long size;
  69. };
  70. int gxio_mpipe_info_check_mmio_offset(gxio_mpipe_info_context_t *context,
  71. unsigned long offset, unsigned long size)
  72. {
  73. struct check_mmio_offset_param temp;
  74. struct check_mmio_offset_param *params = &temp;
  75. params->offset = offset;
  76. params->size = size;
  77. return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
  78. sizeof(*params),
  79. GXIO_MPIPE_INFO_OP_CHECK_MMIO_OFFSET);
  80. }
  81. EXPORT_SYMBOL(gxio_mpipe_info_check_mmio_offset);