520.61.05

This commit is contained in:
Andy Ritger
2022-10-10 14:59:24 -07:00
parent fe0728787f
commit 90eb10774f
758 changed files with 88383 additions and 26493 deletions

View File

@@ -389,6 +389,9 @@ struct nvswitch_device
// List of client events
NVListRec client_events_list;
// To be removed once newer vbios is on TOT.
NvBool bIsNvlinkVbiosTableVersion2;
};
#define NVSWITCH_IS_DEVICE_VALID(device) \
@@ -485,6 +488,7 @@ typedef struct NVSWITCH_TIMEOUT
#define NVSWITCH_INTERVAL_1MSEC_IN_NS 1000000LL
#define NVSWITCH_INTERVAL_5MSEC_IN_NS 5000000LL
#define NVSWITCH_INTERVAL_1SEC_IN_NS 1000000000LL
#define NVSWITCH_INTERVAL_4SEC_IN_NS 4000000000LL
#define NVSWITCH_HEARTBEAT_INTERVAL_NS NVSWITCH_INTERVAL_1SEC_IN_NS
@@ -505,6 +509,7 @@ do \
#define NVSWITCH_SET_CAP(tbl,cap,field) ((tbl[((1?cap##field)>=cap##_TBL_SIZE) ? 0/0 : (1?cap##field)]) |= (0?cap##field))
NvBool nvswitch_is_lr10_device_id(NvU32 device_id);
NvBool nvswitch_is_ls10_device_id(NvU32 device_id);
NvU32 nvswitch_reg_read_32(nvswitch_device *device, NvU32 offset);
void nvswitch_reg_write_32(nvswitch_device *device, NvU32 offset, NvU32 data);
@@ -529,6 +534,10 @@ void nvswitch_setup_link_loopback_mode(nvswitch_device *device, NvU32 linkN
void nvswitch_reset_persistent_link_hw_state(nvswitch_device *device, NvU32 linkNumber);
void nvswitch_store_topology_information(nvswitch_device *device, nvlink_link *link);
NvlStatus nvswitch_launch_ALI(nvswitch_device *device);
NvlStatus nvswitch_launch_ALI_link_training(nvswitch_device *device, nvlink_link *link, NvBool bSync);
NvlStatus nvswitch_inband_read_data(nvswitch_device *device, NvU8 *dest, NvU32 linkId, NvU32 *dataSize);
void nvswitch_filter_messages(nvswitch_device *device, NvU32 linkId);
NvlStatus nvswitch_set_training_mode(nvswitch_device *device);
NvBool nvswitch_is_link_in_reset(nvswitch_device *device, nvlink_link *link);
void nvswitch_apply_recal_settings(nvswitch_device *device, nvlink_link *link);

View File

@@ -61,9 +61,27 @@ typedef struct
NvU32 data[4]; // record of interrupt specific data
} NVSWITCH_INTERRUPT_LOG_TYPE;
#define NVSWITCH_RAW_ERROR_LOG_DATA_SIZE 16
#define NVSWITCH_RAW_ERROR_LOG_DATA_FLAG_ROUTE_TIME BIT(0)
#define NVSWITCH_RAW_ERROR_LOG_DATA_FLAG_ROUTE_MISC BIT(1)
#define NVSWITCH_RAW_ERROR_LOG_DATA_FLAG_ROUTE_HDR BIT(2)
#define NVSWITCH_RAW_ERROR_LOG_DATA_FLAG_INGRESS_TIME BIT(3)
#define NVSWITCH_RAW_ERROR_LOG_DATA_FLAG_INGRESS_MISC BIT(4)
#define NVSWITCH_RAW_ERROR_LOG_DATA_FLAG_INGRESS_HDR BIT(5)
#define NVSWITCH_RAW_ERROR_LOG_DATA_FLAG_EGRESS_TIME BIT(6)
#define NVSWITCH_RAW_ERROR_LOG_DATA_FLAG_EGRESS_MISC BIT(7)
#define NVSWITCH_RAW_ERROR_LOG_DATA_FLAG_EGRESS_HDR BIT(8)
#define NVSWITCH_RAW_ERROR_LOG_DATA_FLAG_EGRESS_MC_TIME BIT(9)
#define NVSWITCH_RAW_ERROR_LOG_DATA_FLAG_EGRESS_MC_MISC BIT(10)
#define NVSWITCH_RAW_ERROR_LOG_DATA_FLAG_EGRESS_MC_HDR BIT(11)
#define NVSWITCH_RAW_ERROR_LOG_DATA_FLAG_MC_TIME BIT(12)
#define NVSWITCH_RAW_ERROR_LOG_DATA_FLAG_RED_TIME BIT(13)
typedef struct
{
NvU32 data[16];
NvU32 flags;
NvU32 data[NVSWITCH_RAW_ERROR_LOG_DATA_SIZE];
} NVSWITCH_RAW_ERROR_LOG_TYPE;
#define NVSWITCH_ERROR_NEXT_LOCAL_NUMBER(log) (log->error_total)

