ioapic.h 936 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * From coreboot file of the same name
  4. *
  5. * Copyright (C) 2010 coresystems GmbH
  6. */
  7. #ifndef __ASM_IOAPIC_H
  8. #define __ASM_IOAPIC_H
  9. #define IO_APIC_ADDR 0xfec00000
  10. /* Direct addressed register */
  11. #define IO_APIC_INDEX (IO_APIC_ADDR + 0x00)
  12. #define IO_APIC_DATA (IO_APIC_ADDR + 0x10)
  13. /* Indirect addressed register offset */
  14. #define IO_APIC_ID 0x00
  15. #define IO_APIC_VER 0x01
  16. /**
  17. * io_apic_read() - Read I/O APIC register
  18. *
  19. * This routine reads I/O APIC indirect addressed register.
  20. *
  21. * @reg: address of indirect addressed register
  22. * @return: register value to read
  23. */
  24. u32 io_apic_read(u32 reg);
  25. /**
  26. * io_apic_write() - Write I/O APIC register
  27. *
  28. * This routine writes I/O APIC indirect addressed register.
  29. *
  30. * @reg: address of indirect addressed register
  31. * @val: register value to write
  32. */
  33. void io_apic_write(u32 reg, u32 val);
  34. void io_apic_set_id(int ioapic_id);
  35. #endif