Debian Codegraph @

src/soc/intel/pantherlake/p2sb.c

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #include <console/console.h>
4 #include <intelblocks/p2sb.h>
5 #include <types.h>
6
7 void p2sb_soc_get_sb_mask(uint32_t *ep_mask, size_t count)
8 {
9 uint32_t mask;
10
11 if (count != P2SB_EP_MASK_MAX_REG) {
12 printk(BIOS_ERR, "Unable to program EPMASK registers\n");
13 return;
14 }
15
16 /* Remove the host accessing right to PSF register range.
17 * Set p2sb PCI offset EPMASK5 [29, 28, 27, 26] to disable Sideband
18 * access for PCI Root Bridge.
19 */
20 mask = BIT(29) | BIT(28) | BIT(27) | BIT(26);
21
22 ep_mask[P2SB_EP_MASK_5_REG] = mask;
23
24 /*
25 * Set p2sb PCI offset EPMASK7 [31, 30] to disable Sideband
26 * access for Broadcast and Multicast.
27 */
28 mask = BIT(31) | BIT(30);
29
30 ep_mask[P2SB_EP_MASK_7_REG] = mask;
31 }