summaryrefslogtreecommitdiffstats
path: root/src/usr/mmio
diff options
context:
space:
mode:
authorRick Ward <rward15@us.ibm.com>2018-11-06 16:51:42 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-11-09 13:27:04 -0600
commit8351efdb3b65ed4fc5472e78efd5db315663e42f (patch)
treec12686656b0e9c54d017232b8681b3ee5e9ecac5 /src/usr/mmio
parent7d4f360d16e2c8f734d361486e7334f2d31f9a20 (diff)
downloadblackbird-hostboot-8351efdb3b65ed4fc5472e78efd5db315663e42f.tar.gz
blackbird-hostboot-8351efdb3b65ed4fc5472e78efd5db315663e42f.zip
Inband MMIO access to OCMB (skeleton)
This is a skeleton version of the new MMIO device driver that will give access to the OCMB. It is being pushed to allow related development to progress. Change-Id: Iefec0677e63db6af29d81389c630584ba9dff16c RTC: 189447 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/68489 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Matt Derksen <mderkse1@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/mmio')
-rw-r--r--src/usr/mmio/makefile32
-rw-r--r--src/usr/mmio/mmio.C61
2 files changed, 93 insertions, 0 deletions
diff --git a/src/usr/mmio/makefile b/src/usr/mmio/makefile
new file mode 100644
index 000000000..9b8d03ded
--- /dev/null
+++ b/src/usr/mmio/makefile
@@ -0,0 +1,32 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/usr/mmio/makefile $
+#
+# OpenPOWER HostBoot Project
+#
+# Contributors Listed Below - COPYRIGHT 2013,2018
+# [+] International Business Machines Corp.
+#
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+# IBM_PROLOG_END_TAG
+ROOTPATH = ../../..
+MODULE = mmio
+
+#include unique object modules
+OBJS += mmio.o
+
+VPATH += ..
+include $(ROOTPATH)/config.mk
diff --git a/src/usr/mmio/mmio.C b/src/usr/mmio/mmio.C
new file mode 100644
index 000000000..2b0849aa5
--- /dev/null
+++ b/src/usr/mmio/mmio.C
@@ -0,0 +1,61 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/mmio/mmio.C $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2018 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* Licensed under the Apache License, Version 2.0 (the "License"); */
+/* you may not use this file except in compliance with the License. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+#include <sys/mmio.h>
+#include <devicefw/driverif.H>
+#include <errl/errlentry.H>
+#include <errl/errlmanager.H>
+#include <targeting/common/predicates/predicates.H>
+#include <targeting/common/utilFilter.H>
+#include <targeting/common/targetservice.H>
+#include <arch/ppc.H>
+
+#include <mmio/mmio.H>
+
+namespace MMIO
+{
+
+void mmioSetup()
+{
+}
+
+// Direct OCMB reads and writes to the device's memory mapped memory.
+DEVICE_REGISTER_ROUTE(DeviceFW::WILDCARD,
+ DeviceFW::MMIO,
+ TARGETING::TYPE_OCMB_CHIP,
+ mmioPerformOp);
+
+errlHndl_t mmioPerformOp(DeviceFW::OperationType i_opType,
+ TARGETING::TargetHandle_t i_target,
+ void* io_buffer,
+ size_t& io_buflen,
+ int64_t i_accessType,
+ va_list i_args)
+{
+ errlHndl_t l_err = nullptr;
+
+ return l_err;
+}
+
+}; // end namespace MMIO
OpenPOWER on IntegriCloud