iorpc_mpipe_info.c 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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 enumerate_aux_param {
  17. _gxio_mpipe_link_name_t name;
  18. _gxio_mpipe_link_mac_t mac;
  19. };
  20. int gxio_mpipe_info_enumerate_aux(gxio_mpipe_info_context_t * context,
  21. unsigned int idx,
  22. _gxio_mpipe_link_name_t * name,
  23. _gxio_mpipe_link_mac_t * mac)
  24. {
  25. int __result;
  26. struct enumerate_aux_param temp;
  27. struct enumerate_aux_param *params = &temp;
  28. __result =
  29. hv_dev_pread(context->fd, 0, (HV_VirtAddr) params, sizeof(*params),
  30. (((uint64_t) idx << 32) |
  31. GXIO_MPIPE_INFO_OP_ENUMERATE_AUX));
  32. *name = params->name;
  33. *mac = params->mac;
  34. return __result;
  35. }
  36. EXPORT_SYMBOL(gxio_mpipe_info_enumerate_aux);
  37. struct get_mmio_base_param {
  38. HV_PTE base;
  39. };
  40. int gxio_mpipe_info_get_mmio_base(gxio_mpipe_info_context_t * context,
  41. HV_PTE *base)
  42. {
  43. int __result;
  44. struct get_mmio_base_param temp;
  45. struct get_mmio_base_param *params = &temp;
  46. __result =
  47. hv_dev_pread(context->fd, 0, (HV_VirtAddr) params, sizeof(*params),
  48. GXIO_MPIPE_INFO_OP_GET_MMIO_BASE);
  49. *base = params->base;
  50. return __result;
  51. }
  52. EXPORT_SYMBOL(gxio_mpipe_info_get_mmio_base);
  53. struct check_mmio_offset_param {
  54. unsigned long offset;
  55. unsigned long size;
  56. };
  57. int gxio_mpipe_info_check_mmio_offset(gxio_mpipe_info_context_t * context,
  58. unsigned long offset, unsigned long size)
  59. {
  60. struct check_mmio_offset_param temp;
  61. struct check_mmio_offset_param *params = &temp;
  62. params->offset = offset;
  63. params->size = size;
  64. return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
  65. sizeof(*params),
  66. GXIO_MPIPE_INFO_OP_CHECK_MMIO_OFFSET);
  67. }
  68. EXPORT_SYMBOL(gxio_mpipe_info_check_mmio_offset);