ioapic.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* ioapic.h - public IOAPIC APIs */
  2. /*
  3. * Copyright (c) 2012-2015 Wind River Systems, Inc.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0
  6. */
  7. #ifndef ZEPHYR_INCLUDE_DRIVERS_IOAPIC_H_
  8. #define ZEPHYR_INCLUDE_DRIVERS_IOAPIC_H_
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. /*
  13. * Redirection table entry bits: lower 32 bit
  14. * Used as flags argument in ioapic_irq_set
  15. */
  16. #define IOAPIC_INT_MASK 0x00010000
  17. #define IOAPIC_TRIGGER_MASK 0x00008000
  18. #define IOAPIC_LEVEL 0x00008000
  19. #define IOAPIC_EDGE 0x00000000
  20. #define IOAPIC_REMOTE 0x00004000
  21. #define IOAPIC_LOW 0x00002000
  22. #define IOAPIC_HIGH 0x00000000
  23. #define IOAPIC_LOGICAL 0x00000800
  24. #define IOAPIC_PHYSICAL 0x00000000
  25. #define IOAPIC_FIXED 0x00000000
  26. #define IOAPIC_LOWEST 0x00000100
  27. #define IOAPIC_SMI 0x00000200
  28. #define IOAPIC_NMI 0x00000400
  29. #define IOAPIC_INIT 0x00000500
  30. #define IOAPIC_EXTINT 0x00000700
  31. #ifndef _ASMLANGUAGE
  32. uint32_t z_ioapic_num_rtes(void);
  33. void z_ioapic_irq_enable(unsigned int irq);
  34. void z_ioapic_irq_disable(unsigned int irq);
  35. void z_ioapic_int_vec_set(unsigned int irq, unsigned int vector);
  36. void z_ioapic_irq_set(unsigned int irq, unsigned int vector, uint32_t flags);
  37. #endif /* _ASMLANGUAGE */
  38. #ifdef __cplusplus
  39. }
  40. #endif
  41. #endif /* ZEPHYR_INCLUDE_DRIVERS_IOAPIC_H_ */