From a17d22e51aa5bd133fb53e78ab75c171113e9383 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Wed, 24 Jul 2024 23:51:05 +0200 Subject: device: move is_domain0 and is_dev_on_domain0 to common code Move is_domain0 and is_dev_on_domain0 from the Intel Xeon SP code to the common coreboot code so that it can be used elsewhere in coreboot too, and while moving also implement it as functions instead of macros which is more in line with the rest of helper functions in that new file. Signed-off-by: Felix Held Change-Id: I954251ebc82802c77bf897dfa2db54aa10bc5ac4 Reviewed-on: https://review.coreboot.org/c/coreboot/+/83642 Reviewed-by: Angel Pons Reviewed-by: Shuo Liu Reviewed-by: Paul Menzel Tested-by: build bot (Jenkins) --- src/include/device/device.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/include') diff --git a/src/include/device/device.h b/src/include/device/device.h index 1b2e097772..ac8a1171c5 100644 --- a/src/include/device/device.h +++ b/src/include/device/device.h @@ -194,6 +194,8 @@ bool is_pci(const struct device *pci); bool is_enabled_pci(const struct device *pci); bool is_pci_dev_on_bus(const struct device *pci, unsigned int bus); bool is_pci_bridge(const struct device *pci); +bool is_domain0(const struct device *dev); +bool is_dev_on_domain0(const struct device *dev); /* Returns whether there is a hotplug port on the path to the given device. */ bool dev_path_hotplug(const struct device *); -- cgit v1.2.3