Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit 7b3eedd

Browse files
Merge pull request #15 from chetansinghrathore/master
SCMI ACK v2.0 Alpha Release code
2 parents 24dd373 + ef9bf65 commit 7b3eedd

187 files changed

Lines changed: 9647 additions & 11807 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

license.md renamed to LICENSE.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Apache License
1+
Apache License
22
Version 2.0, January 2004
33
http://www.apache.org/licenses/
44

@@ -177,15 +177,26 @@
177177

178178
APPENDIX: How to apply the Apache License to your work.
179179

180-
Individual files to contain the following tag instead of full license text.
180+
To apply the Apache License to your work, attach the following
181+
boilerplate notice, with the fields enclosed by brackets "[]"
182+
replaced with your own identifying information. (Don't include
183+
the brackets!) The text should be enclosed in the appropriate
184+
comment syntax for the file format. We also recommend that a
185+
file or class name and description of purpose be included on the
186+
same "printed page" as the copyright notice for easier
187+
identification within third-party archives.
181188

182-
----------
189+
Copyright [yyyy] [name of copyright owner]
183190

184-
> Copyright (c) YYYY, ARM Limited and Contributors. All rights reserved.
185-
>
186-
> SPDX-License-Identifier: Apache-2.0
191+
Licensed under the Apache License, Version 2.0 (the "License");
192+
you may not use this file except in compliance with the License.
193+
You may obtain a copy of the License at
187194

188-
----------
195+
http://www.apache.org/licenses/LICENSE-2.0
196+
197+
Unless required by applicable law or agreed to in writing, software
198+
distributed under the License is distributed on an "AS IS" BASIS,
199+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200+
See the License for the specific language governing permissions and
201+
limitations under the License.
189202

