{"id":1322,"date":"2020-03-18T21:01:23","date_gmt":"2020-03-18T13:01:23","guid":{"rendered":"https:\/\/www.jarvisw.com\/?p=1322"},"modified":"2020-03-18T21:01:23","modified_gmt":"2020-03-18T13:01:23","slug":"%e7%bb%99linux%e5%86%85%e6%a0%b8%e7%9a%84mips-malta-board%e6%b7%bb%e5%8a%a0mips-64-release-2%e6%9e%b6%e6%9e%84%e6%94%af%e6%8c%81","status":"publish","type":"post","link":"https:\/\/www.jarvisw.com\/?p=1322","title":{"rendered":"\u7ed9linux\u5185\u6838\u7684mips malta board\u6dfb\u52a0MIPS 64 Release 2\u67b6\u6784\u652f\u6301"},"content":{"rendered":"\n<p>\u3000\u3000linux\u5185\u6838\u4e2d\u7684malta board\u4ee3\u7801\u53ea\u652f\u6301MIPS32R1,MIPS32R2\u548cMIPS64R1\u8fd9\u51e0\u79cd\u67b6\u6784\u7684CPU\uff0c\u5982\u679c\u6211\u60f3\u8981\u652f\u6301MIPS64R2\u600e\u4e48\u529e\uff1f\u76f4\u63a5\u4f7f\u7528-march=mips64r2\u7f16\u8bd1\u662f\u4e0d\u884c\u7684\uff0c\u4f1a\u542f\u52a8\u4e0d\u8d77\u6765\uff0c\u9700\u8981\u5bf9\u5185\u6838\u6253\u4e00\u4e9b\u8865\u4e01\uff0c\u5176\u5b9e\u4e5f\u6bd4\u8f83\u7b80\u5355\uff0c\u6211\u8fd9\u91cc\u5c31\u4e0d\u5e9f\u8bdd\u76f4\u63a5\u8d34patch\u4e86\uff1a<\/p>\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"diff\">---\n arch\/mips\/Kconfig            |    7 +++++++\n arch\/mips\/include\/asm\/cpu.h  |    2 +-\n arch\/mips\/kernel\/cpu-probe.c |    4 ++++\n arch\/mips\/kernel\/traps.c     |    1 +\n 4 files changed, 13 insertions(+), 1 deletion(-)\n\ndiff --git a\/arch\/mips\/Kconfig b\/arch\/mips\/Kconfig\nindex d0570f4..862a9c3 100644\n--- a\/arch\/mips\/Kconfig\n+++ b\/arch\/mips\/Kconfig\n@@ -282,6 +282,7 @@ config MIPS_MALTA\n        select SYS_HAS_CPU_MIPS32_R1\n        select SYS_HAS_CPU_MIPS32_R2\n        select SYS_HAS_CPU_MIPS64_R1\n+       select SYS_HAS_CPU_MIPS64_R2\n        select SYS_HAS_CPU_NEVADA\n        select SYS_HAS_CPU_RM7000\n        select SYS_HAS_EARLY_PRINTK\n@@ -2488,6 +2489,7 @@ config TRAD_SIGNALS\n config MIPS32_COMPAT\n        bool \"Kernel support for Linux\/MIPS 32-bit binary compatibility\"\n        depends on 64BIT\n+       default y if CPU_SUPPORTS_32BIT_KERNEL &amp;&amp; SYS_SUPPORTS_32BIT_KERNEL\n        help\n          Select this option if you want Linux\/MIPS 32-bit binary\n          compatibility. Since all software available for Linux\/MIPS is\n@@ -2507,6 +2509,7 @@ config SYSVIPC_COMPAT\n config MIPS32_O32\n        bool \"Kernel support for o32 binaries\"\n        depends on MIPS32_COMPAT\n+       default y if CPU_SUPPORTS_32BIT_KERNEL &amp;&amp; SYS_SUPPORTS_32BIT_KERNEL\n        help\n          Select this option if you want to run o32 binaries.  These are pure\n          32-bit binaries as used by the 32-bit Linux\/MIPS port.  Most of\n@@ -2525,6 +2528,10 @@ config MIPS32_N32\n \n          If unsure, say N.\n \n+comment \"64bit kernel, but support of 32bit applications is disabled!\"\n+       depends on 64BIT &amp;&amp; !MIPS32_O32 &amp;&amp; !MIPS32_N32\n+       depends on CPU_SUPPORTS_32BIT_KERNEL &amp;&amp; SYS_SUPPORTS_32BIT_KERNEL\n+\n config BINFMT_ELF32\n        bool\n        default y if MIPS32_O32 || MIPS32_N32\ndiff --git a\/arch\/mips\/include\/asm\/cpu.h b\/arch\/mips\/include\/asm\/cpu.h\nindex 0a619f8..559bd12 100644\n--- a\/arch\/mips\/include\/asm\/cpu.h\n+++ b\/arch\/mips\/include\/asm\/cpu.h\n@@ -268,7 +268,7 @@ enum cpu_type_enum {\n        \/*\n         * MIPS64 class processors\n         *\/\n-       CPU_5KC, CPU_20KC, CPU_25KF, CPU_SB1, CPU_SB1A, CPU_LOONGSON2,\n+       CPU_5KC, CPU_5KE, CPU_20KC, CPU_25KF, CPU_SB1, CPU_SB1A, CPU_LOONGSON2,\n        CPU_CAVIUM_OCTEON, CPU_CAVIUM_OCTEON_PLUS, CPU_CAVIUM_OCTEON2,\n        CPU_XLR, CPU_XLP,\n \ndiff --git a\/arch\/mips\/kernel\/cpu-probe.c b\/arch\/mips\/kernel\/cpu-probe.c\nindex e5f0b27..fe76d60 100644\n--- a\/arch\/mips\/kernel\/cpu-probe.c\n+++ b\/arch\/mips\/kernel\/cpu-probe.c\n@@ -817,6 +817,10 @@ static inline void cpu_probe_mips(struct cpuinfo_mips *c, \nunsigned int cpu)\n                c-&gt;cputype = CPU_5KC;\n                __cpu_name[cpu] = \"MIPS 5Kc\";\n                break;\n+       case PRID_IMP_5KE:\n+               c-&gt;cputype = CPU_5KE;\n+               __cpu_name[cpu] = \"MIPS 5KE\";\n+               break;\n        case PRID_IMP_20KC:\n                c-&gt;cputype = CPU_20KC;\n                __cpu_name[cpu] = \"MIPS 20Kc\";\ndiff --git a\/arch\/mips\/kernel\/traps.c b\/arch\/mips\/kernel\/traps.c\nindex 7bec6f8..a69edbe 100644\n--- a\/arch\/mips\/kernel\/traps.c\n+++ b\/arch\/mips\/kernel\/traps.c\n@@ -1349,6 +1349,7 @@ static inline void parity_protection_init(void)\n                break;\n \n        case CPU_5KC:\n+       case CPU_5KE:\n                write_c0_ecc(0x80000000);\n                back_to_back_c0_hazard();\n                \/* Set the PE bit (bit 31) in the c0_errctl register. *\/\n<\/pre>\n<p>\u00a0<\/p>","protected":false},"excerpt":{"rendered":"<p>\u3000\u3000linux\u5185\u6838\u4e2d\u7684malta board\u4ee3\u7801\u53ea\u652f\u6301MIPS32R1,MIPS32R2\u548cMIPS64R1\u8fd9\u51e0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,5],"tags":[250,248,249,226,187],"class_list":["post-1322","post","type-post","status-publish","format-standard","hentry","category-iot","category-5","tag-malta","tag-mips","tag-mips64","tag-qemu","tag-187"],"_links":{"self":[{"href":"https:\/\/www.jarvisw.com\/index.php?rest_route=\/wp\/v2\/posts\/1322","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jarvisw.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jarvisw.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jarvisw.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jarvisw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1322"}],"version-history":[{"count":1,"href":"https:\/\/www.jarvisw.com\/index.php?rest_route=\/wp\/v2\/posts\/1322\/revisions"}],"predecessor-version":[{"id":1323,"href":"https:\/\/www.jarvisw.com\/index.php?rest_route=\/wp\/v2\/posts\/1322\/revisions\/1323"}],"wp:attachment":[{"href":"https:\/\/www.jarvisw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jarvisw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jarvisw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}