515.43.04

This commit is contained in:
Andy Ritger
2022-05-09 13:18:59 -07:00
commit 1739a20efc
2519 changed files with 1060036 additions and 0 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,120 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2018-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#ifndef _HALDEFS_SOE_NVSWITCH_H_
#define _HALDEFS_SOE_NVSWITCH_H_
#include "nvstatus.h"
#include "flcnifcmn.h"
#include "flcn/haldefs_flcnable_nvswitch.h"
struct SOE;
typedef struct {
// needs to be the first thing in this struct so that a soe_hal* can be
// re-interpreted as a flcnable_hal* and vise-versa.
flcnable_hal base;
//add any hal functions specific to SOE here
NV_STATUS (*processMessages)(
struct nvswitch_device *device,
struct SOE *pSoe);
NV_STATUS (*waitForInitAck)(
struct nvswitch_device *device,
struct SOE *pSoe);
NvU32 (*service)(
struct nvswitch_device *device,
struct SOE *pSoe);
void (*serviceHalt)(
struct nvswitch_device *device,
struct SOE *pSoe);
void (*ememTransfer)(
struct nvswitch_device *device,
struct SOE *pSoe,
NvU32 dmemAddr,
NvU8 *pBuf,
NvU32 sizeBytes,
NvU8 port,
NvBool bCopyFrom);
NvU32 (*getEmemSize)(
struct nvswitch_device *device,
struct SOE *pSoe);
NvU32 (*getEmemStartOffset)(
struct nvswitch_device *device,
struct SOE *pSoe);
NV_STATUS (*ememPortToRegAddr)(
struct nvswitch_device *device,
struct SOE *pSoe,
NvU32 port,
NvU32 *pEmemCAddr,
NvU32 *pEmemDAddr);
void (*serviceExterr)(
struct nvswitch_device *device,
struct SOE *pSoe);
NV_STATUS (*getExtErrRegAddrs)(
struct nvswitch_device *device,
struct SOE *pSoe,
NvU32 *pExtErrAddr,
NvU32 *pExtErrStat);
NvU32 (*ememPortSizeGet)(
struct nvswitch_device *device,
struct SOE *pSoe);
NvBool (*isCpuHalted)(
struct nvswitch_device *device,
struct SOE *pSoe);
NvlStatus (*testDma)(
struct nvswitch_device *device);
NvlStatus (*setPexEOM)(
struct nvswitch_device *device,
NvU8 mode,
NvU8 nblks,
NvU8 nerrs,
NvU8 berEyeSel);
NvlStatus (*getPexEomStatus)(
struct nvswitch_device *device,
NvU8 mode,
NvU8 nblks,
NvU8 nerrs,
NvU8 berEyeSel,
NvU32 laneMask,
NvU16 *pEomStatus);
NvlStatus (*getUphyDlnCfgSpace)(
struct nvswitch_device *device,
NvU32 regAddress,
NvU32 laneSelectMask,
NvU16 *pRegValue);
NvlStatus (*forceThermalSlowdown)(
struct nvswitch_device *device,
NvBool slowdown,
NvU32 periodUs);
NvlStatus (*setPcieLinkSpeed)(
struct nvswitch_device *device,
NvU32 linkSpeed);
} soe_hal;
// HAL functions
void soeSetupHal_LR10(struct SOE *pSoe);
#endif //_HALDEFS_SOE_NVSWITCH_H_

View File