190-
This enables machine processing of license information based on the SPDX
191-
License Identifiers that are avialable at: [http://spdx.org/licenses/](http://spdx.org/licenses/)

Makefile

Lines changed: 58 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,85 @@
1-
#
2-
# Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
3-
#
4-
# SPDX-License-Identifier: Apache-2.0
5-
#
1+
#/** @file
2+
# * Copyright (c) 2019, Arm Limited or its affiliates. All rights reserved.
3+
# * SPDX-License-Identifier : Apache-2.0
4+
# *
5+
# * Licensed under the Apache License, Version 2.0 (the "License");
6+
# * you may not use this file except in compliance with the License.
7+
# * You may obtain a copy of the License at
8+
# *
9+
# * http://www.apache.org/licenses/LICENSE-2.0
10+
# *
11+
# * Unless required by applicable law or agreed to in writing, software
12+
# * distributed under the License is distributed on an "AS IS" BASIS,
13+
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# * See the License for the specific language governing permissions and
15+
# * limitations under the License.
16+
#**/
617

718
include Makefile.inc
819
export TOP=$(shell pwd)
20+
921
# Library and executable names
1022
LIB=scmi_test
1123
PROGRAM=scmi_test_agent
24+
25+
# Default version and verbose setting
26+
VERBOSE := 3
27+
VERSION := 1
28+
1229
# Obtain PLAT command line argument and set platform directory
13-
# However PLAT is an optional varible hence conditionally set these
30+
# However PLAT is an optional variable hence conditionally set these
1431
ifneq ($(PLAT),)
15-
PLAT_DIR=platform/$(PLAT) platform/$(PLAT)/transport
32+
PLAT_DIR=platform/$(PLAT)
1633
EXE=$(PROGRAM)
1734
endif
1835

36+
APP_DIR=linux_app
37+
1938
# Obtain PROTOCOLS command line argument
2039
comma := ,
21-
ALL_PROTOCOLS=base $(subst $(comma), ,$(PROTOCOLS))
40+
ALL_PROTOCOLS=base common $(subst $(comma), ,$(PROTOCOLS))
2241
ALL_PROTOCOLS_UPPER=$(shell echo $(ALL_PROTOCOLS) | tr a-z A-Z)
42+
2343
# List of subdirs to be built
24-
DIRS=test_agent $(PLAT_DIR) $(ALL_PROTOCOLS:%=protocols/%)
44+
DIRS=val $(PLAT_DIR) $(ALL_PROTOCOLS:%=test_pool/%) $(APP_DIR)
2545
BUILD_ALL=$(DIRS)
46+
2647
# Name for directory within each subdir that contains its header files
2748
export HEADER_DIR=include
49+
2850
# List of directories to be searched for header files
29-
export I_DIRS=$(DIRS:%=-I$(TOP)/%/${HEADER_DIR}) -I$(TOP)/protocols/${HEADER_DIR} -I$(TOP)/platform/${HEADER_DIR}
51+
export I_DIRS=$(DIRS:%=-I$(TOP)/%/${HEADER_DIR}) -I$(TOP)/test_pool/${HEADER_DIR} -I$(TOP)/platform/${HEADER_DIR}
52+
3053
# Output objects directory
31-
export OBJ_DIR=$(TOP)/output
54+
export APP_OBJ_DIR=$(TOP)/app_output
55+
56+
# Test output objects directory
57+
export TEST_OBJ_DIR=$(TOP)/test_output
58+
3259
# Platform output objects directory
3360
export PLATFORM_OBJ_DIR=$(TOP)/platform_output
61+
62+
# Val output objects directory
63+
export VAL_OBJ_DIR=$(TOP)/val_output
64+
3465
# list of names to be converted as macros
3566
export D_NAMES=$(ALL_PROTOCOLS_UPPER:%=-D%_PROTOCOL)
67+
export CFLAGS=-DVERBOSE_LEVEL=$(VERBOSE) -Wall -Werror
68+
export CFLAGS+=-DSCMI_VERSION_$(VERSION)
69+
3670
# Location of external library directories
3771
LIB_DIR=$(TOP)
3872

3973
all: all_makefiles # to avoid overriding all target
4074

4175
all_makefiles: check_requirements $(BUILD_ALL) $(LIB) $(EXE)
42-
@echo "### Built project succesfully!!!###"
76+
@echo "### Built project successfully!!!###"
4377

4478
check_requirements:
45-
mkdir -p ${OBJ_DIR}
79+
mkdir -p ${APP_OBJ_DIR}
80+
mkdir -p ${TEST_OBJ_DIR}
4681
mkdir -p ${PLATFORM_OBJ_DIR}
82+
mkdir -p ${VAL_OBJ_DIR}
4783

4884
$(BUILD_ALL):
4985
@echo "Building sub-component at $(@)"
@@ -56,15 +92,22 @@ $(PROGRAM):
5692

5793
$(LIB):
5894
echo "Building library at `pwd`"
59-
$(AR) -cvq lib$@.a $(OBJ_DIR)/*.o
95+
$(AR) -cvq lib$@.a $(VAL_OBJ_DIR)/*.o $(TEST_OBJ_DIR)/*.o $(APP_OBJ_DIR)/*.o
96+
97+
help:
98+
@echo "### SUPPORTED PROTOCOLS : base power_domain system_domain performance clock sensor ###"
99+
@echo "### SUPPORTED VERSION : 1 (SCMI v1.0 test) , 2 (SCMI v2.0 test) ###"
100+
@echo "### SUPPORTED VERBOSE : 1 (ERR) 2 (WARN) 3 (TEST) 4 (DEBUG) 5 (INFO) ###"
60101

61102
clean: clean_all # to avoid overriding clean target
62103

63104
clean_all:
64105
echo "Cleaning at $(TOP)"
65106
rm -f lib*.a
66107
rm -f $(PROGRAM)
67-
rm -rf $(OBJ_DIR)
108+
rm -rf $(APP_OBJ_DIR)
109+
rm -rf $(TEST_OBJ_DIR)
110+
rm -rf $(VAL_OBJ_DIR)
68111
rm -rf $(PLATFORM_OBJ_DIR)
69112

70113
.PHONY: check_requirements

README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# System Control and Management Interface Compliance Suite
2+
3+
## Introduction
4+
**System Control and Management Interface** (SCMI) is a set of operating system-independent software interfaces that are used in system management.
5+
6+
For more information, download the [SCMI Platform Design Document](http://infocenter.arm.com/help/topic/com.arm.doc.den0056b/DEN0056B_System_Control_and_Management_Interface_v2_0.pdf).
7+
8+
## SCMI compliance suite
9+
SCMI compliance suite is a collection of self-checking, portable C tests. It enables adopters of SCMI PDD \(Platform Design Document\) to test their own implementations. It provides a predefined library of tests and a test framework to execute these tests. The test suite can be adapted to different platforms. It also enables the extension of the current test library to include platform-specific custom commands and custom protocols.
10+
11+
## Release details
12+
- Code quality: REL v2.0 Alpha.
13+
- The tests are written for version 2.0 of the SCMI PDD.
14+
- The compliance suite maintains backward compatibility with version 1.0 of the SCMI PDD.
15+
- The compliance suite is not a substitute for design verification.
16+
- Refer to the [Test checklist] for the scenarios covered by the tests.
17+
18+
## GitHub branch
19+
20+
To get the latest version of the code with bug fixes and new features, use the master branch.
21+
22+
## Test scenarios
23+
24+
The mapping of the SCMI commands to the test cases are mentioned in the [Test checklist].
25+
26+
## Future enhancements
27+
28+
The following features or capability additions are planned as part of future releases:
29+
- Testing notifications and delayed responses for relevant commands.
30+
- Test library extension with new test cases for additional protocols as defined in the newer version of the PDD.
31+
32+
## Getting started
33+
See the [User Guide] for instructions to adapt, build, and run the test suite.
34+
35+
### Additional reading
36+
For details on the design of the SCMI test suite, see the [Validation Methodology Document].
37+
38+
## License
39+
The software is provided under Apache 2.0 [License]. Contributions to this project are accepted under the same license.
40+
41+
## Feedback and support
42+
Arm values and welcomes any feedback and contributions to this project.
43+
44+
* For feedback, use the issue tracker that is associated with this project [Issue Tracker](https://github.com/ARM-software/scmi-tests/issues).
45+
* For support, send your queries to [support-scmi-acs@arm.com](mailto:support-scmi-acs@arm.com).
46+
* Arm licensees can contact Arm directly through their partner managers.
47+
* Arm welcomes code contributions through GitHub pull requests.
48+
49+
50+
- - - - - - - - - - - - - - - - - - - -
51+
52+
_Copyright (c) 2019, Arm Limited and Contributors. All rights reserved._
53+
54+
[User Guide]: ./docs/user_guide.md "SCMI Test Suite User Guide"
55+
[Validation Methodology Document]: ./docs/Arm_SCMI_Validation_Methodology.pdf "SCMI Test Suite Design"
56+
[Test checklist]: ./docs/scmi_testlist.md "SCMI Test Specification"
57+
[License]: ./LICENSE.md "License"

acknowledgements.md

Lines changed: 0 additions & 12 deletions
This file was deleted.
384 KB
Binary file not shown.
Lines changed: 16 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
**Guide for testing on Juno ADP**
1+
**Guide for testing on SGM platforms**
22
=================================
33

44
Table of Contents:
55
- [Introduction](#introduction)
6-
- [Juno ADP software stack](#juno-adp-software-stack)
6+
- [Software stack](#software-stack)
77
- [Linux kernel](#linux-kernel)
88
* [Mailbox test driver](#mailbox-test-driver)
99
* [Doorbell support patches for mailbox](#doorbell-support-patches-for-mailbox)
@@ -12,54 +12,27 @@ Table of Contents:
1212

1313
Introduction
1414
-------
15-
This document lists the instructions that must be followed to enable the Juno Linux image to run SCMI Linux application using the mailbox test driver interface.
15+
This document lists the instructions that must be followed to run SCMI ACS as Linux application using the mailbox test driver interface on SGM platforms.
16+
For an introduction to the System Guidance for Mobile (SGM) platforms, please refer to the [Arm Developer documentation].
1617

17-
Juno ADP software stack
18+
Software Stack
1819
-------
19-
The [Arm connected community] maintains the information about the software stack support for Juno Arm Development Platform (ADP).
20+
Arm provides a [super-project] with guides for building and running a full software stack on Arm platforms. This project provides a convenient wrapper around the various build systems involved in the software stack. Please contact Arm for support on software stack for SGM platform.
2021

21-
Linux kernel
22+
Linux kernel
2223
-------
23-
The following changes must be made in the Linux kernel source code.
24+
The following changes must be made in the Linux kernel source code after downloading software stack for SGM.
2425

2526
### Mailbox test driver
26-
To use SCMI test agent on Juno platform, the Linux kernel must be rebuilt to include the mailbox test driver with mailbox doorbell support and additional changes. Doorbell support patches for mailbox and additional changes to enable mailbox test driver are tested against Linux kernel version 4.13.
27+
To use SCMI test agent on SGM platform, the Linux kernel must be rebuilt to include the mailbox test driver with mailbox doorbell support and additional changes. Doorbell support patches for mailbox and additional changes to enable mailbox test driver are tested against Linux kernel version 4.13.
2728

2829
### Doorbell support patches for mailbox
29-
The doorbell support for mailbox driver is enabled by applying a patch series that is currently discussed in LKML. For more information, see [Mailbox doorbell support patches]. Pick up the relevant mailbox patches from [Mailbox doorbell support repo]. These patches must be applied to the Juno mainline tracker kernel. The kernel can be downloaded using the steps that are mentioned on [Arm connected community].
30+
The doorbell support for mailbox driver is enabled by applying a patch series that is currently discussed in LKML. For more information, see [Mailbox doorbell support patches]. Pick up the relevant mailbox patches from [Mailbox doorbell support repo]. These patches must be applied to the linux kernel.
3031

3132
### Additional changes to enable mailbox test driver
3233
In addition to applying the patches, follow these steps before starting the kernel build.
3334

34-
`Enable mailbox test driver`: By default, Juno ADP kernels do not have the mailbox test driver enabled. Set CONFIG_MAILBOX_TEST=y in kernel config to include mailbox test driver in the kernel.
35-
36-
`Update device tree`: The Juno device trees currently have a node describing mailbox prior to the doorbell mode support. Also, the current device trees do not have a node describing the mailbox test. <br>
37-
You must do the following in arch/arm64/boot/dts/arm/juno-base.dtsi. Replace existing node describing mailbox with the following:
38-
39-
```
40-
mailbox: mhu@2b1f0000 {
41-
compatible = "arm,mhu-doorbell", "arm,primecell";
42-
reg = <0x0 0x2b1f0000 0x0 0x1000>;
43-
interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>,
44-
<GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
45-
interrupt-names = "mhu_lpri_rx",
46-
"mhu_hpri_rx";
47-
#mbox-cells = <2>;
48-
mbox-name = "ARM-MHU";
49-
clocks = <&soc_refclk100mhz>;
50-
clock-names = "apb_pclk";
51-
};
52-
```
53-
Then, add a new node describing the mailbox test as shown below:
54-
55-
```
56-
mailbox-test@2e000000 {
57-
compatible = "mailbox-test";
58-
mbox-names = "tx";
59-
mboxes = <&mailbox 0 0>;
60-
reg = <0x0 0x2e000000 0x0 0x80>, <0x0 0x2e000000 0x0 0x80>;
61-
};
62-
```
35+
`Enable mailbox test driver`: Set CONFIG_MAILBOX_TEST=y in kernel config to include mailbox test driver in the kernel.
6336

6437
`Modify mailbox driver to prevent format conversion`: The current version of mailbox driver always converts raw binary data to hex format. For SCMI test agent, we expect raw data unmodified for processing. The change that is shown below prevents the format change.
6538
<br> The driver support to add this as a configurable option is planned for the future.
@@ -85,15 +58,16 @@ waitq_err:
8558
The current change in mailbox test driver is not an ideal solution. A better solution is to use sysfs entry for configurability. This enhancement will be upstreamed in the future, thereby making this change redundant.
8659

8760
## Kernel build
88-
Build the kernel and device tree after making the changes for Juno ADP, and flash the images in target.
61+
Build the kernel and device tree after making the changes and use the run-scripts for running the SGM
8962

90-
For instructions to build the test suite for arm/juno platform and running it, see relevant sections in [User Guide].
63+
For instructions to build the test suite for sgm platform and running it, see relevant sections in [User Guide].
9164

9265
- - - - - - - - - - - - - - - -
9366

94-
_Copyright (c) 2017, Arm Limited and Contributors. All rights reserved._
67+
_Copyright (c) 2019, Arm Limited and Contributors. All rights reserved._
9568

96-
[ARM connected community]: https://community.arm.com/dev-platforms
69+
[ARM Developer documentation]: https://developer.arm.com/tools-and-software/simulation-models/fixed-virtual-platforms
9770
[Mailbox doorbell support patches]: https://lkml.org/lkml/2017/5/24/339
9871
[Mailbox doorbell support repo]: https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git/log/?h=scmi_mhu_dt_changes
9972
[User Guide]: ./user_guide.md
73+
[super-project]: https://git.linaro.org/landing-teams/working/arm/arm-reference-platforms.git/about/docs/user-guide.rst

0 commit comments

Comments
 (0)