syscall_public.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright 2010 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. /**
  15. * @file syscall.h
  16. * Indices for the hypervisor system calls that are intended to be called
  17. * directly, rather than only through hypervisor-generated "glue" code.
  18. */
  19. #ifndef _SYS_HV_INCLUDE_SYSCALL_PUBLIC_H
  20. #define _SYS_HV_INCLUDE_SYSCALL_PUBLIC_H
  21. /** Fast syscall flag bit location. When this bit is set, the hypervisor
  22. * handles the syscall specially.
  23. */
  24. #define HV_SYS_FAST_SHIFT 14
  25. /** Fast syscall flag bit mask. */
  26. #define HV_SYS_FAST_MASK (1 << HV_SYS_FAST_SHIFT)
  27. /** Bit location for flagging fast syscalls that can be called from PL0. */
  28. #define HV_SYS_FAST_PLO_SHIFT 13
  29. /** Fast syscall allowing PL0 bit mask. */
  30. #define HV_SYS_FAST_PL0_MASK (1 << HV_SYS_FAST_PLO_SHIFT)
  31. /** Perform an MF that waits for all victims to reach DRAM. */
  32. #define HV_SYS_fence_incoherent (51 | HV_SYS_FAST_MASK \
  33. | HV_SYS_FAST_PL0_MASK)
  34. #endif /* !_SYS_HV_INCLUDE_SYSCALL_PUBLIC_H */