Commit ab4bec16 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/secboot/gp10[2467]: support newer FW to fix SEC2 failures on some boards

Some newer boards with these chipsets aren't compatible with the prior
version of the SEC2 FW, and fail to load as a result.

This newer FW is actually the one we already use on >=GP108.

Unfortunately, there are interface differences in GP108's FW, making it
impossible to simply move files around in linux-firmware to solve this.

We need to be able to keep compatibility with all linux-firmware/kernel
combinations, which means supporting both firmwares.
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 9352ce37
...@@ -188,13 +188,13 @@ acr_r361_generate_sec2_bl_desc(const struct nvkm_acr *acr, ...@@ -188,13 +188,13 @@ acr_r361_generate_sec2_bl_desc(const struct nvkm_acr *acr,
desc->argv = 0x01000000; desc->argv = 0x01000000;
} }
static const struct acr_r352_lsf_func const struct acr_r352_lsf_func
acr_r361_ls_sec2_func_0 = { acr_r361_ls_sec2_func_0 = {
.generate_bl_desc = acr_r361_generate_sec2_bl_desc, .generate_bl_desc = acr_r361_generate_sec2_bl_desc,
.bl_desc_size = sizeof(struct acr_r361_pmu_bl_desc), .bl_desc_size = sizeof(struct acr_r361_pmu_bl_desc),
}; };
const struct acr_r352_ls_func static const struct acr_r352_ls_func
acr_r361_ls_sec2_func = { acr_r361_ls_sec2_func = {
.load = acr_ls_ucode_load_sec2, .load = acr_ls_ucode_load_sec2,
.post_run = acr_ls_sec2_post_run, .post_run = acr_ls_sec2_post_run,
......
...@@ -67,6 +67,5 @@ void acr_r361_generate_hs_bl_desc(const struct hsf_load_header *, void *, u64); ...@@ -67,6 +67,5 @@ void acr_r361_generate_hs_bl_desc(const struct hsf_load_header *, void *, u64);
extern const struct acr_r352_ls_func acr_r361_ls_fecs_func; extern const struct acr_r352_ls_func acr_r361_ls_fecs_func;
extern const struct acr_r352_ls_func acr_r361_ls_gpccs_func; extern const struct acr_r352_ls_func acr_r361_ls_gpccs_func;
extern const struct acr_r352_ls_func acr_r361_ls_pmu_func; extern const struct acr_r352_ls_func acr_r361_ls_pmu_func;
extern const struct acr_r352_ls_func acr_r361_ls_sec2_func; extern const struct acr_r352_lsf_func acr_r361_ls_sec2_func_0;
#endif #endif
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "acr_r367.h" #include "acr_r367.h"
#include "acr_r361.h" #include "acr_r361.h"
#include "acr_r370.h"
#include <core/gpuobj.h> #include <core/gpuobj.h>
...@@ -381,6 +382,17 @@ acr_r367_fixup_hs_desc(struct acr_r352 *acr, struct nvkm_secboot *sb, ...@@ -381,6 +382,17 @@ acr_r367_fixup_hs_desc(struct acr_r352 *acr, struct nvkm_secboot *sb,
} }
} }
static const struct acr_r352_ls_func
acr_r367_ls_sec2_func = {
.load = acr_ls_ucode_load_sec2,
.post_run = acr_ls_sec2_post_run,
.version_max = 1,
.version = {
&acr_r361_ls_sec2_func_0,
&acr_r370_ls_sec2_func_0,
}
};
const struct acr_r352_func const struct acr_r352_func
acr_r367_func = { acr_r367_func = {
.fixup_hs_desc = acr_r367_fixup_hs_desc, .fixup_hs_desc = acr_r367_fixup_hs_desc,
...@@ -394,7 +406,7 @@ acr_r367_func = { ...@@ -394,7 +406,7 @@ acr_r367_func = {
[NVKM_SECBOOT_FALCON_FECS] = &acr_r361_ls_fecs_func, [NVKM_SECBOOT_FALCON_FECS] = &acr_r361_ls_fecs_func,
[NVKM_SECBOOT_FALCON_GPCCS] = &acr_r361_ls_gpccs_func, [NVKM_SECBOOT_FALCON_GPCCS] = &acr_r361_ls_gpccs_func,
[NVKM_SECBOOT_FALCON_PMU] = &acr_r361_ls_pmu_func, [NVKM_SECBOOT_FALCON_PMU] = &acr_r361_ls_pmu_func,
[NVKM_SECBOOT_FALCON_SEC2] = &acr_r361_ls_sec2_func, [NVKM_SECBOOT_FALCON_SEC2] = &acr_r367_ls_sec2_func,
}, },
}; };
......
...@@ -111,7 +111,7 @@ acr_r370_generate_sec2_bl_desc(const struct nvkm_acr *acr, ...@@ -111,7 +111,7 @@ acr_r370_generate_sec2_bl_desc(const struct nvkm_acr *acr,
desc->argv = 0x01000000; desc->argv = 0x01000000;
} }
static const struct acr_r352_lsf_func const struct acr_r352_lsf_func
acr_r370_ls_sec2_func_0 = { acr_r370_ls_sec2_func_0 = {
.generate_bl_desc = acr_r370_generate_sec2_bl_desc, .generate_bl_desc = acr_r370_generate_sec2_bl_desc,
.bl_desc_size = sizeof(struct acr_r370_flcn_bl_desc), .bl_desc_size = sizeof(struct acr_r370_flcn_bl_desc),
......
...@@ -46,4 +46,5 @@ struct acr_r370_flcn_bl_desc { ...@@ -46,4 +46,5 @@ struct acr_r370_flcn_bl_desc {
void acr_r370_generate_hs_bl_desc(const struct hsf_load_header *, void *, u64); void acr_r370_generate_hs_bl_desc(const struct hsf_load_header *, void *, u64);
extern const struct acr_r352_ls_func acr_r370_ls_fecs_func; extern const struct acr_r352_ls_func acr_r370_ls_fecs_func;
extern const struct acr_r352_ls_func acr_r370_ls_gpccs_func; extern const struct acr_r352_ls_func acr_r370_ls_gpccs_func;
extern const struct acr_r352_lsf_func acr_r370_ls_sec2_func_0;
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment