From patchwork Tue Jun 18 07:29:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 1117666 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 45Sfw64v0Bz9s9y for ; Tue, 18 Jun 2019 17:33:58 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 45Sfw63pF2zDqjk for ; Tue, 18 Jun 2019 17:33:58 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=stewart@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 45Sfq80201zDqbG for ; Tue, 18 Jun 2019 17:29:39 +1000 (AEST) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5I7SXgd124560 for ; Tue, 18 Jun 2019 03:29:38 -0400 Received: from e13.ny.us.ibm.com (e13.ny.us.ibm.com [129.33.205.203]) by mx0a-001b2d01.pphosted.com with ESMTP id 2t6tuuspcb-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 18 Jun 2019 03:29:37 -0400 Received: from localhost by e13.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 18 Jun 2019 08:29:36 +0100 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e13.ny.us.ibm.com (146.89.104.200) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 18 Jun 2019 08:29:33 +0100 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x5I7TW0S6291986 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 18 Jun 2019 07:29:32 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A29CC124052 for ; Tue, 18 Jun 2019 07:29:32 +0000 (GMT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 621E1124053 for ; Tue, 18 Jun 2019 07:29:32 +0000 (GMT) Received: from birb.localdomain (unknown [9.185.142.124]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP for ; Tue, 18 Jun 2019 07:29:32 +0000 (GMT) Received: by birb.localdomain (Postfix, from userid 1000) id 49C394F249B; Tue, 18 Jun 2019 17:29:28 +1000 (AEST) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Tue, 18 Jun 2019 17:29:13 +1000 X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190618072925.5299-1-stewart@linux.ibm.com> References: <20190618072925.5299-1-stewart@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 19061807-0064-0000-0000-000003EF51B6 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00011283; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000286; SDB=6.01219633; UDB=6.00641533; IPR=6.01000774; MB=3.00027356; MTD=3.00000008; XFM=3.00000015; UTC=2019-06-18 07:29:34 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19061807-0065-0000-0000-00003DEDC9C1 Message-Id: <20190618072925.5299-6-stewart@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-18_04:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=961 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906180062 Subject: [Skiboot] [PATCH 05/17] host_services_occ_base_setup is core homer code not host_services X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Signed-off-by: Stewart Smith --- hw/homer.c | 25 +++++++++++++++++++++++++ include/hostservices.h | 1 - platforms/ibm-fsp/hostservices.c | 24 ------------------------ 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/hw/homer.c b/hw/homer.c index 34ee3370d63f..964a6e05d233 100644 --- a/hw/homer.c +++ b/hw/homer.c @@ -157,6 +157,31 @@ static void homer_init_chip(struct proc_chip *chip) } } + +static void host_services_occ_base_setup(void) +{ + struct proc_chip *chip; + uint64_t occ_common; + + chip = next_chip(NULL); /* Frist chip */ + occ_common = (uint64_t) local_alloc(chip->id, OCC_COMMON_SIZE, OCC_COMMON_SIZE); + + for_each_chip(chip) { + chip->occ_common_base = occ_common; + chip->occ_common_size = OCC_COMMON_SIZE; + + chip->homer_base = (uint64_t) local_alloc(chip->id, HOMER_IMAGE_SIZE, + HOMER_IMAGE_SIZE); + chip->homer_size = HOMER_IMAGE_SIZE; + memset((void *)chip->homer_base, 0, chip->homer_size); + + prlog(PR_DEBUG, "HBRT: Chip %d HOMER base %016llx : %08llx\n", + chip->id, chip->homer_base, chip->homer_size); + prlog(PR_DEBUG, "HBRT: OCC common base %016llx : %08llx\n", + chip->occ_common_base, chip->occ_common_size); + } +} + void homer_init(void) { struct proc_chip *chip; diff --git a/include/hostservices.h b/include/hostservices.h index ebd1a5899617..06c5fe797b4f 100644 --- a/include/hostservices.h +++ b/include/hostservices.h @@ -24,7 +24,6 @@ bool hservices_lid_preload_complete(void); int host_services_occ_load(void); int host_services_occ_start(void); int host_services_occ_stop(void); -void host_services_occ_base_setup(void); /* No LID can be larger than 16M, but OCC lid is less than 1 MB */ diff --git a/platforms/ibm-fsp/hostservices.c b/platforms/ibm-fsp/hostservices.c index d515f13403f0..9de8a63b3906 100644 --- a/platforms/ibm-fsp/hostservices.c +++ b/platforms/ibm-fsp/hostservices.c @@ -735,30 +735,6 @@ out: return rc; } -void host_services_occ_base_setup(void) -{ - struct proc_chip *chip; - uint64_t occ_common; - - chip = next_chip(NULL); /* Frist chip */ - occ_common = (uint64_t) local_alloc(chip->id, OCC_COMMON_SIZE, OCC_COMMON_SIZE); - - for_each_chip(chip) { - chip->occ_common_base = occ_common; - chip->occ_common_size = OCC_COMMON_SIZE; - - chip->homer_base = (uint64_t) local_alloc(chip->id, HOMER_IMAGE_SIZE, - HOMER_IMAGE_SIZE); - chip->homer_size = HOMER_IMAGE_SIZE; - memset((void *)chip->homer_base, 0, chip->homer_size); - - prlog(PR_DEBUG, "HBRT: Chip %d HOMER base %016llx : %08llx\n", - chip->id, chip->homer_base, chip->homer_size); - prlog(PR_DEBUG, "HBRT: OCC common base %016llx : %08llx\n", - chip->occ_common_base, chip->occ_common_size); - } -} - bool hservices_init(void) { void *code = NULL;