blob: b2700d5d4a8d3e613b2220572e8f6ea5bcc0ccf9 [file] [log] [blame]
Tim Chu3ba16212022-12-14 11:27:52 +00001/* SPDX-License-Identifier: GPL-2.0-only */
2
3#include <cpu/x86/msr.h>
4#include <device/pci.h>
5#include <soc/msr.h>
6#include <soc/pci_devs.h>
7
8pci_devfn_t soc_get_ubox_pmon_dev(void)
9{
10 msr_t msr = rdmsr(MSR_CPU_BUSNO);
11 u16 bus;
12
13 if (msr.hi & BUSNO_VALID)
14 bus = msr.lo & 0xff;
15 else
16 return 0;
17
18 return PCI_DEV(bus, UBOX_DECS_DEV, UBOX_URACU_FUNC);
19}