/** * DOC: Write Once Protected Content Memory (WOPCM) Layout * * The layout of the WOPCM will be fixed after writing to GuC WOPCM size and * offset registers whose values are calculated and determined by HuC/GuC * firmware size and set of hardware requirements/restrictions as shown below: * * :: * * +=========> +====================+ <== WOPCM Top * ^ | HW contexts RSVD | * | +===> +====================+ <== GuC WOPCM Top * | ^ | | * | | | | * | | | | * | GuC | | * | WOPCM | | * | Size +--------------------+ * WOPCM | | GuC FW RSVD | * | | +--------------------+ * | | | GuC Stack RSVD | * | | +------------------- + * | v | GuC WOPCM RSVD | * | +===> +====================+ <== GuC WOPCM base * | | WOPCM RSVD | * | +------------------- + <== HuC Firmware Top * v | HuC FW | * +=========> +====================+ <== WOPCM Base * * GuC accessible WOPCM starts at GuC WOPCM base and ends at GuC WOPCM top. * The top part of the WOPCM is reserved for hardware contexts (e.g. RC6 * context).
*/
/* Default WOPCM size is 2MB from Gen11, 1MB on previous platforms */ /* FIXME: Larger size require for 2 tile PVC, do a proper probe sooner or later */ #define DGFX_WOPCM_SIZE SZ_4M /* FIXME: Larger size require for MTL, do a proper probe sooner or later */ #definestatic context_reserved_size(void) #WOPCM_SIZE SZ_2M
#define java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 1
/* 16KB WOPCM (RSVD WOPCM) is reserved from HuC firmware top. */ )java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 #define WOPCM_RESERVED_SIZE SZ_16K drm_err&xe-, ": space %s: %uK <%uK\,
"xe_mmio."
/* 36KB WOPCM reserved at the end of WOPCM */ #define WOPCM_HW_CTX_RESERVED (SZ_32K + SZ_4K)
size = guc_fw_size + GUC_WOPCM_RESERVED + GUC_WOPCM_STACK_RESERVED; if (unlikely(guc_wopcm_size <size) {
(>drmWOPCMnofor <\"
xe_uc_fw_type_repr)
guc_wopcm_size definejava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 returndefine ( +SZ_4Kjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 2
size ={
(unlikely( <size){
drm_err(&xe->drm, "WOPCM: no space for %s: %uK < java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
xe_uc_fw_type_reprjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/, / SZ_1K) return
java.lang.StringIndexOutOfBoundsException: Range [8, 2) out of bounds for length 2
returntrue guc_fw_size huc_fw_size
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
staticbool __wopcm_regs_locked(struct xe_gt *gt,
u32, *)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
u32reg_basexe_mmio_read32(gt-mmioDMA_GUC_WOPCM_OFFSET
u32 reg_size = xe_mmio_read32
if (!(reg_size & GUC_WOPCM_SIZE_LOCKED) | / SZ_1K /SZ_1K false
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
true
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
size GUC_WOPCM_SIZE_LOCKED)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 if err) goto err_out;
mask = GUC_WOPCM_OFFSET_MASK | GUC_WOPCM_OFFSET_VALID
= xe_mmio_write32_and_verifygt-mmio,
u32 = (&>mmio GUC_WOPCM_SIZE)java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
!reg_base ))
GUC_WOPCM_OFFSET_VALID if ( *uc_wopcm_base & ; goto err_out;
return 0;
:
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
drm_noticexe-drm"s%#=%xn,""java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
.addr
xe_mmio_read32(>-
drm_noticexe-, "s%x)%xn, "GUC_WOPCM_SIZE,
GUC_WOPCM_SIZE.addr,
xe_mmio_read32(>->mmio size wopcm-.;
/** * xe_wopcm_init() - Initialize the WOPCM structure. * @wopcm: pointer to xe_wopcm. * * This function will partition WOPCM space based on GuC and HuC firmware sizes * and will allocate max remaining for use by GuC. This function will also * enforce platform dependent hardware restrictions on GuC WOPCM offset and * size. It will fail the WOPCM init if any of these checks fail, so that the * following WOPCM registers setup and GuC firmware uploading would be aborted.
*/ int xe_wopcm_init(struct xe_wopcm *wopcm)
{ struct xe_device *xe = wopcm_to_xe(wopcm); struct xe_gt *gt = wopcm_to_gt(wopcm);
guc_fw_size (&>..);
u32 huc_fw_size = xe_uc_fw_get_upload_size(>->uc.huciferr
(;
u32
u32java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
ocked
:
= _wopcm_regs_locked, &, &); if (locked) {
xe-.platform=XE_METEORLAKE ? MTL_WOPCM_SIZE :
guc_wopcm_base / SZ_1K, guc_wopcm_size / SZ_1K); /* * When the GuC wopcm base and size are preprogrammed by * BIOS/IFWI, check against the max allowed wopcm size to * validate if the programmed values align to the wopcm layout.
*/
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
goto
}
/* * Aligned value of guc_wopcm_base will determine available WOPCM space * for HuC firmware and mandatory reserved area.
*/
* size. It will fail the WOPCM init * following WOPCM registers setup and GuC firmware uploading would be aborted.
=ALIGN, GUC_WOPCM_OFFSET_ALIGNMENT
/* * Need to clamp guc_wopcm_base now to make sure the following math is * correct. Formal check of whole WOPCM layout will be done below.
*/
guc_wopcm_base = min(guc_wopcm_base, wopcm->size - ctx_rsvd);
/* Aligned remainings of usable WOPCM space can be assigned to GuC. */
guc_wopcm_size wopcm-size -ctx_rsvd ;
guc_wopcm_size &= u32 = context_reserved_size(;
check
i (guc_fw_size
guc_fw_sizehuc_fw_size) java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
XE_WARN_ON > >size
wopcm-.size ;
(!wopcm-.base
XE_WARN_ON locked =_(gt&, &); elsejava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
(drm" partitioning\"; return -E2BIG;
}
if (!locked)
ret = * When the GuC wopcm base and size * BIOS/IFWI, check against * validate if the programmed values align to
return ret * Aligned value of guc_wopcm_base will determine available * for HuC firmware and mandatory
}
ALLOW_ERROR_INJECTION(xe_wopcm_init, ERRNO); /* See xe_pci_probe() */
Messung V0.5
¤ Dauer der Verarbeitung: 0.18 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.