Hi,
Please find the latest report on new defect(s) introduced to ARM-software/arm-trusted-firmware found with Coverity Scan.
1 new defect(s) introduced to ARM-software/arm-trusted-firmware found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)
** CID 370380: Code maintainability issues (UNUSED_VALUE)
/plat/xilinx/versal/pm_service/pm_svc_main.c: 96 in pm_setup()
________________________________________________________________________________________________________
*** CID 370380: Code maintainability issues (UNUSED_VALUE)
/plat/xilinx/versal/pm_service/pm_svc_main.c: 96 in pm_setup()
90 int status, ret = 0;
91
92 status = pm_ipi_init(primary_proc);
93
94 if (status < 0) {
95 INFO("BL31: PM Service Init Failed, Error Code %d!\n", status);
>>> CID 370380: Code maintainability issues (UNUSED_VALUE)
>>> Assigning value from "status" to "ret" here, but that stored value is overwritten before it can be used.
96 ret = status;
97 } else {
98 pm_up = true;
99 }
100
101 /*
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P…
Hi,
Just my two cents:
- I suggest using $() instead of the backtick operator to enhance readability. This means f=`git rev-parse --git-dir` becomes f=$(git rev-parse --git-dir)
- use {} to group commands instead of () (no sub-shell is needed)
- stop processing if curl fails (hence second {} block)
- if the repo path has spaces, then some quotes are missing
So finally the command would become:
git clone --recurse-submodules https://git.trustedfirmware.org/hafnium/hafnium.git && { cd hafnium && f="$(git rev-parse --git-dir)"; curl -Lo "$f/hooks/commit-msg" https://review.trustedfirmware.org/tools/hooks/commit-msg && { chmod +x "$f/hooks/commit-msg"; git submodule --quiet foreach "cp \"\$toplevel/$f/hooks/commit-msg\" \"\$toplevel/$f/modules/\$path/hooks/commit-msg\"" ; } ; }
/George
-----Original Message-----
From: Hafnium <hafnium-bounces(a)lists.trustedfirmware.org> On Behalf Of Olivier Deprez via Hafnium
Sent: 21 April 2021 19:12
To: Rebecca Cran <rebecca(a)bsdio.com>; hafnium(a)lists.trustedfirmware.org
Subject: Re: [Hafnium] Getting Started page: problem with the command under "Getting the source code"
Hi,
Ah sorry for that; looks like there's some variable escape problem.
I tried this with success, let me know if it works for you. I will update the doc page then.
git clone --recurse-submodules https://git.trustedfirmware.org/hafnium/hafnium.git && (cd hafnium && f=`git rev-parse --git-dir`; curl -Lo $f/hooks/commit-msg https://review.trustedfirmware.org/tools/hooks/commit-msg; chmod +x $f/hooks/commit-msg; git submodule --quiet foreach "cp \$toplevel/$f/hooks/commit-msg \$toplevel/$f/modules/\$path/hooks/commit-msg")
If you don't require the git hooks a simpler way to clone the project can be:
git clone "https://review.trustedfirmware.org/hafnium/hafnium"; cd hafnium git submodule update --init
Regards,
Olivier.
________________________________________
From: Rebecca Cran <rebecca(a)bsdio.com>
Sent: 21 April 2021 16:33
To: Olivier Deprez; hafnium(a)lists.trustedfirmware.org
Subject: Re: [Hafnium] Getting Started page: problem with the command under "Getting the source code"
It now exits with the message:
cp: cannot stat '/home/rebecca/src/uefi/tmp/hafnium//hooks/commit-msg':
No such file or directory
fatal: run_command returned non-zero status for driver/linux .
--
Rebecca Cran
On 4/21/21 2:23 AM, Olivier Deprez wrote:
> Hi Rebecca,
>
> Thanks for reporting.
>
> Can you try with the updated command:
> https://review.trustedfirmware.org/plugins/gitiles/hafnium/hafnium/+/r
> efs/changes/31/9731/1/docs/GettingStarted.md
>
> Thanks, Olivier.
>
>
> ________________________________________
> From: Hafnium <hafnium-bounces(a)lists.trustedfirmware.org> on behalf of
> Rebecca Cran via Hafnium <hafnium(a)lists.trustedfirmware.org>
> Sent: 21 April 2021 04:39
> To: hafnium(a)lists.trustedfirmware.org
> Subject: [Hafnium] Getting Started page: problem with the command under "Getting the source code"
>
> On the Getting Started document
> (https://review.trustedfirmware.org/plugins/gitiles/hafnium/hafnium/+/
> HEAD/docs/GettingStarted.md) there's a command listed to get the
> source code:
>
> git clone --recurse-submodules
> https://git.trustedfirmware.org/hafnium/hafnium.git && (cd hafnium &&
> f=`git rev-parse --git-dir`/hooks/commit-msg ; curl -Lo $f
> https://review.trustedfirmware.org/tools/hooks/commit-msg ; chmod +x
> $f ; for m in `git rev-parse --git-dir`/modules/*; do cp $f
> $m/hooks/commit-msg; done)
>
>
> However, on my system it's erroring out because the 'hooks' directory
> it tries to write to doesn't exist:
>
> % Total % Received % Xferd Average Speed Time Time Time
> Current
> Dload Upload Total Spent Left Speed
> 100 2174 100 2174 0 0 4221 0 --:--:-- --:--:--
> --:--:-- 4221
> cp: cannot create regular file '.git/modules/driver/hooks/commit-msg':
> No such file or directory
> cp: cannot create regular file '.git/modules/project/hooks/commit-msg':
> No such file or directory
> cp: cannot create regular file
> '.git/modules/third_party/hooks/commit-msg': No such file or directory
>
>
> --
> Rebecca Cran
>
> --
> Hafnium mailing list
> Hafnium(a)lists.trustedfirmware.org
> https://lists.trustedfirmware.org/mailman/listinfo/hafnium
>
--
Hafnium mailing list
Hafnium(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/hafnium
This event has been canceled with this note:
"Cancelled per Joanna"
Title: TF-A Tech Forum
We run an open technical forum call for anyone to participate and it is not
restricted to Trusted Firmware project members. It will operate under the
guidance of the TF TSC. Feel free to forward this invite to
colleagues. Invites are via the TF-A mailing list and also published on the
Trusted Firmware website. Details are
here: https://www.trustedfirmware.org/meetings/tf-a-technical-forum/Tr…
Firmware is inviting you to a scheduled Zoom meeting.Join Zoom
Meetinghttps://zoom.us/j/9159704974Meeting ID: 915 970 4974One tap
mobile+16465588656,,9159704974# US (New York)+16699009128,,9159704974# US
(San Jose)Dial by your location +1 646 558
8656 US (New York) +1 669 900
9128 US (San Jose) 877 853 5247 US
Toll-free 888 788 0099 US Toll-freeMeeting ID:
915 970 4974Find your local
number: https://zoom.us/u/ad27hc6t7h
When: Thu Apr 22, 2021 8am – 9am Mountain Standard Time - Phoenix
Calendar: tf-a(a)lists.trustedfirmware.org
Who:
* Bill Fletcher - creator
* marek.bykowski(a)gmail.com
* okash.khawaja(a)gmail.com
* tf-a(a)lists.trustedfirmware.org
Invitation from Google Calendar: https://calendar.google.com/calendar/
You are receiving this courtesy email at the account
tf-a(a)lists.trustedfirmware.org because you are an attendee of this event.
To stop receiving future updates for this event, decline this event.
Alternatively you can sign up for a Google account at
https://calendar.google.com/calendar/ and control your notification
settings for your entire calendar.
Forwarding this invitation could allow any recipient to send a response to
the organizer and be added to the guest list, or invite others regardless
of their own invitation status, or to modify your RSVP. Learn more at
https://support.google.com/calendar/answer/37135#forwarding
Hi Everyone,
I am cancelling this weeks TF-A Tech Forum as I don’t have any areas to present/discuss. I would encourage any contributors that wants to present or lead a discussion subject to please let me know as we are always looking for topics of interest to the project community to run sessions on.
Cancellations of the calendar invite will come from trustedformware.org.
Thanks
Joanna
Hi
There is a discussion started by Harb from Ampere about standardizing
information from secure firmware to BL33: look at HOB in the object.
A side aspect of the HOB is: DT shall be used wisely for things that are
really static. Dynamic (such as plugged DIMMs) or configurable aspects
(secure memory size) should be controllable by a single authoritative
entity. On a number of platforms, the definition of secure memory size is
"copied" in at least for different independent projects which make it a
nightmare for product makers to choose a size for the trusted application
they want to onboard.
Cheers
FF
On Tue, 20 Apr 2021 at 07:49, Jan Kiszka via TF-A <
tf-a(a)lists.trustedfirmware.org> wrote:
> On 20.04.21 02:51, Samuel Holland wrote:
> > On 4/19/21 11:11 AM, Jan Kiszka via TF-A wrote:
> >> On 19.04.21 17:21, Michal Simek wrote:
> >>> On 4/18/21 8:44 PM, Jan Kiszka wrote:
> >>>> when SPD or DEBUG is enabled, TF-A is moved to RAM on the zynqmp (as
> it
> >>>> longer fits into OCM). U-Boot happens to avoid that region, but the
> >>>> kernel's DTB has no reservation entry, and Linux will trigger an
> >>>> exception when accessing that region during early boot.
> >>>>
> >>>> Can we improve this - without requiring the user to manually add a
> >>>> reservation to the DTB? Should we unconditionally reserve
> >>>> 0x1000..0x7ffff in all BL33 DTBs? Or is there a chance to communicate
> >>>> that need? Or some way to detect in BL33 whether it is needed?
> >>>
> >>> Normally this ddr region should be also protected by security IPs that
> >>> NS has no access there.
> >>> It means in Xilinx flow this can be (and should be) propagated via
> >>> device-tree generator to final DTS file that you don't need to touch it
> >>> by hand.
> >>> I am not aware about any way that NS can query secure world what memory
> >>> can be used. And not sure if there is any standard way to do so.
> >>>
> >>
> >> OK, understood. But then, to be safe, shouldn't the upstream "static"
> >> default DT contain an exclusion of that region so that it won't get
> >> stuck if it is in use? Would block half a meg, but when you have a
> >> custom platform that does not need that, you can and will provide your
> >> own DT anyway.
> >
> > Ideally, the static DTS is a description of the hardware only, and not
> > of runtime constraints imposed by the firmware. If BL31 needs to reserve
> > some memory, it can add that reservation to the DTB at runtime. The
> > fdt_add_reserved_memory() function is available for this purpose. For an
> > example, see the code used by the rpi4[0] or sun50i_h616[1] platforms.
> >
> > If you later load a DTB from disk for use by Linux, you will need to
> > copy the reserved-memory nodes from the U-Boot DTB to the loaded DTB.
> >
>
> I know the RPi4 model (just had to debug it [3]). But I wonder if that
> is possible on the zynqmp as well. Are we passing a DT to BL33 here
> already and, thus, could inject that reservation?
>
> Jan
>
> > Regards,
> > Samuel
> >
> > [0]:
> >
> https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tree/plat/rpi/r…
> > [1]:
> >
> https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tree/plat/allwi…
> >
>
> [3] https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/9316
> --
> TF-A mailing list
> TF-A(a)lists.trustedfirmware.org
> https://lists.trustedfirmware.org/mailman/listinfo/tf-a
>
--
François-Frédéric Ozog | *Director Linaro Edge & Fog Computing Group*
T: +33.67221.6485
francois.ozog(a)linaro.org | Skype: ffozog
Hi,
This looks promising. Can you also create a list of guidelines resulting from the analysis? We can then roll them up as coding guidelines or design guidelines or to-do for platforms.
-Varun
From: TF-A <tf-a-bounces(a)lists.trustedfirmware.org> On Behalf Of Zelalem Aweke via TF-A
Sent: Friday, April 16, 2021 8:15 AM
To: tf-a(a)lists.trustedfirmware.org
Subject: [TF-A] [RFC] TF-A threat model
External email: Use caution opening links or attachments
Hi All,
We are releasing the first TF-A threat model document. This release provides the baseline for future updates to be applied as required by developments to the TF-A code base. Please review the document provide comments here: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/9627<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Freview.tr…>.
Thanks,
Zelalem
Hi,
>From git log g12a platform was first introduced in 2019 and never has any further changes, also there is no documentation for this platform, so from platform perspective not sure if you are doing everything right or not ?
However, i have some generic comments
1. There is no such macro DISABLE_PEDANTIC
2. Which CPU you have in Odroid-C4 boards(is it Cortext-A55?), You probably need to add cpu lib file in platform.mk file
In file plat/amlogic/g12a/platform.mk
BL31_SOURCES += lib/cpus/aarch64/cortex_a53.S \
lib/cpus/aarch64/cortex_a55.S
thanks
Manish
________________________________
From: TF-A <tf-a-bounces(a)lists.trustedfirmware.org> on behalf of Matwey V. Kornilov via TF-A <tf-a(a)lists.trustedfirmware.org>
Sent: 19 April 2021 16:47
To: tf-a(a)lists.trustedfirmware.org <tf-a(a)lists.trustedfirmware.org>
Subject: [TF-A] platform g12a: CSSERT: File lib/cpus/aarch64/cpu_helpers.S Line 00035
Hello,
Sorry, if this is the wrong place to ask.
I am trying to run ATF v2.4 for platform g12a on the Odroid-C4 board.
I've built ATF as the following
make DISABLE_PEDANTIC=1 DEBUG=1 PLAT=g12a
Unfortunately, the only thing I see in the console when BL31 is
supposed to run is
CSSERT: File lib/cpus/aarch64/cpu_helpers.S Line 00035
Is there any chance to figure out what is wrong?
--
With best regards,
Matwey V. Kornilov
--
TF-A mailing list
TF-A(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-a
Hi all,
when SPD or DEBUG is enabled, TF-A is moved to RAM on the zynqmp (as it
longer fits into OCM). U-Boot happens to avoid that region, but the
kernel's DTB has no reservation entry, and Linux will trigger an
exception when accessing that region during early boot.
Can we improve this - without requiring the user to manually add a
reservation to the DTB? Should we unconditionally reserve
0x1000..0x7ffff in all BL33 DTBs? Or is there a chance to communicate
that need? Or some way to detect in BL33 whether it is needed?
Jan
Hello,
Sorry, if this is the wrong place to ask.
I am trying to run ATF v2.4 for platform g12a on the Odroid-C4 board.
I've built ATF as the following
make DISABLE_PEDANTIC=1 DEBUG=1 PLAT=g12a
Unfortunately, the only thing I see in the console when BL31 is
supposed to run is
CSSERT: File lib/cpus/aarch64/cpu_helpers.S Line 00035
Is there any chance to figure out what is wrong?
--
With best regards,
Matwey V. Kornilov
Thanks to all those who attended the Tech Forum today!
It’s become apparent that the initial 2 week deadline for alternative proposals or implementations is too short, so – as agreed – we’ll push the deadline for the investigation period to the end of March. This period is dedicated to evaluating the changelog automation proposal made, or to identifying alternative solutions. If you have an alternative proposal, any proof-of-concept tooling would be highly appreciated so we can get a clear idea of what sort of work and maintenance is going to be involved.
If you do find a solution you wish to propose, please give it just a short name (e.g. “Update it manually”) and make it obvious you want to propose it formally – I’ll collect up the proposals made on the mailing list thread at the end of March and set up a Wiki poll so we can get a clear picture of where the community wants to take this.
Chris
From: TF-A <tf-a-bounces(a)lists.trustedfirmware.org> on behalf of Chris Kay via TF-A <tf-a(a)lists.trustedfirmware.org>
Reply to: Chris Kay <Chris.Kay(a)arm.com>
Date: Thursday, 11 February 2021 at 13:59
To: "tf-a(a)lists.trustedfirmware.org" <tf-a(a)lists.trustedfirmware.org>
Subject: [TF-A] Adoption of Conventional Commits
Hi all,
Recently we had an internal discussion on the merits of introducing semantics to commit messages pushed to the main TF-A repository, the conclusion being that we would look to adopting the Conventional Commits<https://www.conventionalcommits.org/en/v1.0.0/> specification in the near future. There was one major reason for this, which was to help us in automating the changelog in future releases, but it might also help us to dramatically reduce the overall amount of work needed to make a formal release in the future.
This requires some buy-in (or buy-out, in this case) from maintainers because - even though it’s to only a relatively minor extent - it does involve an adjustment to everybody’s workflow. Notably, commit messages will be expected to adopt the structure defined by the specification, which will be enforced by the CI. Most commits that go upstream today adhere to “something that looks like Conventional Commits”, so the change is not exactly sweeping, but any change has the potential be an inconvenience.
With that in mind, I propose the following:
* We collectively adopt the specification, enforced only for @arm.com contributors until such a time that the majority of maintainers are familiar with the new demands
* We suggest - in the prerequisites documentation - the installation of two helper tools:
* Commitizen<https://github.com/commitizen/cz-cli>
* Commitlint<https://github.com/conventional-changelog/commitlint>
Installation of these tools will be optional, but I believe they can help with the transition. In the patches currently in review, they are installed as Git hooks automatically upon execution of npm install, so it requires no manual installation or configuration (other than a relatively up-to-date Node.js installation).
You’ll find the patches here<https://review.trustedfirmware.org/q/topic:%22ck%252Fconventional-commits%2…>, and specifically the changes to the prerequisites documentation here<https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/8224/1/docs/…>. Feel free to review these changes if you have comments specifically on their implementation.
Let me know if you have any questions or concerns. If everybody’s on board, we can look to have this upstreamed shortly.
Chris