mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: Add magic value at instance block
This is adding magic value in instance block while initializing instance block for a context. This will be verified by FECS firmware. Bug 3638810 Change-Id: I7d304c1b622b3c9f50a7443e9fadce9bac869258 Signed-off-by: Seeta Rama Raju <srajum@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2786274 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
a8e38dd72d
commit
e0a9553533
@@ -108,6 +108,10 @@ int nvgpu_alloc_inst_block(struct gk20a *g, struct nvgpu_mem *inst_block)
|
||||
return err;
|
||||
}
|
||||
|
||||
if (g->ops.ramin.set_magic_value != NULL) {
|
||||
g->ops.ramin.set_magic_value(g, inst_block);
|
||||
}
|
||||
|
||||
nvgpu_log_fn(g, "done");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2020-2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -30,5 +30,6 @@ struct nvgpu_mem;
|
||||
|
||||
void ga10b_ramin_init_pdb(struct gk20a *g, struct nvgpu_mem *inst_block,
|
||||
u64 pdb_addr, struct nvgpu_mem *pdb_mem);
|
||||
void ga10b_ramin_set_magic_value(struct gk20a *g, struct nvgpu_mem *inst_block);
|
||||
|
||||
#endif /* NVGPU_RAMIN_GA10B_H */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2020-2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -50,3 +50,9 @@ void ga10b_ramin_init_pdb(struct gk20a *g, struct nvgpu_mem *inst_block,
|
||||
nvgpu_mem_wr32(g, inst_block, ram_in_page_dir_base_hi_w(),
|
||||
ram_in_page_dir_base_hi_f(pdb_addr_hi));
|
||||
}
|
||||
|
||||
void ga10b_ramin_set_magic_value(struct gk20a *g, struct nvgpu_mem *inst_block)
|
||||
{
|
||||
nvgpu_mem_wr32(g, inst_block, ram_in_engine_fw_magic_value_w(),
|
||||
ram_in_engine_fw_magic_value_engine_fw_magic_value_v());
|
||||
}
|
||||
|
||||
@@ -1154,6 +1154,7 @@ static const struct gops_ramin ga10b_ops_ramin = {
|
||||
.base_shift = gk20a_ramin_base_shift,
|
||||
.alloc_size = gk20a_ramin_alloc_size,
|
||||
.set_eng_method_buffer = gv11b_ramin_set_eng_method_buffer,
|
||||
.set_magic_value = ga10b_ramin_set_magic_value,
|
||||
};
|
||||
|
||||
static const struct gops_runlist ga10b_ops_runlist = {
|
||||
|
||||
@@ -214,6 +214,8 @@ struct gops_ramin {
|
||||
struct nvgpu_mem *inst_block, u64 va_limit);
|
||||
void (*set_eng_method_buffer)(struct gk20a *g,
|
||||
struct nvgpu_mem *inst_block, u64 gpu_va);
|
||||
void (*set_magic_value)(struct gk20a *g,
|
||||
struct nvgpu_mem *inst_block);
|
||||
|
||||
/** @endcond DOXYGEN_SHOULD_SKIP_THIS */
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019-2021, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2019-2022, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -72,6 +72,8 @@
|
||||
#define ram_in_page_dir_base_lo_w() (128U)
|
||||
#define ram_in_page_dir_base_hi_f(v) ((U32(v) & 0xffffffffU) << 0U)
|
||||
#define ram_in_page_dir_base_hi_w() (129U)
|
||||
#define ram_in_engine_fw_magic_value_w() (131U)
|
||||
#define ram_in_engine_fw_magic_value_engine_fw_magic_value_v() (0xcafeca11U)
|
||||
#define ram_in_engine_cs_s() (1U)
|
||||
#define ram_in_engine_cs_f(v) ((U32(v) & 0x1U) << 3U)
|
||||
#define ram_in_engine_cs_m() (U32(0x1U) << 3U)
|
||||
|
||||
Reference in New Issue
Block a user