Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/sys/compat/linuxkpi/common/include/asm/cpu_device_id.h
283510 views
1
/*
2
* SPDX-License-Identifier: BSD-2-Clause
3
*
4
* Copyright (c) 2026 The FreeBSD Foundation
5
*/
6
7
#ifndef _LINUXKPI_ASM_CPU_DEVICE_ID_H_
8
#define _LINUXKPI_ASM_CPU_DEVICE_ID_H_
9
10
#define VFM_MODEL_BIT 0
11
#define VFM_FAMILY_BIT 8
12
#define VFM_VENDOR_BIT 16
13
#define VFM_RSVD_BIT 24
14
15
#define VFM_MODEL_MASK GENMASK(VFM_FAMILY_BIT - 1, VFM_MODEL_BIT)
16
#define VFM_FAMILY_MASK GENMASK(VFM_VENDOR_BIT - 1, VFM_FAMILY_BIT)
17
#define VFM_VENDOR_MASK GENMASK(VFM_RSVD_BIT - 1, VFM_VENDOR_BIT)
18
19
#define VFM_MODEL(vfm) (((vfm) & VFM_MODEL_MASK) >> VFM_MODEL_BIT)
20
#define VFM_FAMILY(vfm) (((vfm) & VFM_FAMILY_MASK) >> VFM_FAMILY_BIT)
21
#define VFM_VENDOR(vfm) (((vfm) & VFM_VENDOR_MASK) >> VFM_VENDOR_BIT)
22
23
#define VFM_MAKE(_vendor, _family, _model) ( \
24
((_model) << VFM_MODEL_BIT) | \
25
((_family) << VFM_FAMILY_BIT) | \
26
((_vendor) << VFM_VENDOR_BIT) \
27
)
28
29
#include <linux/mod_devicetable.h>
30
#include <asm/intel-family.h>
31
#include <asm/processor.h>
32
33
#endif /* _LINUXKPI_ASM_CPU_DEVICE_ID_H_ */
34
35