blob: a2537c271bc48ae97412ac46d0ab3ebb9103a581 [file] [log] [blame]
Kyösti Mälkki7b73e8522022-11-08 04:43:41 +00001/* SPDX-License-Identifier: GPL-2.0-only */
2
3#include <arch/ioapic.h>
4
5Name (PBRS, ResourceTemplate ()
6{
7 WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
8 0x0000, 0x0000, 0x00FF, 0x0000, 0x0100, ,, )
9
10 /* System IO */
11 DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
12 0x0, 0x0, 0xffff, 0x0000, 0x10000, ,,, TypeStatic)
13 IO (Decode16, 0x0CF8, 0x0CF8, 0x08, 0x08, )
14
15 /* Video RAM */
16 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
17 0x00000000, 0x000A0000, 0x000BFFFF,
18 0x00000000, 0x00020000, ,,, AddressRangeMemory, TypeStatic)
19
20 /* Video ROM */
21 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
22 0x00000000, 0x000C0000, 0x000C7FFF,
23 0x00000000, 0x00008000, ,,, AddressRangeMemory, TypeStatic)
24
25 /* Option ROMs ? */
26 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
27 0x00000000, 0x000C8000, 0x000DFFFF,
28 0x00000000, 0x00018000, ,,, AddressRangeMemory, TypeStatic)
29
30 /* Top Of Lowmemory to IOAPIC */
31 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
32 0x00000000, 0x00000000, 0xFEBFFFFF,
33 0x00000000, IO_APIC_ADDR, ,, _Y08, AddressRangeMemory, TypeStatic)
34})
35
36
37Method (_CRS, 0, NotSerialized)
38{
39
40 /* Top Of Lowmemory to IOAPIC */
41 CreateDWordField (PBRS, \_SB.PCI0._Y08._MIN, MEML)
42 CreateDWordField (PBRS, \_SB.PCI0._Y08._MAX, MEMH)
43 CreateDWordField (PBRS, \_SB.PCI0._Y08._LEN, LENM)
44 And (\_SB.PCI0.TOLM, 0xF800, Local1)
Felix Singer034920c2022-12-16 02:25:30 +010045 Local1 >>= 4
Kyösti Mälkki7b73e8522022-11-08 04:43:41 +000046 ShiftLeft (Local1, 0x14, MEML)
47 MEMH = IO_APIC_ADDR - 1
48 LENM = IO_APIC_ADDR - MEML
49
50 Return (PBRS)
51}
52
53Method (_STA, 0, NotSerialized)
54{
55 Return (0x0F)
56}