diff options
author | Andrey Petrov <anpetrov@fb.com> | 2019-09-10 20:32:56 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-09-24 10:29:58 +0000 |
commit | 2fa4938796bb000a273f6935db139de64e200712 (patch) | |
tree | f4696a5adf1bd4701d4c3e9dab5c88b32b1a3f75 /src/soc/intel/fsp_broadwell_de/ubox.c | |
parent | 8dc95ddbd4a9354eec124393f996a36c3a7329e2 (diff) |
soc/fsp_broadwell_de: Add devhide functionality
Add function to hide IIO PCIe root ports.
TEST=On OCP Monolake, hide built-in NIC PCIe root port [0.2.2 and 0.2.3]
and make sure OS does not detect built-in NIC.
Change-Id: I2fcac5b7d9a7a52a2801c010bfccf247f2a44581
Signed-off-by: Andrey Petrov <anpetrov@fb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35321
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Diffstat (limited to 'src/soc/intel/fsp_broadwell_de/ubox.c')
-rw-r--r-- | src/soc/intel/fsp_broadwell_de/ubox.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/soc/intel/fsp_broadwell_de/ubox.c b/src/soc/intel/fsp_broadwell_de/ubox.c new file mode 100644 index 0000000000..d7352ad667 --- /dev/null +++ b/src/soc/intel/fsp_broadwell_de/ubox.c @@ -0,0 +1,27 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2019 Facebook Inc. + * + * 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. + */ + +#define __SIMPLE_DEVICE__ + +#include <stdint.h> +#include <soc/ubox.h> + +void iio_hide(const uint8_t devno, const uint8_t funcno) +{ + pci_devfn_t ubox_dev; + + ubox_dev = PCI_DEV(get_busno1(), UBOX_DEV, UBOX_FUNC); + pci_or_config32(ubox_dev, UBOX_DEVHIDE0 + funcno * 4, 1 << devno); +} |