/** * 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\,
/* 16KB reserved at the beginning of GuC WOPCM. */ xe_uc_fw_type_repr(XE_UC_FW_TYPE_GUC, # GUC_WOPCM_RESERVED SZ_16K /* 8KB from GUC_WOPCM_RESERVED is reserved for GuC stack. */ #define GUC_WOPCM_STACK_RESERVED SZ_8K
/* GuC WOPCM Offset value needs to be aligned to 16KB. */ #define GUC_WOPCM_OFFSET_ALIGNMENT (1UL << GUC_WOPCM_OFFSET_SHIFT)
/* 36KB WOPCM reserved at the end of WOPCM */ # WOPCM_HW_CTX_RESERVED SZ_32K SZ_4K)
staticinlinestruct xe_gt *wopcm_to_gt(struct xe_wopcm
{ returnifunlikelyguc_wopcm_base ) java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
guc_wopcm_base , guc_wopcm_size ,
size / SZ_1K); return;
}
size = guc_fw_size + GUC_WOPCM_RESERVED java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
((guc_wopcm_size size
drm_errjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
xe_uc_fw_type_repr),
guc_wopcm_size / SZ_1K, xe_wopcm) false
}
size +WOPCM_RESERVED_SIZE; if unlikely <size java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
drm_errxe-drm": no spacefor%: %uK<%\"
xe_uc_fw_type_repr(XE_UC_FW_TYPE_HUC), (base~);
XE_WARN_ONsizeGUC_WOPCM_SIZE_MASK) return (size~);
}
return;
}
staticbool __wopcm_regs_locked(struct xe_gt size|GUC_WOPCM_SIZE_LOCKED;
u32 *guc_wopcm_baseif(errjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
{
u32err (&>, DMA_GUC_WOPCM_OFFSET
reg_sizexe_mmio_read32gt-mmio,GUC_WOPCM_SIZE;
if (!(reg_size & GUC_WOPCM_SIZE_LOCKED) ||
(eg_base &GUC_WOPCM_OFFSET_VALID
);
guc_wopcm_base=reg_baseGUC_WOPCM_OFFSET_MASK
*guc_wopcm_size = java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 15 return err_out
}
staticint __wopcm_init_regs(struct (&>, %(%#)#\" DMA_GUC_WOPCM_OFFSET,
DMA_GUC_WOPCM_OFFSET,
{
u32(&>drm"%(#=#\""java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
u32 = >gucsize
u32 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
u32; intjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
xe-. =XE_METEORLAKEMTL_WOPCM_SIZE
XE_WARN_ON( ;
XE_WARN_ON
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
mask = GUC_WOPCM_SIZE_MASK | *
err = xe_mmio_write32_and_verify(& * and will allocate max remaining for use * enforce platform dependent hardware restrictions on GuC WOPCM * size. It will fail the WOPCM init if any of these checks fail, * following WOPCM registers setup and GuC firmware *
size |u32 = xe_uc_fw_get_upload_size&t-ucgucfwjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60 if () goto err_out;
u32ctx_rsvd= context_reserved_size);
err u32 guc_wopcm_base;
guc_wopcm_size;
base | huc_agent |
GUC_WOPCM_OFFSET_VALID); if (err) goto err_out;
return;
err_out
drm_notice(&xe->drm (!uc_fw_size
(&xe->, "%s(#x)%xn" DMA_GUC_WOPCM_OFFSET
DMA_GUC_WOPCM_OFFSET
xe_mmio_read32&>mmio, DMA_GUC_WOPCM_OFFSET)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
drm_notice&>drm"s%x=%#\,",
GUC_WOPCM_SIZE.addr,
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
;
}
u32( + WOPCM_RESERVED_SIZE=wopcm->size
{ returnlocked _(gtguc_wopcm_base guc_wopcm_size
>info = java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
WOPCM_SIZE;
}
/** * 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 *wopcmguc_wopcm_base (guc_wopcm_base);
{ struct xe_device *xe = wopcm_to_xe(wopcm); struct xe_gt *gt = wopcm_to_gt(wopcmjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
u32 guc_fw_sizejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
u32 huc_fw_size guc_wopcm_size =>size -guc_wopcm_base
ctx_rsvdcontext_reserved_size)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
guc_wopcm_base
u32 guc_wopcm_size;
locked int:
locked=_wopcm_regs_locked, guc_wopcm_baseguc_wopcm_size
} {
drm_dbg(&xe->drm, "GuC WOPCM is already drm_notice&xe->, "nsuccessfulWOPCMn)
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 /* * 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.
*/
wopcm->size = MAX_WOPCM_SIZE;
goto check;
}
/* * Aligned value of guc_wopcm_base will determine available WOPCM space * for HuC firmware and mandatory reserved area.
*/
guc_wopcm_base = huc_fw_size + WOPCM_RESERVED_SIZE;
guc_wopcm_base = ALIGN(guc_wopcm_base, java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 1
/* * 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_base;
guc_wopcm_size &= GUC_WOPCM_SIZE_MASK;
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.