{"action":"created","comment":{"url":"https://api.github.com/repos/OP-TEE/optee_os/pulls/comments/73383401","id":73383401,"diff_hunk":"@@ -0,0 +1,96 @@\n+/*\n+ * Copyright (c) 2015, Linaro Limited\n+ * 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+ * 1. Redistributions of source code must retain the above copyright notice,\n+ * this list of conditions and the following disclaimer.\n+ *\n+ * 2. 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+ * 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 <console.h>\n+#include <drivers/hi16xx_uart.h>\n+#include <kernel/generic_boot.h>\n+#include <kernel/panic.h>\n+#include <kernel/pm_stubs.h>\n+#include <mm/tee_pager.h>\n+#include <mm/core_memprot.h>\n+#include <platform_config.h>\n+#include <stdint.h>\n+#include <tee/entry_std.h>\n+#include <tee/entry_fast.h>\n+\n+static void main_fiq(void);\n+\n+static const struct thread_handlers handlers = {\n+\t.std_smc = tee_entry_std,\n+\t.fast_smc = tee_entry_fast,\n+\t.fiq = main_fiq,\n+\t.cpu_on = cpu_on_handler,\n+\t.cpu_off = pm_do_nothing,\n+\t.cpu_suspend = pm_do_nothing,\n+\t.cpu_resume = pm_do_nothing,\n+\t.system_off = pm_do_nothing,\n+\t.system_reset = pm_do_nothing,\n+};\n+\n+register_phys_mem(MEM_AREA_IO_NSEC, CONSOLE_UART_BASE, HI16XX_UART_REG_SIZE);\n+\n+const struct thread_handlers *generic_boot_get_handlers(void)\n+{\n+\treturn &handlers;\n+}\n+\n+static void main_fiq(void)\n+{\n+\tpanic();\n+}\n+\n+static vaddr_t console_base(void)\n+{\n+\tstatic void *va;\n+\n+\tif (cpu_mmu_enabled()) {\n+\t\tif (!va)\n+\t\t\tva = phys_to_virt(CONSOLE_UART_BASE, MEM_AREA_IO_NSEC);\n+\t\treturn (vaddr_t)va;\n+\t}\n+\treturn CONSOLE_UART_BASE;\n+}\n+\n+void console_init(void)\n+{\n+\thi16xx_uart_init(console_base(), CONSOLE_UART_CLK_IN_HZ,\n+\t\t\t CONSOLE_BAUDRATE);\n+}\n+\n+void console_putc(int ch)\n+{\n+\tvaddr_t base = console_base();\n+\n+\thi16xx_uart_putc(ch, base);","path":"core/arch/arm/plat-d02/main.c","position":88,"original_position":88,"commit_id":"1f7b6afbd6f5091b28cc6f72399f9e95dcc85889","original_commit_id":"9344b1d0f4b37dfdef8b911a48a522e6b678fe33","user":{"login":"d3zd3z","id":90349,"avatar_url":"https://avatars.githubusercontent.com/u/90349?v=3","gravatar_id":"","url":"https://api.github.com/users/d3zd3z","html_url":"https://github.com/d3zd3z","followers_url":"https://api.github.com/users/d3zd3z/followers","following_url":"https://api.github.com/users/d3zd3z/following{/other_user}","gists_url":"https://api.github.com/users/d3zd3z/gists{/gist_id}","starred_url":"https://api.github.com/users/d3zd3z/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d3zd3z/subscriptions","organizations_url":"https://api.github.com/users/d3zd3z/orgs","repos_url":"https://api.github.com/users/d3zd3z/repos","events_url":"https://api.github.com/users/d3zd3z/events{/privacy}","received_events_url":"https://api.github.com/users/d3zd3z/received_events","type":"User","site_admin":false},"body":"Created [Fix \"\\n\\r\"](https://github.com/OP-TEE/optee_os/issues/962) issue.","created_at":"2016-08-03T17:45:27Z","updated_at":"2016-08-03T17:45:27Z","html_url":"https://github.com/OP-TEE/optee_os/pull/961#discussion_r73383401","pull_request_url":"https://api.github.com/repos/OP-TEE/optee_os/pulls/961","_links":{"self":{"href":"https://api.github.com/repos/OP-TEE/optee_os/pulls/comments/73383401"},"html":{"href":"https://github.com/OP-TEE/optee_os/pull/961#discussion_r73383401"},"pull_request":{"href":"https://api.github.com/repos/OP-TEE/optee_os/pulls/961"}}},"pull_request":{"url":"https://api.github.com/repos/OP-TEE/optee_os/pulls/961","id":79923385,"html_url":"https://github.com/OP-TEE/optee_os/pull/961","diff_url":"https://github.com/OP-TEE/optee_os/pull/961.diff","patch_url":"https://github.com/OP-TEE/optee_os/pull/961.patch","issue_url":"https://api.github.com/repos/OP-TEE/optee_os/issues/961","number":961,"state":"open","locked":false,"title":"HiSilicon D02 port","user":{"login":"jforissier","id":8288195,"avatar_url":"https://avatars.githubusercontent.com/u/8288195?v=3","gravatar_id":"","url":"https://api.github.com/users/jforissier","html_url":"https://github.com/jforissier","followers_url":"https://api.github.com/users/jforissier/followers","following_url":"https://api.github.com/users/jforissier/following{/other_user}","gists_url":"https://api.github.com/users/jforissier/gists{/gist_id}","starred_url":"https://api.github.com/users/jforissier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jforissier/subscriptions","organizations_url":"https://api.github.com/users/jforissier/orgs","repos_url":"https://api.github.com/users/jforissier/repos","events_url":"https://api.github.com/users/jforissier/events{/privacy}","received_events_url":"https://api.github.com/users/jforissier/received_events","type":"User","site_admin":false},"body":"This PR adds support for the HiSilicon D02 board.","created_at":"2016-08-03T15:08:20Z","updated_at":"2016-08-03T17:45:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"27eb93a1b1aee982dbe273c2788cc2f277a8358a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/OP-TEE/optee_os/pulls/961/commits","review_comments_url":"https://api.github.com/repos/OP-TEE/optee_os/pulls/961/comments","review_comment_url":"https://api.github.com/repos/OP-TEE/optee_os/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OP-TEE/optee_os/issues/961/comments","statuses_url":"https://api.github.com/repos/OP-TEE/optee_os/statuses/1f7b6afbd6f5091b28cc6f72399f9e95dcc85889","head":{"label":"jforissier:d02","ref":"d02","sha":"1f7b6afbd6f5091b28cc6f72399f9e95dcc85889","user":{"login":"jforissier","id":8288195,"avatar_url":"https://avatars.githubusercontent.com/u/8288195?v=3","gravatar_id":"","url":"https://api.github.com/users/jforissier","html_url":"https://github.com/jforissier","followers_url":"https://api.github.com/users/jforissier/followers","following_url":"https://api.github.com/users/jforissier/following{/other_user}","gists_url":"https://api.github.com/users/jforissier/gists{/gist_id}","starred_url":"https://api.github.com/users/jforissier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jforissier/subscriptions","organizations_url":"https://api.github.com/users/jforissier/orgs","repos_url":"https://api.github.com/users/jforissier/repos","events_url":"https://api.github.com/users/jforissier/events{/privacy}","received_events_url":"https://api.github.com/users/jforissier/received_events","type":"User","site_admin":false},"repo":{"id":22514248,"name":"optee_os","full_name":"jforissier/optee_os","owner":{"login":"jforissier","id":8288195,"avatar_url":"https://avatars.githubusercontent.com/u/8288195?v=3","gravatar_id":"","url":"https://api.github.com/users/jforissier","html_url":"https://github.com/jforissier","followers_url":"https://api.github.com/users/jforissier/followers","following_url":"https://api.github.com/users/jforissier/following{/other_user}","gists_url":"https://api.github.com/users/jforissier/gists{/gist_id}","starred_url":"https://api.github.com/users/jforissier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jforissier/subscriptions","organizations_url":"https://api.github.com/users/jforissier/orgs","repos_url":"https://api.github.com/users/jforissier/repos","events_url":"https://api.github.com/users/jforissier/events{/privacy}","received_events_url":"https://api.github.com/users/jforissier/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jforissier/optee_os","description":"Trusted side of the TEE","fork":true,"url":"https://api.github.com/repos/jforissier/optee_os","forks_url":"https://api.github.com/repos/jforissier/optee_os/forks","keys_url":"https://api.github.com/repos/jforissier/optee_os/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jforissier/optee_os/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jforissier/optee_os/teams","hooks_url":"https://api.github.com/repos/jforissier/optee_os/hooks","issue_events_url":"https://api.github.com/repos/jforissier/optee_os/issues/events{/number}","events_url":"https://api.github.com/repos/jforissier/optee_os/events","assignees_url":"https://api.github.com/repos/jforissier/optee_os/assignees{/user}","branches_url":"https://api.github.com/repos/jforissier/optee_os/branches{/branch}","tags_url":"https://api.github.com/repos/jforissier/optee_os/tags","blobs_url":"https://api.github.com/repos/jforissier/optee_os/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jforissier/optee_os/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jforissier/optee_os/git/refs{/sha}","trees_url":"https://api.github.com/repos/jforissier/optee_os/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jforissier/optee_os/statuses/{sha}","languages_url":"https://api.github.com/repos/jforissier/optee_os/languages","stargazers_url":"https://api.github.com/repos/jforissier/optee_os/stargazers","contributors_url":"https://api.github.com/repos/jforissier/optee_os/contributors","subscribers_url":"https://api.github.com/repos/jforissier/optee_os/subscribers","subscription_url":"https://api.github.com/repos/jforissier/optee_os/subscription","commits_url":"https://api.github.com/repos/jforissier/optee_os/commits{/sha}","git_commits_url":"https://api.github.com/repos/jforissier/optee_os/git/commits{/sha}","comments_url":"https://api.github.com/repos/jforissier/optee_os/comments{/number}","issue_comment_url":"https://api.github.com/repos/jforissier/optee_os/issues/comments{/number}","contents_url":"https://api.github.com/repos/jforissier/optee_os/contents/{+path}","compare_url":"https://api.github.com/repos/jforissier/optee_os/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jforissier/optee_os/merges","archive_url":"https://api.github.com/repos/jforissier/optee_os/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jforissier/optee_os/downloads","issues_url":"https://api.github.com/repos/jforissier/optee_os/issues{/number}","pulls_url":"https://api.github.com/repos/jforissier/optee_os/pulls{/number}","milestones_url":"https://api.github.com/repos/jforissier/optee_os/milestones{/number}","notifications_url":"https://api.github.com/repos/jforissier/optee_os/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jforissier/optee_os/labels{/name}","releases_url":"https://api.github.com/repos/jforissier/optee_os/releases{/id}","deployments_url":"https://api.github.com/repos/jforissier/optee_os/deployments","created_at":"2014-08-01T14:48:31Z","updated_at":"2016-03-11T08:17:47Z","pushed_at":"2016-08-03T15:53:22Z","git_url":"git://github.com/jforissier/optee_os.git","ssh_url":"git@github.com:jforissier/optee_os.git","clone_url":"https://github.com/jforissier/optee_os.git","svn_url":"https://github.com/jforissier/optee_os","homepage":null,"size":9537,"stargazers_count":2,"watchers_count":2,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"OP-TEE:master","ref":"master","sha":"1865e8f42f58fc15c215f142355fa114f59770c9","user":{"login":"OP-TEE","id":7488961,"avatar_url":"https://avatars.githubusercontent.com/u/7488961?v=3","gravatar_id":"","url":"https://api.github.com/users/OP-TEE","html_url":"https://github.com/OP-TEE","followers_url":"https://api.github.com/users/OP-TEE/followers","following_url":"https://api.github.com/users/OP-TEE/following{/other_user}","gists_url":"https://api.github.com/users/OP-TEE/gists{/gist_id}","starred_url":"https://api.github.com/users/OP-TEE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OP-TEE/subscriptions","organizations_url":"https://api.github.com/users/OP-TEE/orgs","repos_url":"https://api.github.com/users/OP-TEE/repos","events_url":"https://api.github.com/users/OP-TEE/events{/privacy}","received_events_url":"https://api.github.com/users/OP-TEE/received_events","type":"Organization","site_admin":false},"repo":{"id":20193261,"name":"optee_os","full_name":"OP-TEE/optee_os","owner":{"login":"OP-TEE","id":7488961,"avatar_url":"https://avatars.githubusercontent.com/u/7488961?v=3","gravatar_id":"","url":"https://api.github.com/users/OP-TEE","html_url":"https://github.com/OP-TEE","followers_url":"https://api.github.com/users/OP-TEE/followers","following_url":"https://api.github.com/users/OP-TEE/following{/other_user}","gists_url":"https://api.github.com/users/OP-TEE/gists{/gist_id}","starred_url":"https://api.github.com/users/OP-TEE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OP-TEE/subscriptions","organizations_url":"https://api.github.com/users/OP-TEE/orgs","repos_url":"https://api.github.com/users/OP-TEE/repos","events_url":"https://api.github.com/users/OP-TEE/events{/privacy}","received_events_url":"https://api.github.com/users/OP-TEE/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OP-TEE/optee_os","description":"Trusted side of the TEE","fork":false,"url":"https://api.github.com/repos/OP-TEE/optee_os","forks_url":"https://api.github.com/repos/OP-TEE/optee_os/forks","keys_url":"https://api.github.com/repos/OP-TEE/optee_os/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OP-TEE/optee_os/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OP-TEE/optee_os/teams","hooks_url":"https://api.github.com/repos/OP-TEE/optee_os/hooks","issue_events_url":"https://api.github.com/repos/OP-TEE/optee_os/issues/events{/number}","events_url":"https://api.github.com/repos/OP-TEE/optee_os/events","assignees_url":"https://api.github.com/repos/OP-TEE/optee_os/assignees{/user}","branches_url":"https://api.github.com/repos/OP-TEE/optee_os/branches{/branch}","tags_url":"https://api.github.com/repos/OP-TEE/optee_os/tags","blobs_url":"https://api.github.com/repos/OP-TEE/optee_os/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OP-TEE/optee_os/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OP-TEE/optee_os/git/refs{/sha}","trees_url":"https://api.github.com/repos/OP-TEE/optee_os/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OP-TEE/optee_os/statuses/{sha}","languages_url":"https://api.github.com/repos/OP-TEE/optee_os/languages","stargazers_url":"https://api.github.com/repos/OP-TEE/optee_os/stargazers","contributors_url":"https://api.github.com/repos/OP-TEE/optee_os/contributors","subscribers_url":"https://api.github.com/repos/OP-TEE/optee_os/subscribers","subscription_url":"https://api.github.com/repos/OP-TEE/optee_os/subscription","commits_url":"https://api.github.com/repos/OP-TEE/optee_os/commits{/sha}","git_commits_url":"https://api.github.com/repos/OP-TEE/optee_os/git/commits{/sha}","comments_url":"https://api.github.com/repos/OP-TEE/optee_os/comments{/number}","issue_comment_url":"https://api.github.com/repos/OP-TEE/optee_os/issues/comments{/number}","contents_url":"https://api.github.com/repos/OP-TEE/optee_os/contents/{+path}","compare_url":"https://api.github.com/repos/OP-TEE/optee_os/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OP-TEE/optee_os/merges","archive_url":"https://api.github.com/repos/OP-TEE/optee_os/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OP-TEE/optee_os/downloads","issues_url":"https://api.github.com/repos/OP-TEE/optee_os/issues{/number}","pulls_url":"https://api.github.com/repos/OP-TEE/optee_os/pulls{/number}","milestones_url":"https://api.github.com/repos/OP-TEE/optee_os/milestones{/number}","notifications_url":"https://api.github.com/repos/OP-TEE/optee_os/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OP-TEE/optee_os/labels{/name}","releases_url":"https://api.github.com/repos/OP-TEE/optee_os/releases{/id}","deployments_url":"https://api.github.com/repos/OP-TEE/optee_os/deployments","created_at":"2014-05-26T17:18:57Z","updated_at":"2016-08-02T02:21:49Z","pushed_at":"2016-08-03T15:53:22Z","git_url":"git://github.com/OP-TEE/optee_os.git","ssh_url":"git@github.com:OP-TEE/optee_os.git","clone_url":"https://github.com/OP-TEE/optee_os.git","svn_url":"https://github.com/OP-TEE/optee_os","homepage":null,"size":10783,"stargazers_count":141,"watchers_count":141,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":145,"mirror_url":null,"open_issues_count":45,"forks":145,"open_issues":45,"watchers":141,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OP-TEE/optee_os/pulls/961"},"html":{"href":"https://github.com/OP-TEE/optee_os/pull/961"},"issue":{"href":"https://api.github.com/repos/OP-TEE/optee_os/issues/961"},"comments":{"href":"https://api.github.com/repos/OP-TEE/optee_os/issues/961/comments"},"review_comments":{"href":"https://api.github.com/repos/OP-TEE/optee_os/pulls/961/comments"},"review_comment":{"href":"https://api.github.com/repos/OP-TEE/optee_os/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OP-TEE/optee_os/pulls/961/commits"},"statuses":{"href":"https://api.github.com/repos/OP-TEE/optee_os/statuses/1f7b6afbd6f5091b28cc6f72399f9e95dcc85889"}}}}
{"actor":{"display_login":"d3zd3z"}}