From patchwork Thu Sep 24 04:42:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1370278 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bxj9K5KvSz9sSt for ; Thu, 24 Sep 2020 14:43:33 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.a=rsa-sha256 header.s=201707 header.b=kDnqnl2H; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4Bxj9K4NLjzDqYt for ; Thu, 24 Sep 2020 14:43:33 +1000 (AEST) X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Bxj8Y1GrSzDqV8 for ; Thu, 24 Sep 2020 14:42:53 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.a=rsa-sha256 header.s=201707 header.b=kDnqnl2H; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4Bxj8X5YLqz9sTM; Thu, 24 Sep 2020 14:42:52 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1600922572; bh=uM+qJ8E7tHGgAUausxDXXF3WicaBYczXyoA39fcWWzg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kDnqnl2HnejqqsiLzmvTAR7Wsjhoo1BZiC9f+qzuPh8urD9JbYF6A6LArv2Mc2r8p 3cLbjGN9raOfQzqdIRhafZa2J41PUE1AOTqnU5R4ih07xqrQ1QtaweWXvD1MpTq0Tk dq2dvny0wB+LO0mhmXhPphq9ojaPW9twLoezESzMcGayRHD/LaXmLX2RfaioAEEY3t ITxr9d4kIUbj2uM9Yhbf+oUMMik5c3xZSimau46DwonwK3hKWDBGDDtGAHvSR7la2h PU8ZfGuHrx2UplGVYPGItrRbk3B3a9aJsW/yxP2TxkA4PGh8gAh/fPAcVlNJx+4bWd W+3rae+R90dBw== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 24 Sep 2020 14:42:27 +1000 Message-Id: <20200924044236.130586-10-amitay@ozlabs.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200924044236.130586-1-amitay@ozlabs.org> References: <20200924044236.130586-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH 09/18] libsbefifo: Add new definitions for P10 sbe X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amitay Isaacs Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Signed-off-by: Amitay Isaacs Reviewed-by: Joel Stanley --- libsbefifo/libsbefifo.h | 44 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/libsbefifo/libsbefifo.h b/libsbefifo/libsbefifo.h index 1c26ea3..b464069 100644 --- a/libsbefifo/libsbefifo.h +++ b/libsbefifo/libsbefifo.h @@ -26,6 +26,7 @@ #define SBEFIFO_PRI_INVALID_DATA 0x00020000 #define SBEFIFO_PRI_SEQUENCE_ERROR 0x00030000 #define SBEFIFO_PRI_INTERNAL_ERROR 0x00040000 +#define SBEFIFO_PRI_ACCESS_DENIED 0x00050000 #define SBEFIFO_PRI_UNKNOWN_ERROR 0x00FE0000 #define SBEFIFO_SEC_SUCCESS 0x0000 @@ -47,6 +48,44 @@ #define SBEFIFO_SEC_HW_TIMEOUT 0x0010 #define SBEFIFO_SEC_PIB_ERROR 0x0011 #define SBEFIFO_SEC_PARITY_ERROR 0x0012 +#define SBEFIFO_SEC_UNUSED 0x0013 +#define SBEFIFO_SEC_MEM_INVALID_ACCESS 0x0014 +#define SBEFIFO_SEC_MEM_REGION_NOT_FOUND 0x0015 +#define SBEFIFO_SEC_MEM_OVERFLOW_REGION 0x0016 +#define SBEFIFO_SEC_MEM_REGION_AMEND 0x0017 +#define SBEFIFO_SEC_INPUT_BUFFER_OVERFLOW 0x0018 +#define SBEFIFO_SEC_INVALID_PARAM 0x0019 +/* Missing error codes */ +#define SBEFIFO_SEC_INVALID_CHIPOP 0x0020 +#define SBEFIFO_SEC_DEADMAN_TIMEOUT 0x0021 +#define SBEFIFO_SEC_SYSTEM_CHECKSTOP 0x0022 +#define SBEFIFO_SEC_REG_ACCESS_BLOCKED 0x0023 +#define SBEFIFO_SEC_START_MPIPL_FAIL 0x0024 +#define SBEFIFO_SEC_STOP_CLOCK_FAIL 0x0025 +#define SBEFIFO_SEC_CONT_MPIPL_FAIL 0x0026 +#define SBEFIFO_SEC_IO_TOGGLE_FAIL 0x0027 +#define SBEFIFO_SEC_SPL_WKUP_TIMEOUT 0x0028 +#define SBEFIFO_SEC_SPL_WKUP_SCOM_FAIL 0x0029 +#define SBEFIFO_SEC_REG_DUMP_FAIL 0x002A +#define SBEFIFO_SEC_LPC_ACCESS_FAIL 0x002B +#define SBEFIFO_SEC_HWP_FAIL 0x002C +#define SBEFIFO_SEC_ATTN_CORE_READ_FAIL 0x002D +#define SBEFIFO_SEC_ATTN_DATA_READ_FAIL 0x002E +#define SBEFIFO_SEC_PUT_SRAM_FAIL 0x002F +#define SBEFIFO_SEC_GET_SRAM_FAIL 0x0030 +#define SBEFIFO_SEC_THREAD_CONTROL_FAIL 0x0031 +#define SBEFIFO_SEC_RAM_CORE_SETUP_FAIL 0x0032 +#define SBEFIFO_SEC_RAM_CORE_ACCESS_FAIL 0x0033 +#define SBEFIFO_SEC_RAM_CORE_CLEAN_FAIL 0x0034 +#define SBEFIFO_SEC_SUSPEND_IO_FAIL 0x0035 +#define SBEFIFO_SEC_ENTER_MPIPL_FAIL2 0x0036 +#define SBEFIFO_SEC_STOP_CLOCK_FAIL2 0x0037 + +#define SBEFIFO_TARGET_TYPE_PROC 0x0000 +#define SBEFIFO_TARGET_TYPE_PERV 0x0001 +#define SBEFIFO_TARGET_TYPE_EQ 0x0002 +#define SBEFIFO_TARGET_TYPE_CORE 0x0003 +#define SBEFIFO_TARGET_TYPE_OCMB 0x0004 #define SBEFIFO_PROC_P9 0x01 #define SBEFIFO_PROC_P10 0x02 @@ -102,6 +141,11 @@ int sbefifo_ring_put_from_image(struct sbefifo_context *sctx, uint16_t target, u int sbefifo_mem_get(struct sbefifo_context *sctx, uint64_t addr, uint32_t size, uint16_t flags, uint8_t **data); int sbefifo_mem_put(struct sbefifo_context *sctx, uint64_t addr, uint8_t *data, uint32_t len, uint16_t flags); + +#define SBEFIFO_MEMORY_MODE_NORMAL 0x01 +#define SBEFIFO_MEMORY_MODE_DEBUG 0x02 +#define SBEFIFO_MEMORY_MODE_CIRCULAR 0x03 + int sbefifo_occsram_get(struct sbefifo_context *sctx, uint32_t addr, uint32_t size, uint8_t mode, uint8_t **data, uint32_t *data_len); int sbefifo_occsram_put(struct sbefifo_context *sctx, uint32_t addr, uint8_t *data, uint32_t data_len, uint8_t mode);