View File

@@ -97,6 +97,7 @@ void flcnQueueSetupHal(struct FLCN *pFlcn);
void flcnRtosSetupHal(struct FLCN *pFlcn);
void flcnQueueRdSetupHal(struct FLCN *pFlcn);
void flcnSetupHal_LS10(struct FLCN *pFlcn);
void flcnSetupHal_LR10(struct FLCN *pFlcn);
void flcnSetupHal_v03_00(struct FLCN *pFlcn);

View File

@@ -79,6 +79,8 @@
_op(NvlStatus, nvswitch_ctrl_get_ingress_response_table, (nvswitch_device *device, NVSWITCH_GET_INGRESS_RESPONSE_TABLE_PARAMS *params), _arch) \
_op(NvlStatus, nvswitch_ctrl_set_ingress_response_table, (nvswitch_device *device, NVSWITCH_SET_INGRESS_RESPONSE_TABLE *p), _arch) \
_op(NvlStatus, nvswitch_ctrl_set_ganged_link_table, (nvswitch_device *device, NVSWITCH_SET_GANGED_LINK_TABLE *p), _arch) \
_op(void, nvswitch_init_npg_multicast, (nvswitch_device *device), _arch) \
_op(void, nvswitch_init_warm_reset, (nvswitch_device *device), _arch) \
_op(NvlStatus, nvswitch_ctrl_set_remap_policy, (nvswitch_device *device, NVSWITCH_SET_REMAP_POLICY *p), _arch) \
_op(NvlStatus, nvswitch_ctrl_get_remap_policy, (nvswitch_device *device, NVSWITCH_GET_REMAP_POLICY_PARAMS *params), _arch) \
_op(NvlStatus, nvswitch_ctrl_set_remap_policy_valid, (nvswitch_device *device, NVSWITCH_SET_REMAP_POLICY_VALID *p), _arch) \
@@ -114,15 +116,15 @@
_op(NvlStatus, nvswitch_ctrl_get_fom_values, (nvswitch_device *device, NVSWITCH_GET_FOM_VALUES_PARAMS *p), _arch) \
_op(NvlStatus, nvswitch_deassert_link_reset, (nvswitch_device *device, nvlink_link *link), _arch) \
_op(NvBool, nvswitch_is_soe_supported, (nvswitch_device *device), _arch) \
_op(NvlStatus, nvswitch_soe_set_ucode_core, (nvswitch_device *device, NvBool bFalcon), _arch) \
_op(NvlStatus, nvswitch_init_soe, (nvswitch_device *device), _arch) \
_op(NvBool, nvswitch_is_inforom_supported, (nvswitch_device *device), _arch) \
_op(NvBool, nvswitch_is_spi_supported, (nvswitch_device *device), _arch) \
_op(NvBool, nvswitch_is_smbpbi_supported, (nvswitch_device *device), _arch) \
_op(NvlStatus, nvswitch_soe_prepare_for_reset, (nvswitch_device *device), _arch) \
_op(NvlStatus, nvswitch_post_init_device_setup, (nvswitch_device *device), _arch) \
_op(void, nvswitch_post_init_blacklist_device_setup, (nvswitch_device *device), _arch) \
_op(NvlStatus, nvswitch_setup_link_system_registers, (nvswitch_device *device), _arch) \
_op(NvlStatus, nvswitch_read_vbios_link_entries, (nvswitch_device *device, NvU32 tblPtr,NvU32 expected_link_entriesCount,NVLINK_CONFIG_DATA_LINKENTRY *link_entries, NvU32 *identified_link_entriesCount), _arch) \
_op(NvlStatus, nvswitch_vbios_read_structure, (nvswitch_device *device, void *structure, NvU32 offset, NvU32 *ppacked_size, const char *format), _arch) \
_op(NvlStatus, nvswitch_get_nvlink_ecc_errors, (nvswitch_device *device, NVSWITCH_GET_NVLINK_ECC_ERRORS_PARAMS *p), _arch) \
_op(NvlStatus, nvswitch_inforom_ecc_log_error_event, (nvswitch_device *device, INFOROM_ECC_OBJECT *pEccGeneric, INFOROM_NVS_ECC_ERROR_EVENT *error_event), _arch) \
_op(void, nvswitch_oms_set_device_disable, (INFOROM_OMS_STATE *pOmsState, NvBool bForceDeviceDisable), _arch) \
@@ -184,7 +186,6 @@
_op(NvlStatus, nvswitch_init_nxbar, (nvswitch_device *device), _arch) \
_op(NvlStatus, nvswitch_clear_nport_rams, (nvswitch_device *device), _arch) \
_op(NvlStatus, nvswitch_pri_ring_init, (nvswitch_device *device), _arch) \
_op(NvlStatus, nvswitch_get_soe_ucode_binaries, (nvswitch_device *device, const NvU32 **soe_ucode_data, const NvU32 **soe_ucode_header), _arch) \
_op(NvlStatus, nvswitch_get_remap_table_selector, (nvswitch_device *device, NVSWITCH_TABLE_SELECT_REMAP table_selector, NvU32 *remap_ram_sel), _arch) \
_op(NvU32, nvswitch_get_ingress_ram_size, (nvswitch_device *device, NvU32 ingress_ram_selector), _arch) \
_op(NvlStatus, nvswitch_minion_get_dl_status, (nvswitch_device *device, NvU32 linkId, NvU32 statusIdx, NvU32 statusArgs, NvU32 *statusData), _arch) \
@@ -202,14 +203,22 @@
_op(NvBool, nvswitch_is_link_in_reset, (nvswitch_device *device, nvlink_link *link), _arch) \
_op(void, nvswitch_init_buffer_ready, (nvswitch_device *device, nvlink_link * link, NvBool bNportBufferReady), _arch) \
_op(NvlStatus, nvswitch_ctrl_get_nvlink_lp_counters, (nvswitch_device *device, NVSWITCH_GET_NVLINK_LP_COUNTERS_PARAMS *p), _arch) \
_op(NvlStatus, nvswitch_ctrl_set_residency_bins, (nvswitch_device *device, NVSWITCH_SET_RESIDENCY_BINS *p), _arch) \
_op(NvlStatus, nvswitch_ctrl_get_residency_bins, (nvswitch_device *device, NVSWITCH_GET_RESIDENCY_BINS *p), _arch) \
_op(void, nvswitch_apply_recal_settings, (nvswitch_device *device, nvlink_link *), _arch) \
_op(NvlStatus, nvswitch_service_nvldl_fatal_link, (nvswitch_device *device, NvU32 nvliptInstance, NvU32 link), _arch) \
_op(NvlStatus, nvswitch_ctrl_get_rb_stall_busy, (nvswitch_device *device, NVSWITCH_GET_RB_STALL_BUSY *p), _arch) \
_op(NvlStatus, nvswitch_service_minion_link, (nvswitch_device *device, NvU32 link_id), _arch) \
_op(NvlStatus, nvswitch_ctrl_get_sw_info, (nvswitch_device *device, NVSWITCH_GET_SW_INFO_PARAMS *p), _arch)
#define NVSWITCH_HAL_FUNCTION_LIST_LS10(_op, _arch) \
_op(NvlStatus, nvswitch_launch_ALI, (nvswitch_device *device), _arch) \
_op(NvlStatus, nvswitch_launch_ALI_link_training, (nvswitch_device *device, nvlink_link *link, NvBool bSync), _arch) \
_op(NvlStatus, nvswitch_ctrl_inband_send_data, (nvswitch_device *device, NVSWITCH_INBAND_SEND_DATA_PARAMS *p), _arch) \
_op(NvlStatus, nvswitch_ctrl_inband_read_data, (nvswitch_device *device, NVSWITCH_INBAND_READ_DATA_PARAMS *p), _arch) \
_op(NvlStatus, nvswitch_ctrl_set_residency_bins, (nvswitch_device *device, NVSWITCH_SET_RESIDENCY_BINS *p), _arch) \
_op(NvlStatus, nvswitch_ctrl_get_residency_bins, (nvswitch_device *device, NVSWITCH_GET_RESIDENCY_BINS *p), _arch) \
_op(NvlStatus, nvswitch_ctrl_get_rb_stall_busy, (nvswitch_device *device, NVSWITCH_GET_RB_STALL_BUSY *p), _arch) \
_op(NvlStatus, nvswitch_ctrl_get_multicast_id_error_vector, (nvswitch_device *device, NVSWITCH_GET_MULTICAST_ID_ERROR_VECTOR *p), _arch) \
_op(NvlStatus, nvswitch_ctrl_clear_multicast_id_error_vector, (nvswitch_device *device, NVSWITCH_CLEAR_MULTICAST_ID_ERROR_VECTOR *p), _arch) \
//
// Declare HAL function pointer table
//
@@ -226,6 +235,7 @@
typedef struct nvswitch_hal_functions
{
NVSWITCH_HAL_FUNCTION_LIST(DECLARE_HAL_FUNCTIONS, HAL)
NVSWITCH_HAL_FUNCTION_LIST_LS10(DECLARE_HAL_FUNCTIONS, HAL)
} nvswitch_hal;
@@ -243,6 +253,9 @@ typedef struct nvswitch_hal_functions
#define NVSWITCH_INIT_HAL(device, arch) \
NVSWITCH_HAL_FUNCTION_LIST(CREATE_HAL_FUNCTIONS, arch) \
#define NVSWITCH_INIT_HAL_LS10(device, arch) \
NVSWITCH_HAL_FUNCTION_LIST_LS10(CREATE_HAL_FUNCTIONS, arch) \
//
// Declare HAL function dispatch functions
//
@@ -255,8 +268,10 @@ typedef struct nvswitch_hal_functions
_return _function _params;
NVSWITCH_HAL_FUNCTION_LIST(DECLARE_HAL_DISPATCHERS, unused_argument)
NVSWITCH_HAL_FUNCTION_LIST_LS10(DECLARE_HAL_DISPATCHERS, unused_argument)
// HAL functions
void nvswitch_setup_hal_lr10(nvswitch_device *device);
void nvswitch_setup_hal_ls10(nvswitch_device *device);
#endif //_HALDEF_NVSWITCH_H_

