Platform.asl 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /** @file
  2. ACPI DSDT table
  3. Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. // Define Port 80 as an ACPI Operating Region to use for debugging. Please
  7. // note that the Intel CRBs have the ability to ouput a Word to
  8. // Port 80h for debugging purposes, so the model implemented here may not be
  9. // able to be used on OEM Designs.
  10. OperationRegion(PRT0,SystemIO,0x80,2)
  11. Field(PRT0,WordAcc,Lock,Preserve)
  12. {
  13. P80B, 16
  14. }
  15. // Port 80h Update:
  16. // Update 2 bytes of Port 80h.
  17. //
  18. // Arguments:
  19. // Arg0: 0 = Write Port 80h
  20. // 1 = Write Port 81h
  21. // Arg1: 8-bit Value to write
  22. //
  23. // Return Value:
  24. // None
  25. Name(P80T, 0) // temp buffer for P80
  26. Method(D8XH,2,Serialized)
  27. {
  28. If(LEqual(Arg0,0)) // Write Port 80h
  29. {
  30. Store(Or(And(P80T,0xFF00),Arg1),P80T)
  31. }
  32. If(LEqual(Arg0,1)) // Write Port 81h
  33. {
  34. Store(Or(And(P80T,0x00FF),ShiftLeft(Arg1,8)),P80T)
  35. }
  36. Store(P80T,P80B)
  37. }
  38. //
  39. // Define SW SMI port as an ACPI Operating Region to use for generate SW SMI.
  40. //
  41. OperationRegion(SPRT,SystemIO, 0xB2,2)
  42. Field (SPRT, ByteAcc, Lock, Preserve) {
  43. SSMP, 8
  44. }
  45. // The _PIC Control Method is optional for ACPI design. It allows the
  46. // OS to inform the ASL code which interrupt controller is being used,
  47. // the 8259 or APIC. The reference code in this document will address
  48. // PCI IRQ Routing and resource allocation for both cases.
  49. //
  50. // The values passed into _PIC are:
  51. // 0 = 8259
  52. // 1 = IOAPIC
  53. Method(\_PIC,1)
  54. {
  55. Store(Arg0,PICM)
  56. }
  57. Scope (\)
  58. {
  59. //
  60. // Global Name, returns current Interrupt controller mode;
  61. // updated from _PIC control method
  62. //
  63. Name(PICM, 0)
  64. }