2 * SPDX-License-Identifier: MIT
4 * Copyright © 2017-2018 Intel Corporation
7 #ifndef _INTEL_WOPCM_H_
8 #define _INTEL_WOPCM_H_
10 #include <linux/types.h>
13 * struct intel_wopcm - Overall WOPCM info and WOPCM regions.
14 * @size: Size of overall WOPCM.
15 * @guc: GuC WOPCM Region info.
16 * @guc.base: GuC WOPCM base which is offset from WOPCM base.
17 * @guc.size: Size of the GuC WOPCM region.
28 * intel_wopcm_guc_base()
29 * @wopcm: intel_wopcm structure
31 * Returns the base of the WOPCM shadowed region.
34 * 0 if GuC is not present or not in use.
35 * Otherwise, the GuC WOPCM base.
37 static inline u32
intel_wopcm_guc_base(struct intel_wopcm
*wopcm
)
39 return wopcm
->guc
.base
;
43 * intel_wopcm_guc_size()
44 * @wopcm: intel_wopcm structure
46 * Returns size of the WOPCM shadowed region.
49 * 0 if GuC is not present or not in use.
50 * Otherwise, the GuC WOPCM size.
52 static inline u32
intel_wopcm_guc_size(struct intel_wopcm
*wopcm
)
54 return wopcm
->guc
.size
;
57 void intel_wopcm_init_early(struct intel_wopcm
*wopcm
);
58 void intel_wopcm_init(struct intel_wopcm
*wopcm
);