Peter Lemenkov has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37296 )
Change subject: mb/lenovo/l520/devicetree: Use subsystemid inheritance
......................................................................
mb/lenovo/l520/devicetree: Use subsystemid inheritance
Change-Id: I90774e22fb7765f44b6cd4fa05b535236b782023
Signed-off-by: Peter Lemenkov <lemenkov(a)gmail.com>
---
M src/mainboard/lenovo/l520/devicetree.cb
1 file changed, 39 insertions(+), 83 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/96/37296/1
diff --git a/src/mainboard/lenovo/l520/devicetree.cb b/src/mainboard/lenovo/l520/devicetree.cb
index 024b8f8..29b7598 100644
--- a/src/mainboard/lenovo/l520/devicetree.cb
+++ b/src/mainboard/lenovo/l520/devicetree.cb
@@ -15,7 +15,7 @@
register "gpu_panel_power_up_delay" = "0"
register "gpu_pch_backlight" = "0x00000000"
- device cpu_cluster 0x0 on
+ device cpu_cluster 0 on
chip cpu/intel/model_206ax
register "c1_acpower" = "1"
register "c1_battery" = "1"
@@ -28,15 +28,13 @@
end
end
- device domain 0x0 on
- device pci 00.0 on # Host bridge Host bridge
- subsystemid 0x17aa 0x21dd
- end
- device pci 01.0 on # PCIe Bridge for discrete graphics
- end
- device pci 02.0 on # Internal graphics VGA controller
- subsystemid 0x17aa 0x21dd
- end
+ device domain 0 on
+ subsystemid 0x17aa 0x21dd inherit
+
+ device pci 00.0 on end # Host bridge
+ device pci 01.0 on end # PCIe Bridge for discrete graphics
+ device pci 02.0 on end # Internal graphics VGA controller
+
chip southbridge/intel/bd82x6x # Intel Series 6 Cougar Point PCH
register "c2_latency" = "0x0065"
register "docking_supported" = "1"
@@ -54,57 +52,28 @@
register "spi_uvscc" = "0"
register "spi_lvscc" = "0x2005"
- device pci 16.0 on # Management Engine Interface 1
- subsystemid 0x17aa 0x21dd
- end
- device pci 16.1 off # Management Engine Interface 2
- end
- device pci 16.2 off # Management Engine IDE-R
- end
- device pci 16.3 off # Management Engine KT
- end
- device pci 19.0 off # Intel Gigabit Ethernet
- end
- device pci 1a.0 on # USB2 EHCI #2
- subsystemid 0x17aa 0x21dd
- end
- device pci 1b.0 on # High Definition Audio Audio controller
- subsystemid 0x17aa 0x21dd
- end
- device pci 1c.0 on # PCIe Port #1
- subsystemid 0x17aa 0x21dd
- end
- device pci 1c.1 on # PCIe Port #2
- subsystemid 0x17aa 0x21dd
- end
- device pci 1c.2 on # PCIe Port #3
- subsystemid 0x17aa 0x21dd
- end
- device pci 1c.3 on # PCIe Port #4
- subsystemid 0x17aa 0x21dd
- end
- device pci 1c.4 on # PCIe Port #5
- subsystemid 0x17aa 0x21dd
- end
- device pci 1c.5 on # PCIe Port #6
- subsystemid 0x17aa 0x21dd
- end
- device pci 1c.6 off # PCIe Port #7
- end
- device pci 1c.7 off # PCIe Port #8
- end
- device pci 1d.0 on # USB2 EHCI #1
- subsystemid 0x17aa 0x21dd
- end
- device pci 1e.0 off # PCI bridge
- end
+ device pci 16.0 on end # Management Engine Interface 1
+ device pci 16.1 off end # Management Engine Interface 2
+ device pci 16.2 off end # Management Engine IDE-R
+ device pci 16.3 off end # Management Engine KT
+ device pci 19.0 off end # Intel Gigabit Ethernet
+ device pci 1a.0 on end # USB2 EHCI #2
+ device pci 1b.0 on end # High Definition Audio Audio controller
+ device pci 1c.0 on end # PCIe Port #1
+ device pci 1c.1 on end # PCIe Port #2
+ device pci 1c.2 on end # PCIe Port #3
+ device pci 1c.3 on end # PCIe Port #4
+ device pci 1c.4 on end # PCIe Port #5
+ device pci 1c.5 on end # PCIe Port #6
+ device pci 1c.6 off end # PCIe Port #7
+ device pci 1c.7 off end # PCIe Port #8
+ device pci 1d.0 on end # USB2 EHCI #1
+ device pci 1e.0 off end # PCI bridge
device pci 1f.0 on # LPC bridge PCI-LPC bridge
- subsystemid 0x17aa 0x21dd
chip ec/lenovo/pmh7
register "backlight_enable" = "0x01"
register "dock_event_enable" = "0x01"
- device pnp ff.1 on # dummy
- end
+ device pnp ff.1 on end # dummy
end
chip ec/lenovo/h8
register "config0" = "0xa7"
@@ -136,35 +105,22 @@
io 0x66 = 0x1604
end
end
- end
- device pci 1f.2 on # SATA Controller 1
- subsystemid 0x17aa 0x21dd
- end
+ end # LPC bridge
+ device pci 1f.2 on end # SATA Controller 1
device pci 1f.3 on # SMBus
- subsystemid 0x17aa 0x21dd
chip drivers/i2c/at24rf08c # eeprom, 8 virtual devices, same chip
- device i2c 54 on
- end
- device i2c 55 on
- end
- device i2c 56 on
- end
- device i2c 57 on
- end
- device i2c 5c on
- end
- device i2c 5d on
- end
- device i2c 5e on
- end
- device i2c 5f on
- end
+ device i2c 54 on end
+ device i2c 55 on end
+ device i2c 56 on end
+ device i2c 57 on end
+ device i2c 5c on end
+ device i2c 5d on end
+ device i2c 5e on end
+ device i2c 5f on end
end
- end
- device pci 1f.5 off # SATA Controller 2
- end
- device pci 1f.6 off # Thermal
- end
+ end # SMBus
+ device pci 1f.5 off end # SATA Controller 2
+ device pci 1f.6 off end # Thermal
end
end
end
--
To view, visit https://review.coreboot.org/c/coreboot/+/37296
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I90774e22fb7765f44b6cd4fa05b535236b782023
Gerrit-Change-Number: 37296
Gerrit-PatchSet: 1
Gerrit-Owner: Peter Lemenkov <lemenkov(a)gmail.com>
Gerrit-Reviewer: Alexander Couzens <lynxis(a)fe80.eu>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Peter Lemenkov <lemenkov(a)gmail.com>
Gerrit-MessageType: newchange
Peter Lemenkov has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37284 )
Change subject: mb/lenovo/t420/devicetree: Use subsystemid inheritance
......................................................................
mb/lenovo/t420/devicetree: Use subsystemid inheritance
Change-Id: Ia321f2b974539ac1684173d767dd9eb64060364a
Signed-off-by: Peter Lemenkov <lemenkov(a)gmail.com>
---
M src/mainboard/lenovo/t420/devicetree.cb
1 file changed, 14 insertions(+), 36 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/84/37284/1
diff --git a/src/mainboard/lenovo/t420/devicetree.cb b/src/mainboard/lenovo/t420/devicetree.cb
index 6deff60..53bd16f 100644
--- a/src/mainboard/lenovo/t420/devicetree.cb
+++ b/src/mainboard/lenovo/t420/devicetree.cb
@@ -37,13 +37,11 @@
register "pci_mmio_size" = "2048"
device domain 0 on
- device pci 00.0 on
- subsystemid 0x17aa 0x21ce
- end # host bridge
+ subsystemid 0x17aa 0x21ce inherit
+
+ device pci 00.0 on end # host bridge
device pci 01.0 on end # PCIe Bridge for discrete graphics
- device pci 02.0 on
- subsystemid 0x17aa 0x21ce
- end # Integrated Graphics Controller
+ device pci 02.0 on end # Integrated Graphics Controller
chip southbridge/intel/bd82x6x # Intel Series 6 Cougar Point PCH
# GPI routing
@@ -67,6 +65,7 @@
# Enable zero-based linear PCIe root port functions
register "pcie_port_coalesce" = "1"
+
register "c2_latency" = "101" # c2 not supported
# device specific SPI configuration
@@ -77,46 +76,30 @@
device pci 16.1 off end # Management Engine Interface 2
device pci 16.2 off end # Management Engine IDE-R
device pci 16.3 off end # Management Engine KT
- device pci 19.0 on
- subsystemid 0x17aa 0x21ce
- end # Intel Gigabit Ethernet
- device pci 1a.0 on
- subsystemid 0x17aa 0x21ce
- end # USB Enhanced Host Controller #2
- device pci 1b.0 on
- subsystemid 0x17aa 0x21ce
- end # High Definition Audio Controller
+ device pci 19.0 on end # Intel Gigabit Ethernet
+ device pci 1a.0 on end # USB Enhanced Host Controller #2
+ device pci 1b.0 on end # High Definition Audio Controller
device pci 1c.0 off end # PCIe Port #1
- device pci 1c.1 on
- subsystemid 0x17aa 0x21ce
- end # PCIe Port #2 Integrated Wireless LAN
+ device pci 1c.1 on end # PCIe Port #2 Integrated Wireless LAN
device pci 1c.2 off end # PCIe Port #3
device pci 1c.3 on
- subsystemid 0x17aa 0x21ce
smbios_slot_desc "7" "3" "ExpressCard Slot" "8"
end # PCIe Port #4 ExpressCard
device pci 1c.4 on
- subsystemid 0x17aa 0x21ce
chip drivers/ricoh/rce822
register "sdwppol" = "1"
register "disable_mask" = "0x87"
- device pci 00.0 on
- subsystemid 0x17aa 0x21ce
- end
+ device pci 00.0 on end
end
end # PCIe Port #5 (Ricoh SD & FW)
device pci 1c.5 off end # PCIe Port #6 Intel Gigabit Ethernet PHY (not PCIe)
device pci 1c.6 off end # PCIe Port #7
device pci 1c.7 off end # PCIe Port #8
- device pci 1d.0 on
- subsystemid 0x17aa 0x21ce
- end # USB Enhanced Host Controller #1
+ device pci 1d.0 on end # USB Enhanced Host Controller #1
device pci 1e.0 off end # PCI bridge
device pci 1f.0 on
- subsystemid 0x17aa 0x21ce
chip ec/lenovo/pmh7
- device pnp ff.1 on # dummy
- end
+ device pnp ff.1 on end # dummy
register "backlight_enable" = "0x01"
register "dock_event_enable" = "0x01"
end
@@ -176,11 +159,8 @@
register "has_thinker1" = "1"
end
end # LPC Controller
- device pci 1f.2 on
- subsystemid 0x17aa 0x21ce
- end # 6 port SATA AHCI Controller
+ device pci 1f.2 on end # 6 port SATA AHCI Controller
device pci 1f.3 on
- subsystemid 0x17aa 0x21ce
# eeprom, 8 virtual devices, same chip
chip drivers/i2c/at24rf08c
device i2c 54 on end
@@ -194,9 +174,7 @@
end
end # SMBus Controller
device pci 1f.5 off end # SATA Controller 2
- device pci 1f.6 on
- subsystemid 0x17aa 0x21ce
- end # Thermal
+ device pci 1f.6 on end # Thermal
end
end
end
--
To view, visit https://review.coreboot.org/c/coreboot/+/37284
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia321f2b974539ac1684173d767dd9eb64060364a
Gerrit-Change-Number: 37284
Gerrit-PatchSet: 1
Gerrit-Owner: Peter Lemenkov <lemenkov(a)gmail.com>
Gerrit-MessageType: newchange
Peter Lemenkov has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37294 )
Change subject: mb/lenovo/w520/devicetree: Use subsystemid inheritance
......................................................................
mb/lenovo/w520/devicetree: Use subsystemid inheritance
Change-Id: If7816992e717b4da585b16e5bbe67610c9af867d
Signed-off-by: Peter Lemenkov <lemenkov(a)gmail.com>
---
M src/mainboard/lenovo/t520/variants/w520/devicetree.cb
1 file changed, 10 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/94/37294/1
diff --git a/src/mainboard/lenovo/t520/variants/w520/devicetree.cb b/src/mainboard/lenovo/t520/variants/w520/devicetree.cb
index 8716046..8b2cbe7 100644
--- a/src/mainboard/lenovo/t520/variants/w520/devicetree.cb
+++ b/src/mainboard/lenovo/t520/variants/w520/devicetree.cb
@@ -37,9 +37,13 @@
register "pci_mmio_size" = "2048"
device domain 0 on
+ subsystemid 0x17aa 0x21cf inherit
+
device pci 00.0 on end # host bridge
device pci 01.0 on end # NVIDIA Corporation GF119M [NVS 4200M]
- device pci 02.0 on end # vga controller
+ device pci 02.0 on
+ subsystemid 0x17aa 0x21d1
+ end # vga controller
chip southbridge/intel/bd82x6x # Intel Series 6 Cougar Point PCH
# GPI routing
@@ -73,7 +77,9 @@
device pci 16.1 off end
device pci 16.2 off end
device pci 16.3 off end
- device pci 19.0 on end # Intel Gigabit Ethernet
+ device pci 19.0 on # Intel Gigabit Ethernet
+ subsystemid 0x17aa 0x21ce
+ end
device pci 1a.0 on end # USB2 EHCI #2
device pci 1b.0 on end # High Definition Audio
device pci 1c.0 off end # PCIe Port #1
@@ -87,10 +93,10 @@
device pci 1c.6 on end # PCIe Port #7 USB 3.0 only W520
device pci 1c.7 off end # PCIe Port #8
device pci 1d.0 on end # USB2 EHCI #1
+
device pci 1f.0 on #LPC bridge
chip ec/lenovo/pmh7
- device pnp ff.1 on # dummy
- end
+ device pnp ff.1 on end # dummy
register "backlight_enable" = "0x01"
register "dock_event_enable" = "0x01"
end
--
To view, visit https://review.coreboot.org/c/coreboot/+/37294
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: If7816992e717b4da585b16e5bbe67610c9af867d
Gerrit-Change-Number: 37294
Gerrit-PatchSet: 1
Gerrit-Owner: Peter Lemenkov <lemenkov(a)gmail.com>
Gerrit-MessageType: newchange
Philipp Hug has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35246 )
Change subject: riscv: Implement ipi using clint for emulation to enable smp in qemu.
......................................................................
riscv: Implement ipi using clint for emulation to enable smp in qemu.
testing=Set MAX_CPUS=2 and run qemu with -smp 2
Change-Id: I94fb25fad103e3cb5db676eb4caead11d54ae0ae
---
M src/mainboard/emulation/qemu-riscv/Makefile.inc
M src/mainboard/emulation/qemu-riscv/clint.c
M src/mainboard/emulation/spike-riscv/Makefile.inc
M src/mainboard/emulation/spike-riscv/clint.c
M src/soc/ucb/riscv/Makefile.inc
D src/soc/ucb/riscv/ipi.c
6 files changed, 14 insertions(+), 25 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/35246/1
diff --git a/src/mainboard/emulation/qemu-riscv/Makefile.inc b/src/mainboard/emulation/qemu-riscv/Makefile.inc
index eb99544..2ca75fd 100644
--- a/src/mainboard/emulation/qemu-riscv/Makefile.inc
+++ b/src/mainboard/emulation/qemu-riscv/Makefile.inc
@@ -19,6 +19,7 @@
romstage-y += romstage.c
romstage-y += uart.c
romstage-y += rom_media.c
+romstage-y += clint.c
ramstage-y += uart.c
ramstage-y += rom_media.c
diff --git a/src/mainboard/emulation/qemu-riscv/clint.c b/src/mainboard/emulation/qemu-riscv/clint.c
index 367d48d..4a00bc2 100644
--- a/src/mainboard/emulation/qemu-riscv/clint.c
+++ b/src/mainboard/emulation/qemu-riscv/clint.c
@@ -14,6 +14,7 @@
*/
#include <mcall.h>
+#include <device/mmio.h>
#include <mainboard/addressmap.h>
/* This function is used to initialize HLS()->time/HLS()->timecmp */
@@ -23,3 +24,8 @@
HLS()->time = (uint64_t *)(QEMU_VIRT_CLINT + 0xbff8);
HLS()->timecmp = (uint64_t *)(QEMU_VIRT_CLINT + 0x4000 + 8 * hart_id);
}
+
+void set_msip(int hartid, int val)
+{
+ write32((void *)(QEMU_VIRT_CLINT + 4 * (uintptr_t)hartid), !!val);
+}
diff --git a/src/mainboard/emulation/spike-riscv/Makefile.inc b/src/mainboard/emulation/spike-riscv/Makefile.inc
index 38977b6..bfeaf58 100644
--- a/src/mainboard/emulation/spike-riscv/Makefile.inc
+++ b/src/mainboard/emulation/spike-riscv/Makefile.inc
@@ -18,6 +18,7 @@
romstage-y += romstage.c
romstage-y += uart.c
romstage-y += rom_media.c
+romstage-y += clint.c
ramstage-y += uart.c
ramstage-y += rom_media.c
ramstage-y += clint.c
diff --git a/src/mainboard/emulation/spike-riscv/clint.c b/src/mainboard/emulation/spike-riscv/clint.c
index 7ad3f5a..c39e058 100644
--- a/src/mainboard/emulation/spike-riscv/clint.c
+++ b/src/mainboard/emulation/spike-riscv/clint.c
@@ -14,6 +14,7 @@
*/
#include <mcall.h>
+#include <device/mmio.h>
#define SPIKE_CLINT_BASE 0x02000000
@@ -24,3 +25,8 @@
HLS()->time = (uint64_t *)(SPIKE_CLINT_BASE + 0xbff8);
HLS()->timecmp = (uint64_t *)(SPIKE_CLINT_BASE + 0x4000 + 8 * hart_id);
}
+
+void set_msip(int hartid, int val)
+{
+ write32((void *)(SPIKE_CLINT_BASE + 4 * (uintptr_t)hartid), !!val);
+}
diff --git a/src/soc/ucb/riscv/Makefile.inc b/src/soc/ucb/riscv/Makefile.inc
index ef03642..80899d57 100644
--- a/src/soc/ucb/riscv/Makefile.inc
+++ b/src/soc/ucb/riscv/Makefile.inc
@@ -1,11 +1,7 @@
ifeq ($(CONFIG_SOC_UCB_RISCV),y)
-bootblock-y += ipi.c
-
romstage-y += cbmem.c
-romstage-y += ipi.c
ramstage-y += cbmem.c
-ramstage-y += ipi.c
endif
diff --git a/src/soc/ucb/riscv/ipi.c b/src/soc/ucb/riscv/ipi.c
deleted file mode 100644
index 80307a8..0000000
--- a/src/soc/ucb/riscv/ipi.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2018 HardenedLinux
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#include <mcall.h>
-
-/* TODO: Please implement this function */
-void set_msip(int hartid, int val)
-{
-}
--
To view, visit https://review.coreboot.org/c/coreboot/+/35246
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I94fb25fad103e3cb5db676eb4caead11d54ae0ae
Gerrit-Change-Number: 35246
Gerrit-PatchSet: 1
Gerrit-Owner: Philipp Hug <philipp(a)hug.cx>
Gerrit-MessageType: newchange