View File

@@ -24,6 +24,9 @@
#ifndef _IO_NVSWITCH_H_
#define _IO_NVSWITCH_H_
#include "nv_list.h"
#include "ctrl_dev_nvswitch.h"
// NVSWITCH_REG_* MMIO wrappers are to be used for absolute symbolic BAR0 offset
// register references like SMC, CLOCK, BUS, and PRIV_MASTER.
//
@@ -92,11 +95,7 @@ typedef struct engine_descriptor
// NVSWITCH_REG_RD/WR IO wrappers.
//
#define NVSWITCH_LIST_ALL_ENGINES(_op) \
_op(XVE) \
_op(SAW) \
_op(SOE) \
_op(SMR) \
#define NVSWITCH_LIST_LS10_ONLY_ENGINES(_op) \
_op(GIN) \
_op(XAL) \
_op(XAL_FUNC) \
@@ -124,6 +123,15 @@ typedef struct engine_descriptor
_op(SYSB_PRI_RS_CTRL) \
_op(PRI_MASTER_RS) \
_op(PTIMER) \
_op(CPR) \
_op(TILEOUT) \
_op(TILEOUT_PERFMON) \
#define NVSWITCH_LIST_ALL_ENGINES(_op) \
_op(XVE) \
_op(SAW) \
_op(SOE) \
_op(SMR) \
\
_op(NPG) \
_op(NPORT) \
@@ -134,11 +142,9 @@ typedef struct engine_descriptor
_op(NVLIPT_LNK) \
_op(NVLTLC) \
_op(NVLDL) \
_op(CPR) \
\
_op(NXBAR) \
_op(TILE) \
_op(TILEOUT) \
\
_op(NPG_PERFMON) \
_op(NPORT_PERFMON) \
@@ -149,7 +155,6 @@ typedef struct engine_descriptor
\
_op(NXBAR_PERFMON) \
_op(TILE_PERFMON) \
_op(TILEOUT_PERFMON) \
#define ENGINE_ID_LIST(_eng) \
NVSWITCH_ENGINE_ID_##_eng,
@@ -164,6 +169,7 @@ typedef struct engine_descriptor
typedef enum nvswitch_engine_id
{
NVSWITCH_LIST_ALL_ENGINES(ENGINE_ID_LIST)
NVSWITCH_LIST_LS10_ONLY_ENGINES(ENGINE_ID_LIST)
NVSWITCH_ENGINE_ID_SIZE,
} NVSWITCH_ENGINE_ID;
@@ -312,30 +318,30 @@ typedef enum nvswitch_engine_id
#define NVSWITCH_MAX_SEED_BUFFER_SIZE NVSWITCH_MAX_SEED_NUM + 1
#define NVSWITCH_MAX_INBAND_BUFFER_SIZE 256*8
#define NVSWITCH_MAX_INBAND_BITS_SENT_AT_ONCE 32
#define NVSWITCH_MAX_INBAND_BUFFER_ENTRIES NVSWITCH_MAX_INBAND_BUFFER_SIZE/NVSWITCH_MAX_INBAND_BITS_SENT_AT_ONCE
//
// Inband data structure
// Storing list entries for sending to FM
//
struct nvswitch_inband_data
typedef struct
{
// Inband bufer at sender Minion
NvU32 sendBuffer[NVSWITCH_MAX_INBAND_BUFFER_ENTRIES];
NVListRec entry;
NvU8 data[NVSWITCH_INBAND_DATA_SIZE];
NvU32 dataSize;
} nvswitch_inband_data_list;
// Inband buffer at receiver Minion
NvU32 receiveBuffer[NVSWITCH_MAX_INBAND_BUFFER_ENTRIES];
typedef struct
{
// Temp entry being received
nvswitch_inband_data_list *message;
// Is the current Minion a sender or receiver of Inband Data?
NvBool bIsSenderMinion;
//
// Persistent messages are stored even if the listener (e.g. FM) is
// not present.
//
NVListRec persistent_list;
// Bool to say fail or not
NvBool bTransferFail;
// # of transmisions done - count
// NvU32 txCount;
};
// Stores messages if and only if the listener is present.
NVListRec nonpersistent_list;
} nvswitch_inband_receive_data;
typedef struct
{
@@ -347,14 +353,21 @@ typedef struct
NvBool egress_packet_latched;
NvBool nea; // Near end analog
NvBool ned; // Near end digital
NvBool nedr; // Near end digital
NvBool nedw;
NvU32 lane_rxdet_status_mask;
NvBool bIsRepeaterMode;
// Check if BUFFER_COMPLETE is seen
volatile NvBool isBufferComplete;
// Check if BUFFER_FAIL is seen
volatile NvBool isBufferFail;
// Minion Inband Data structure
struct nvswitch_inband_data inBandData;
nvswitch_inband_receive_data inbandData;
} NVSWITCH_LINK_TYPE;

