coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
p2sb.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <console/console.h>
4 #include <intelblocks/p2sb.h>
5 
6 void p2sb_soc_get_sb_mask(uint32_t *ep_mask, size_t count)
7 {
9 
10  if (count != P2SB_EP_MASK_MAX_REG) {
11  printk(BIOS_ERR, "Unable to program EPMASK registers\n");
12  return;
13  }
14 
15  /*
16  * Set p2sb PCI offset EPMASK5 [29, 28, 27, 26] to disable Sideband
17  * access for PCI Root Bridge.
18  * Set p2sb PCI offset EPMASK5 [17, 16,10, 1] to disable Sideband
19  * access for MIPI controller.
20  */
21  mask = (1 << 29) | (1 << 28) | (1 << 27) | (1 << 26) | (1 << 17) |
22  (1 << 16) | (1 << 10) | (1 << 1);
23 
24  ep_mask[P2SB_EP_MASK_5_REG] = mask;
25 
26  /*
27  * Set p2sb PCI offset EPMASK7 [6, 5] to disable Sideband
28  * access for XHCI controller.
29  */
30  mask = (1 << 6) | (1 << 5);
31 
32  ep_mask[P2SB_EP_MASK_7_REG] = mask;
33 }
void p2sb_soc_get_sb_mask(uint32_t *ep_mask, size_t count)
Definition: p2sb.c:12
@ P2SB_EP_MASK_7_REG
Definition: p2sb.h:22
@ P2SB_EP_MASK_5_REG
Definition: p2sb.h:20
@ P2SB_EP_MASK_MAX_REG
Definition: p2sb.h:23
#define printk(level,...)
Definition: stdlib.h:16
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
Definition: loglevel.h:72
static const int mask[4]
Definition: gpio.c:308
unsigned int uint32_t
Definition: stdint.h:14
#define count