| Commit message (Collapse) | Author | Age | Files | Lines |
|\ \ \
| | | |
| | | |
| | | | |
'staging/secure_boot' into staging/work
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
This reverts commit efeb5c37b95cb90507de2bcbe72f7c999dcad8d2.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
Unneeded? Seems to work fine without this...
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
There are unused for now, but for the sake of completeness...
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Otherwise ACR will complain when copying. Shouldn't that be fixed in
ACR?
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
Makes code easier to read
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Enable secure boot of FECS for GM20B.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Trigger the loading of FECS/GPCCS using secure boot if required, and
start managed falcons using the CPUCTL_ALIAS register since CPUCTL is
protected in that case.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
On GM20x and later GPUs, firmware for some essential falcons (notably
FECS) must be authenticated by a NVIDIA-produced signature and loaded
by a high-secure falcon in order to access certain registers, in a
process known as Secure Boot.
Secure Boot requires the building of a binary blob containing the
firmwares and signatures of the falcons to be loaded. This blob is then
given to a high-secure falcon running a signed loader firmware that
copies the blob into a write-protected region, checks that the
signatures are valid, and finally loads the verified firmware into the
managed falcons and switches them to a priviledged mode.
This patch adds code that performs this process using PMU as the
high-secure falcon, and wires it into the device core.
Currently, only the secure loading of the FECS firmware is handled, but
support for other falcons (notably GPCCS and PMU) is upcoming. The
reason for limiting to FECS is that GR must initiate the loading of
FECS at init time, which, being managed by secure boot, will trigger the
loading of all other managed firmwares. A solution to this needs to be
discussed.
This code is tested on Tegra/GM20B and some minor work is required for
dGPU support, but the fundations are here for general support of Secure
Boot.
This work is based on Deepak Goyal's initial port of Secure Boot to
Nouveau.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Add a new NOUVEAU_GEM_PUSHBUF_2 ioctl that accepts and emits a sync
fence fd from/to user space if the user space requests it by passing
corresponding flags.
The new ioctl is only supported on relatively new chips, and it does
not support relocations or suffix0/suffix1.
Signed-off-by: Lauri Peltonen <lpeltonen@nvidia.com>
[acourbot@nvidia.com: carry upstream, fix style]
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Split this function to provide a version allowing to directly specify a
PB entry in its hardware format.
Signed-off-by: Lauri Peltonen <lpeltonen@nvidia.com>
[acourbot@nvidia.com: split from longer patch]
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Add nouveau_fence_install, which installs a drm fence as a file
descriptor that can be returned to user space.
Add nouveau_fence_sync_fd, which pushes semaphore wait commands for
each Nouveau fence contained within the sync fd. If the sync fd
contains non-Nouveau fences, those are waited on the CPU.
Add missing fence_value_str and timeline_value_str callbacks to
nouveau fence_ops.
Signed-off-by: Lauri Peltonen <lpeltonen@nvidia.com>
[acourbot@nvidia.com: carry patch upstream]
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Split nouveau_fence_sync to two functions:
* nouveau_fence_sync, which only adds a fence wait to the channel
command stream, and
* nouveau_bo_sync, which gets the fences from the reservation object
and passes them to nouveau_fence_sync.
This factorizes the code in the new nouveau_fence_sync() which was
present twice otherwise.
Signed-off-by: Lauri Peltonen <lpeltonen@nvidia.com>
[acourbot@nvidia.com: factorize code some more, fix style]
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add new NOUVEAU_GEM_SET_TILING ioctl to set correct tiling
mode for imported dma-bufs. This ioctl is staging for now
and enabled with the "staging_tiling" module option.
Signed-off-by: Ari Hirvonen <ahirvonen@nvidia.com>
[acourbot@nvidia.com: carry upstream, many fixes]
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Need to factorize all the code in common with GK20A
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The CVB calculation and voltage setting functions can be reused for the
future chips. So move the declaration to gk20a.h.
Signed-off-by: Vince Hsu <vinceh@nvidia.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We need the exact voltage value to calculate the PLL coefficients for
GM20B.
Signed-off-by: Vince Hsu <vinceh@nvidia.com>
|
| | | |
|
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The status bit used in gf100_gr_wait_idle only exists starting gk104.
As the function is currently used in gk20a and later, rename the function
to use gk104 prefix to reflex correct supported chip version.
Signed-off-by: Xia Yang <xiay@nvidia.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix the channel id bit mask in FIFO schedule timeout error handling.
FIFO_ENGINE_STATUS_NEXT_ID is bit 27:16 thus 0x0fff0000.
FIFO_ENGINE_STATUS_ID is bit 11:0 thus 0x00000fff.
Signed-off-by: Xia Yang <xiay@nvidia.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
|
| |
| |
| |
| | |
See https://chromium-review.googlesource.com/#/c/305610/3
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When using the DMA-API for instmem, we may obtain a write-combined
mapping. For such cases, add a write barrier in
gk20a_instobj_release_dma() to make sure that all writes have reached
memory at this time.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
GM20B requires a channel kick to be performed during gpfifo cleanup, or
the FIFO will attempt to fetch memory from the previous context as a
channel is recycled. A previous commit attempted to do this for all
Kepler GPUs, but due to bug reports that pinned it down it has been
reverted. The present commit limits its scope to GM20B only.
The only effective change of this patch is to add a call to
gk104_fifo_gpfifo_kick() in gpfifo_fini for GM20B, but doing so requires
to export quite a few extra functions, hence its non-trivial length.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
|
| | |
|
|/ |
|