View File

@@ -352,7 +352,7 @@ typedef NVSWITCH_LINK_TYPE NVSWITCH_LINK_TYPE_LR10;
//
//
// LR10 supports CREQ0(0), DNGRD(1), ATR(2), ATSD(3), PROBE(4), RSP0(5), CREQ1(6), and RSP1(7) VCs.
// LR10 supports CREQ0(0), DNGRD(1), ATR(2), ATSD(3), PROBE(4), RSP0(5), CREQ1(6), and RSP1(7) VCs.
// But DNGRD(1), ATR(2), ATSD(3), and PROBE(4) will be never used as PowerPC ATS support is not a POR for LR10 HW.
//
#define NVSWITCH_NUM_VCS_LR10 8
@@ -436,7 +436,7 @@ typedef struct
// In order to collect all the useful unit information into a single container,
// we need to pick where to find each piece within the parsed discovery table.
// Top level IP wrappers like NPG have a BCAST range to broadcast reads/writes,
// but IP sub-units like NPORT have a MULTICAST range within the BCAST IP
// but IP sub-units like NPORT have a MULTICAST range within the BCAST IP
// wrapper to broadcast to all the sub-units in all the IP wrappers.
// So in the lists below top level IP wrappers (NPG, NVLW, and NXBAR) point
// to the _BCAST IP wrapper, but sub-unit point to the _MULTICAST range inside
@@ -627,11 +627,11 @@ NvlStatus nvswitch_get_link_public_id_lr10(nvswitch_device *device, NvU32 linkId
NvlStatus nvswitch_get_link_local_idx_lr10(nvswitch_device *device, NvU32 linkId, NvU32 *localLinkIdx);
NvlStatus nvswitch_set_training_error_info_lr10(nvswitch_device *device,
NVSWITCH_SET_TRAINING_ERROR_INFO_PARAMS *pLinkTrainingErrorInfoParams);
NvlStatus nvswitch_read_vbios_link_entries_lr10(nvswitch_device *device, NvU32 tblPtr,NvU32 entriesCount,NVLINK_CONFIG_DATA_LINKENTRY *link_entries, NvU32 *identified_entriesCount);
NvlStatus nvswitch_ctrl_get_fatal_error_scope_lr10(nvswitch_device *device, NVSWITCH_GET_FATAL_ERROR_SCOPE_PARAMS *pParams);
void nvswitch_init_scratch_lr10(nvswitch_device *device);
void nvswitch_init_dlpl_interrupts_lr10(nvlink_link *link);
NvlStatus nvswitch_init_nport_lr10(nvswitch_device *device);
NvlStatus nvswitch_get_soe_ucode_binaries_lr10(nvswitch_device *device, const NvU32 **soe_ucode_data, const NvU32 **soe_ucode_header);
NvlStatus nvswitch_poll_sublink_state_lr10(nvswitch_device *device, nvlink_link *link);
void nvswitch_setup_link_loopback_mode_lr10(nvswitch_device *device, NvU32 linkNumber);
void nvswitch_reset_persistent_link_hw_state_lr10(nvswitch_device *device, NvU32 linkNumber);
@@ -646,8 +646,13 @@ void nvswitch_corelib_get_uphy_load_lr10(nvlink_link *link, NvBool *bUnlocked);
void nvswitch_init_buffer_ready_lr10(nvswitch_device *device, nvlink_link *link, NvBool bNportBufferReady);
NvlStatus nvswitch_ctrl_get_nvlink_lp_counters_lr10(nvswitch_device *device, NVSWITCH_GET_NVLINK_LP_COUNTERS_PARAMS *params);
NvlStatus nvswitch_service_nvldl_fatal_link_lr10(nvswitch_device *device, NvU32 nvliptInstance, NvU32 link);
NvlStatus nvswitch_ctrl_inband_send_data_lr10(nvswitch_device *device, NVSWITCH_INBAND_SEND_DATA_PARAMS *p);
NvlStatus nvswitch_ctrl_inband_read_data_lr10(nvswitch_device *device, NVSWITCH_INBAND_READ_DATA_PARAMS *p);
NvlStatus nvswitch_launch_ALI_link_training_lr10(nvswitch_device *device, nvlink_link *link, NvBool bSync);
NvlStatus nvswitch_service_minion_link_lr10(nvswitch_device *device, NvU32 nvliptInstance);
void nvswitch_apply_recal_settings_lr10(nvswitch_device *device, nvlink_link *link);
NvlStatus nvswitch_ctrl_get_sw_info_lr10(nvswitch_device *device, NVSWITCH_GET_SW_INFO_PARAMS *p);
NvlStatus nvswitch_launch_ALI_lr10(nvswitch_device *device);
#endif //_LR10_H_

View File

@@ -92,4 +92,5 @@ NvU32 nvswitch_minion_get_data_rate_KiBps_lr10(nvswitch_device *device, NvU3
NvlStatus nvswitch_set_minion_initialized_lr10(nvswitch_device *device, NvU32 idx_minion, NvBool initialized);
NvBool nvswitch_is_minion_initialized_lr10(nvswitch_device *device, NvU32 idx_minion);
NvlStatus nvswitch_minion_clear_dl_error_counters_lr10(nvswitch_device *device, NvU32 linkId);
#endif //_MINION_LR10_H_

View File

@@ -58,10 +58,8 @@ typedef const struct
// Internal function declarations
//
NvlStatus nvswitch_init_soe_lr10(nvswitch_device *device);
NvlStatus nvswitch_soe_prepare_for_reset_lr10(nvswitch_device *device);
void nvswitch_soe_unregister_events_lr10(nvswitch_device *device);
void nvswitch_therm_soe_callback_lr10(nvswitch_device *device, union RM_FLCN_MSG *pMsg,
void *pParams, NvU32 seqDesc, NV_STATUS status);
NvlStatus nvswitch_soe_set_ucode_core_lr10(nvswitch_device *device, NvBool bFalcon);
NvlStatus nvswitch_soe_register_event_callbacks_lr10(nvswitch_device *device);
#endif //_SOE_LR10_H_

View File

@@ -229,15 +229,6 @@
#define NV_SWITCH_REGKEY_SOE_DISABLE_NO 0x0
#define NV_SWITCH_REGKEY_SOE_DISABLE_YES 0x1
/*
* NV_SWITCH_REGKEY_SOE_BOOT_CORE - Selects SOE core
*
* Public: Available in release drivers
*/
#define NV_SWITCH_REGKEY_SOE_BOOT_CORE "SoeBootCore"
#define NV_SWITCH_REGKEY_SOE_BOOT_CORE_FALCON 0x0
#define NV_SWITCH_REGKEY_SOE_BOOT_CORE_DEFAULT 0x2
/*
* NV_SWITCH_REGKEY_ENABLE_PM
*
@@ -409,11 +400,18 @@
*
* When the regkey is set to FALCON, the Nvswitch driver will run MINION on Falcon core.
*
* If set to RISCV, the MINION will run on RISCV core in Non-Manifest Mode.
* If set to RISCV_MANIFEST, the MINION will run on RISCV core in Manifest Mode.
*
* In the default option, RISCV_BCR_CTRL register will be used to get the default core.
*
* Private: Debug use only
*/
#define NV_SWITCH_REGKEY_MINION_SET_UCODE_TARGET "MinionSetUcodeTarget"
#define NV_SWITCH_REGKEY_MINION_SET_UCODE_TARGET_DEFAULT 0x0
#define NV_SWITCH_REGKEY_MINION_SET_UCODE_TARGET_FALCON 0x1
#define NV_SWITCH_REGKEY_MINION_SET_UCODE_TARGET_RISCV 0x2
#define NV_SWITCH_REGKEY_MINION_SET_UCODE_TARGET_RISCV_MANIFEST 0x3
/*
* NV_SWITCH_REGKEY_MINION_SET_SIMMODE - Selects simmode settings to send to MINION
@@ -500,13 +498,14 @@
/*
* NV_SWITCH_REGKEY_LINK_TRAINING_SELECT - Select the Link training to be done
*
* This regkey will
* For LS10, links can be trained via non-ALI or ALI training. This regkey will
* allow for overriding System Defaults and can force either training method
* when desired.
*/
#define NV_SWITCH_REGKEY_LINK_TRAINING_SELECT "LinkTrainingMode"
#define NV_SWITCH_REGKEY_LINK_TRAINING_SELECT_DEFAULT 0x0
#define NV_SWITCH_REGKEY_LINK_TRAINING_SELECT_NON_ALI 0x1
#define NV_SWITCH_REGKEY_LINK_TRAINING_SELECT_ALI 0x2
/*
* NV_SWITCH_REGKEY_I2C_ACCESS_CONTROL - Enable access to all I2C Ports/Devices
*

View File

@@ -547,6 +547,9 @@ nvswitch_read_rom_tables
#define NVLINK_CONFIG_DATA_HEADER_20_SIZE 8
#define NVLINK_CONFIG_DATA_HEADER_20_FMT "6b1w"
#define NVLINK_CONFIG_DATA_HEADER_VER_30 0x3
#define NVLINK_CONFIG_DATA_HEADER_30_SIZE 8
typedef struct _PCI_DATA_STRUCT
{
bios_U032 sig; // 00h: Signature, the string "PCIR" or NVIDIA's alternate "NPDS"
@@ -747,7 +750,9 @@ typedef struct _nvlink_Config_Data_Header_20
#define NV_NVLINK_VBIOS_PARAM6_TXTRAIN_MINIMUM_TRAIN_TIME_EXPONENT 7:4
#define NVLINK_CONFIG_DATA_BASEENTRY_FMT "1b"
#define NVLINK_CONFIG_DATA_LINKENTRY_FMT "7b"
#define NVLINK_CONFIG_DATA_LINKENTRY_FMT_20 "7b"
#define NVLINK_CONFIG_DATA_LINKENTRY_FMT_30 "10b"
// Version 2.0 Link Entry and Base Entry
typedef struct _nvlink_config_data_baseentry_20
{
@@ -764,9 +769,11 @@ typedef struct _nvlink_config_data_linkentry_20
NvU8 nvLinkparam4;
NvU8 nvLinkparam5;
NvU8 nvLinkparam6;
NvU8 nvLinkparam7;
NvU8 nvLinkparam8;
NvU8 nvLinkparam9;
} NVLINK_CONFIG_DATA_LINKENTRY;
// Union of different VBIOS configuration table formats
typedef union __nvlink_Config_Data_Header
{
@@ -788,7 +795,22 @@ typedef struct _nvlink_vbios_config_data_linkentry_20
bios_U008 nvLinkparam4;
bios_U008 nvLinkparam5;
bios_U008 nvLinkparam6;
} NVLINK_VBIOS_CONFIG_DATA_LINKENTRY, *PNVLINK_VBIOS_CONFIG_DATA_LINKENTRY;
} NVLINK_VBIOS_CONFIG_DATA_LINKENTRY_20, *PNVLINK_VBIOS_CONFIG_DATA_LINKENTRY_20;
typedef struct _nvlink_vbios_config_data_linkentry_30
{
// VBIOS configuration Data
bios_U008 nvLinkparam0;
bios_U008 nvLinkparam1;
bios_U008 nvLinkparam2;
bios_U008 nvLinkparam3;
bios_U008 nvLinkparam4;
bios_U008 nvLinkparam5;
bios_U008 nvLinkparam6;
bios_U008 nvLinkparam7;
bios_U008 nvLinkparam8;
bios_U008 nvLinkparam9;
} NVLINK_VBIOS_CONFIG_DATA_LINKENTRY_30, *PNVLINK_VBIOS_CONFIG_DATA_LINKENTRY_30;
//
// NVSwitch driver structures

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -116,5 +116,6 @@ typedef struct {
// HAL functions
void soeSetupHal_LR10(struct SOE *pSoe);
void soeSetupHal_LS10(struct SOE *pSoe);
#endif //_HALDEFS_SOE_NVSWITCH_H_

View File

@@ -37,10 +37,8 @@ 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);
NV_STATUS soeProcessMessages_HAL (struct nvswitch_device *device, PSOE pSoe);
NV_STATUS soeWaitForInitAck_HAL (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);