ioapic.h 936 B

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