@@ -0,0 +1,61 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2018-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#ifndef _SOE_NVSWITCH_H_
#define _SOE_NVSWITCH_H_
#include "nvlink_errors.h"
#include "nvtypes.h"
#include "nvstatus.h"
typedef struct SOE SOE, *PSOE;
struct FLCNABLE;
struct nvswitch_device;
SOE *soeAllocNew(void);
NvlStatus soeInit(struct nvswitch_device *device, PSOE pSoe, NvU32 pci_device_id);
void soeDestroy(struct nvswitch_device *device, PSOE pSoe);
//HAL functions
NV_STATUS soeProcessMessages (struct nvswitch_device *device, PSOE pSoe);
NV_STATUS soeWaitForInitAck (struct nvswitch_device *device, PSOE pSoe);
NvU32 soeService_HAL (struct nvswitch_device *device, PSOE pSoe);
void soeServiceHalt_HAL (struct nvswitch_device *device, PSOE pSoe);
void soeEmemTransfer_HAL (struct nvswitch_device *device, PSOE pSoe, NvU32 dmemAddr, NvU8 *pBuf, NvU32 sizeBytes, NvU8 port, NvBool bCopyFrom);
NvU32 soeGetEmemSize_HAL (struct nvswitch_device *device, PSOE pSoe);
NvU32 soeGetEmemStartOffset_HAL (struct nvswitch_device *device, PSOE pSoe);
NV_STATUS soeEmemPortToRegAddr_HAL (struct nvswitch_device *device, PSOE pSoe, NvU32 port, NvU32 *pEmemCAddr, NvU32 *pEmemDAddr);
void soeServiceExterr_HAL (struct nvswitch_device *device, PSOE pSoe);
NV_STATUS soeGetExtErrRegAddrs_HAL (struct nvswitch_device *device, PSOE pSoe, NvU32 *pExtErrAddr, NvU32 *pExtErrStat);
NvU32 soeEmemPortSizeGet_HAL (struct nvswitch_device *device, PSOE pSoe);
NvBool soeIsCpuHalted_HAL (struct nvswitch_device *device, PSOE pSoe);
NvlStatus soeTestDma_HAL (struct nvswitch_device *device, PSOE pSoe);
NvlStatus soeSetPexEOM_HAL (struct nvswitch_device *device, NvU8 mode, NvU8 nblks, NvU8 nerrs, NvU8 berEyeSel);
NvlStatus soeGetPexEomStatus_HAL (struct nvswitch_device *device, NvU8 mode, NvU8 nblks, NvU8 nerrs, NvU8 berEyeSel, NvU32 laneMask, NvU16 *pEomStatus);
NvlStatus soeGetUphyDlnCfgSpace_HAL (struct nvswitch_device *device, NvU32 regAddress, NvU32 laneSelectMask, NvU16 *pRegValue);
NvlStatus soeForceThermalSlowdown_HAL (struct nvswitch_device *device, NvBool slowdown, NvU32 periodUs);
NvlStatus soeSetPcieLinkSpeed_HAL (struct nvswitch_device *device, NvU32 linkSpeed);
#endif //_SOE_NVSWITCH_H_

View File

@@ -0,0 +1,60 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2018-2020 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#ifndef _SOE_PRIV_NVSWITCH_H_
#define _SOE_PRIV_NVSWITCH_H_
#include "soe/haldefs_soe_nvswitch.h"
#include "soe/soeifcmn.h"
#include "flcn/flcnqueue_nvswitch.h"
#include "flcn/flcnable_nvswitch.h"
#define SOE_DMEM_ALIGNMENT (4)
struct SOE
{
// needs to be the first thing in this struct so that a PSOE can be
// re-interpreted as a PFLCNABLE and vise-versa. While it is possible
// to remove this restriction by using (&pSoe->parent) instead of a cast,
// 1) the reverse (getting a PSOE from a PFLCNABLE) would be difficult and
// spooky 2) that would force anybody wanting to do the conversion
// to know the layout of an SOE object (not a big deal, but still annoying)
union {
// pointer to our function table - should always be the first thing in any object (including parent)
soe_hal *pHal;
FLCNABLE parent;
} base;
// Other member variables specific to SOE go here
/*!
* Structure tracking all information for active and inactive SEC2 sequences.
*/
FLCN_QMGR_SEQ_INFO seqInfo[RM_SOE_MAX_NUM_SEQUENCES];
/*! The event descriptor for the Thermal event handler */
NvU32 thermEvtDesc;
};
#endif //_SOE_PRIV_NVSWITCH_H_