From patchwork Fri Feb 20 00:37:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Neuling X-Patchwork-Id: 441814 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id BCFC8140188 for ; Fri, 20 Feb 2015 11:38:52 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id AC2F31A0E6D for ; Fri, 20 Feb 2015 11:38:52 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 6BF7B1A0E4F for ; Fri, 20 Feb 2015 11:38:23 +1100 (AEDT) Received: from localhost.localdomain (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 38C241401AB; Fri, 20 Feb 2015 11:38:23 +1100 (AEDT) Received: by localhost.localdomain (Postfix, from userid 1000) id 24C46D47040; Fri, 20 Feb 2015 11:38:23 +1100 (AEDT) From: Michael Neuling To: stewart@linux.vnet.ibm.com Date: Fri, 20 Feb 2015 11:37:55 +1100 Message-Id: <1424392679-27859-12-git-send-email-mikey@neuling.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1424392679-27859-1-git-send-email-mikey@neuling.org> References: <1424392679-27859-1-git-send-email-mikey@neuling.org> Cc: imunsie@au.ibm.com, grimm@linux.vnet.ibm.com, skiboot@lists.ozlabs.org Subject: [Skiboot] [PATCH 12/16] capi: Add CAPI microcode read to load_resource() X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Add ability to read CAPI microcode to load_resource() implementations. We use the cfam chipid as the subid. FSP load_resource() contains a map of cfam chipid to lid numbers. PNOR load_resource() doesn't change, but requires a properly formatted partition with EC values in the TOC matching the appropriate cfam chipid. Signed-off-by: Michael Neuling --- core/flash.c | 1 + hw/fsp/fsp.c | 9 +++++++++ include/platform.h | 1 + 3 files changed, 11 insertions(+) diff --git a/core/flash.c b/core/flash.c index 51a66c9..6fe9250 100644 --- a/core/flash.c +++ b/core/flash.c @@ -334,6 +334,7 @@ static struct { } part_name_map[] = { { RESOURCE_ID_KERNEL, RESOURCE_SUBID_NONE, "KERNEL" }, { RESOURCE_ID_INITRAMFS,RESOURCE_SUBID_NONE, "ROOTFS" }, + { RESOURCE_ID_CAPP, RESOURCE_SUBID_SUPPORTED, "CAPP" }, }; /* This mimics the hostboot SBE format */ diff --git a/hw/fsp/fsp.c b/hw/fsp/fsp.c index 21926b6..62af924 100644 --- a/hw/fsp/fsp.c +++ b/hw/fsp/fsp.c @@ -2255,6 +2255,11 @@ int fsp_fetch_data_queue(uint8_t flags, uint16_t id, uint32_t sub_id, return OPAL_SUCCESS; } +#define CAPP_IDX_VENICE_DD10 0x100ea +#define CAPP_IDX_VENICE_DD20 0x200ea +#define CAPP_IDX_MURANO_DD20 0x200ef +#define CAPP_IDX_MURANO_DD21 0x201ef + static struct { enum resource_id id; uint32_t idx; @@ -2262,6 +2267,10 @@ static struct { } fsp_lid_map[] = { { RESOURCE_ID_KERNEL, RESOURCE_SUBID_NONE, KERNEL_LID_OPAL }, { RESOURCE_ID_INITRAMFS,RESOURCE_SUBID_NONE, INITRAMFS_LID_OPAL }, + { RESOURCE_ID_CAPP, CAPP_IDX_MURANO_DD20, 0x80a02002 }, + { RESOURCE_ID_CAPP, CAPP_IDX_MURANO_DD21, 0x80a02001 }, + { RESOURCE_ID_CAPP, CAPP_IDX_VENICE_DD10, 0x80a02003 }, + { RESOURCE_ID_CAPP, CAPP_IDX_VENICE_DD20, 0x80a02004 }, }; bool fsp_load_resource(enum resource_id id, uint32_t idx, diff --git a/include/platform.h b/include/platform.h index 690772e..9c40251 100644 --- a/include/platform.h +++ b/include/platform.h @@ -25,6 +25,7 @@ struct errorlog; enum resource_id { RESOURCE_ID_KERNEL, RESOURCE_ID_INITRAMFS, + RESOURCE_ID_CAPP, }; #define RESOURCE_SUBID_NONE 0 #define RESOURCE_SUBID_SUPPORTED 1