{"action":"created","comment":{"url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/pulls/comments/31312182","id":31312182,"diff_hunk":"@@ -0,0 +1,95 @@\n+/*\n+ * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved.\n+ *\n+ * Redistribution and use in source and binary forms, with or without\n+ * modification, are permitted provided that the following conditions are met:\n+ *\n+ * Redistributions of source code must retain the above copyright notice, this\n+ * list of conditions and the following disclaimer.\n+ *\n+ * Redistributions in binary form must reproduce the above copyright notice,\n+ * this list of conditions and the following disclaimer in the documentation\n+ * and/or other materials provided with the distribution.\n+ *\n+ * Neither the name of ARM nor the names of its contributors may be used\n+ * to endorse or promote products derived from this software without specific\n+ * prior written permission.\n+ *\n+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n+ * POSSIBILITY OF SUCH DAMAGE.\n+ */\n+\n+#include <arch_helpers.h>\n+#include <assert.h>\n+#include <bl_common.h>\n+#include <debug.h>\n+#include <gic_v2.h>\n+#include <interrupt_mgmt.h>\n+#include <platform.h>\n+#include <stdint.h>\n+#include <tegra_private.h>\n+#include <tegra_def.h>\n+\n+/*******************************************************************************\n+ * Place the cpu interface in a state where it can never make a cpu exit wfi as\n+ * as result of an asserted interrupt. This is critical for powering down a cpu\n+ ******************************************************************************/\n+void gic_cpuif_deactivate(void)\n+{\n+\tunsigned int val;\n+\n+\t/* Disable secure, non-secure interrupts and disable their bypass */\n+\tval = gicc_read_ctlr(TEGRA_GICC_BASE);\n+\tval &= ~(ENABLE_GRP0 | ENABLE_GRP1);\n+\tval |= FIQ_BYP_DIS_GRP1 | FIQ_BYP_DIS_GRP0;\n+\tval |= IRQ_BYP_DIS_GRP0 | IRQ_BYP_DIS_GRP1;\n+\tgicc_write_ctlr(TEGRA_GICC_BASE, val);\n+}\n+\n+/*******************************************************************************\n+ * Enable secure interrupts and set the priority mask register to allow all\n+ * interrupts to trickle in.\n+ ******************************************************************************/\n+static void gic_cpuif_setup(unsigned int gicc_base)\n+{\n+\tgicc_write_ctlr(gicc_base, ENABLE_GRP0 | ENABLE_GRP1);\n+\tgicc_write_pmr(gicc_base, GIC_PRI_MASK);\n+}\n+\n+/*******************************************************************************\n+ * Global gic distributor setup which will be done by the primary cpu after a\n+ * cold boot. It marks out the non secure SPIs, PPIs & SGIs and enables them.\n+ * It then enables the secure GIC distributor interface.\n+ ******************************************************************************/\n+static void gic_distif_setup(unsigned int gicd_base)","path":"plat/nvidia/tegra/common/tegra_gic.c","position":73,"original_position":73,"commit_id":"0cb660e3cb2eacaaa2cc829fbc23e0a0f5591531","original_commit_id":"0cb660e3cb2eacaaa2cc829fbc23e0a0f5591531","user":{"login":"achingupta","id":5773549,"avatar_url":"https://avatars.githubusercontent.com/u/5773549?v=3","gravatar_id":"","url":"https://api.github.com/users/achingupta","html_url":"https://github.com/achingupta","followers_url":"https://api.github.com/users/achingupta/followers","following_url":"https://api.github.com/users/achingupta/following{/other_user}","gists_url":"https://api.github.com/users/achingupta/gists{/gist_id}","starred_url":"https://api.github.com/users/achingupta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/achingupta/subscriptions","organizations_url":"https://api.github.com/users/achingupta/orgs","repos_url":"https://api.github.com/users/achingupta/repos","events_url":"https://api.github.com/users/achingupta/events{/privacy}","received_events_url":"https://api.github.com/users/achingupta/received_events","type":"User","site_admin":false},"body":"Okie. I am worried about certain secure interrupts e.g. the Secure Physical Timer interrupt being marked as non-secure. Just a nit for future reference.","created_at":"2015-05-29T09:57:09Z","updated_at":"2015-05-29T09:57:09Z","html_url":"https://github.com/ARM-software/arm-trusted-firmware/pull/304#discussion_r31312182","pull_request_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/pulls/304","_links":{"self":{"href":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/pulls/comments/31312182"},"html":{"href":"https://github.com/ARM-software/arm-trusted-firmware/pull/304#discussion_r31312182"},"pull_request":{"href":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/pulls/304"}}},"pull_request":{"url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/pulls/304","id":35720270,"html_url":"https://github.com/ARM-software/arm-trusted-firmware/pull/304","diff_url":"https://github.com/ARM-software/arm-trusted-firmware/pull/304.diff","patch_url":"https://github.com/ARM-software/arm-trusted-firmware/pull/304.patch","issue_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/issues/304","number":304,"state":"closed","locked":false,"title":"Tegra SoC support v2","user":{"login":"vwadekar","id":3041253,"avatar_url":"https://avatars.githubusercontent.com/u/3041253?v=3","gravatar_id":"","url":"https://api.github.com/users/vwadekar","html_url":"https://github.com/vwadekar","followers_url":"https://api.github.com/users/vwadekar/followers","following_url":"https://api.github.com/users/vwadekar/following{/other_user}","gists_url":"https://api.github.com/users/vwadekar/gists{/gist_id}","starred_url":"https://api.github.com/users/vwadekar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vwadekar/subscriptions","organizations_url":"https://api.github.com/users/vwadekar/orgs","repos_url":"https://api.github.com/users/vwadekar/repos","events_url":"https://api.github.com/users/vwadekar/events{/privacy}","received_events_url":"https://api.github.com/users/vwadekar/received_events","type":"User","site_admin":false},"body":"Support for booting Trusted Firmware with Tegra T210 SoCs","created_at":"2015-05-19T11:29:19Z","updated_at":"2015-05-29T09:57:09Z","closed_at":"2015-05-29T07:04:45Z","merged_at":null,"merge_commit_sha":"862a0b491643ba9c2ff2eacc57a9dee504dc7347","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/pulls/304/commits","review_comments_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/pulls/304/comments","review_comment_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/issues/304/comments","statuses_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/statuses/0cb660e3cb2eacaaa2cc829fbc23e0a0f5591531","head":{"label":"vwadekar:tegra-soc-support-v2","ref":"tegra-soc-support-v2","sha":"0cb660e3cb2eacaaa2cc829fbc23e0a0f5591531","user":{"login":"vwadekar","id":3041253,"avatar_url":"https://avatars.githubusercontent.com/u/3041253?v=3","gravatar_id":"","url":"https://api.github.com/users/vwadekar","html_url":"https://github.com/vwadekar","followers_url":"https://api.github.com/users/vwadekar/followers","following_url":"https://api.github.com/users/vwadekar/following{/other_user}","gists_url":"https://api.github.com/users/vwadekar/gists{/gist_id}","starred_url":"https://api.github.com/users/vwadekar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vwadekar/subscriptions","organizations_url":"https://api.github.com/users/vwadekar/orgs","repos_url":"https://api.github.com/users/vwadekar/repos","events_url":"https://api.github.com/users/vwadekar/events{/privacy}","received_events_url":"https://api.github.com/users/vwadekar/received_events","type":"User","site_admin":false},"repo":{"id":32440903,"name":"arm-trusted-firmware","full_name":"vwadekar/arm-trusted-firmware","owner":{"login":"vwadekar","id":3041253,"avatar_url":"https://avatars.githubusercontent.com/u/3041253?v=3","gravatar_id":"","url":"https://api.github.com/users/vwadekar","html_url":"https://github.com/vwadekar","followers_url":"https://api.github.com/users/vwadekar/followers","following_url":"https://api.github.com/users/vwadekar/following{/other_user}","gists_url":"https://api.github.com/users/vwadekar/gists{/gist_id}","starred_url":"https://api.github.com/users/vwadekar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vwadekar/subscriptions","organizations_url":"https://api.github.com/users/vwadekar/orgs","repos_url":"https://api.github.com/users/vwadekar/repos","events_url":"https://api.github.com/users/vwadekar/events{/privacy}","received_events_url":"https://api.github.com/users/vwadekar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vwadekar/arm-trusted-firmware","description":"NVIDIA's fork of the ARM Trusted Firmware","fork":true,"url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware","forks_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/forks","keys_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/teams","hooks_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/hooks","issue_events_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/issues/events{/number}","events_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/events","assignees_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/assignees{/user}","branches_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/branches{/branch}","tags_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/tags","blobs_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/git/refs{/sha}","trees_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/statuses/{sha}","languages_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/languages","stargazers_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/stargazers","contributors_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/contributors","subscribers_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/subscribers","subscription_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/subscription","commits_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/commits{/sha}","git_commits_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/git/commits{/sha}","comments_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/comments{/number}","issue_comment_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/issues/comments{/number}","contents_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/contents/{+path}","compare_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/merges","archive_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/downloads","issues_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/issues{/number}","pulls_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/pulls{/number}","milestones_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/milestones{/number}","notifications_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/labels{/name}","releases_url":"https://api.github.com/repos/vwadekar/arm-trusted-firmware/releases{/id}","created_at":"2015-03-18T06:01:21Z","updated_at":"2015-04-02T09:04:28Z","pushed_at":"2015-05-29T07:02:14Z","git_url":"git://github.com/vwadekar/arm-trusted-firmware.git","ssh_url":"git@github.com:vwadekar/arm-trusted-firmware.git","clone_url":"https://github.com/vwadekar/arm-trusted-firmware.git","svn_url":"https://github.com/vwadekar/arm-trusted-firmware","homepage":"","size":3917,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ARM-software:integration","ref":"integration","sha":"c163ec455b9f7432a8f677b8d35981e6d11b39cb","user":{"login":"ARM-software","id":5690313,"avatar_url":"https://avatars.githubusercontent.com/u/5690313?v=3","gravatar_id":"","url":"https://api.github.com/users/ARM-software","html_url":"https://github.com/ARM-software","followers_url":"https://api.github.com/users/ARM-software/followers","following_url":"https://api.github.com/users/ARM-software/following{/other_user}","gists_url":"https://api.github.com/users/ARM-software/gists{/gist_id}","starred_url":"https://api.github.com/users/ARM-software/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARM-software/subscriptions","organizations_url":"https://api.github.com/users/ARM-software/orgs","repos_url":"https://api.github.com/users/ARM-software/repos","events_url":"https://api.github.com/users/ARM-software/events{/privacy}","received_events_url":"https://api.github.com/users/ARM-software/received_events","type":"Organization","site_admin":false},"repo":{"id":13740589,"name":"arm-trusted-firmware","full_name":"ARM-software/arm-trusted-firmware","owner":{"login":"ARM-software","id":5690313,"avatar_url":"https://avatars.githubusercontent.com/u/5690313?v=3","gravatar_id":"","url":"https://api.github.com/users/ARM-software","html_url":"https://github.com/ARM-software","followers_url":"https://api.github.com/users/ARM-software/followers","following_url":"https://api.github.com/users/ARM-software/following{/other_user}","gists_url":"https://api.github.com/users/ARM-software/gists{/gist_id}","starred_url":"https://api.github.com/users/ARM-software/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARM-software/subscriptions","organizations_url":"https://api.github.com/users/ARM-software/orgs","repos_url":"https://api.github.com/users/ARM-software/repos","events_url":"https://api.github.com/users/ARM-software/events{/privacy}","received_events_url":"https://api.github.com/users/ARM-software/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ARM-software/arm-trusted-firmware","description":"ARM Trusted Firmware","fork":false,"url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware","forks_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/forks","keys_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/teams","hooks_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/hooks","issue_events_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/issues/events{/number}","events_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/events","assignees_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/assignees{/user}","branches_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/branches{/branch}","tags_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/tags","blobs_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/git/refs{/sha}","trees_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/statuses/{sha}","languages_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/languages","stargazers_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/stargazers","contributors_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/contributors","subscribers_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/subscribers","subscription_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/subscription","commits_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/commits{/sha}","git_commits_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/git/commits{/sha}","comments_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/comments{/number}","issue_comment_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/issues/comments{/number}","contents_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/contents/{+path}","compare_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/merges","archive_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/downloads","issues_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/issues{/number}","pulls_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/pulls{/number}","milestones_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/milestones{/number}","notifications_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/labels{/name}","releases_url":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/releases{/id}","created_at":"2013-10-21T11:39:00Z","updated_at":"2015-05-19T06:39:19Z","pushed_at":"2015-05-29T09:02:50Z","git_url":"git://github.com/ARM-software/arm-trusted-firmware.git","ssh_url":"git@github.com:ARM-software/arm-trusted-firmware.git","clone_url":"https://github.com/ARM-software/arm-trusted-firmware.git","svn_url":"https://github.com/ARM-software/arm-trusted-firmware","homepage":null,"size":7266,"stargazers_count":71,"watchers_count":71,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":91,"mirror_url":null,"open_issues_count":6,"forks":91,"open_issues":6,"watchers":71,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/pulls/304"},"html":{"href":"https://github.com/ARM-software/arm-trusted-firmware/pull/304"},"issue":{"href":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/issues/304"},"comments":{"href":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/issues/304/comments"},"review_comments":{"href":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/pulls/304/comments"},"review_comment":{"href":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/pulls/304/commits"},"statuses":{"href":"https://api.github.com/repos/ARM-software/arm-trusted-firmware/statuses/0cb660e3cb2eacaaa2cc829fbc23e0a0f5591531"}}}}