新聞中心

        EEPW首頁 > 嵌入式系統(tǒng) > 設計應用 > 如何應用AndesCoreTM EDM安全訪問機制

        如何應用AndesCoreTM EDM安全訪問機制

        作者: 時間:2016-09-12 來源:網絡 收藏

        圖表8 AHB bus如何使用hdebug_access和驗證邏輯來防止惡意的debug存取

        本文引用地址:http://www.104case.com/article/201609/303699.htm

        如下verilog code說明了如何使用hdebug_access信號:

        //--- Use hdebug_access to prevent malicious debug access in AHB Bus Controller

        //* assume zero-wait-state AHB access

        parameter IRRELEVANT_DATA = 32’hcafe0001;

        parameter AUTH_CODE = 32’h01020304;

        always @(posedge hclk or negedge hreset_n) begin

        if (!hreset_n) begin

        dbg_acc_d1 《= 1’b0;

        end

        else begin // data phase indication of debug access

        dbg_acc_d1 《= hdebug_access;

        end

        end

        。..

        always @(posedge hclk or negedge hreset_n) begin

        if (!hreset_n) begin

        passcode_reg 《= 32‘d0;

        end

        else if (passcode_wen) begin //debugger enters passcode through debug access

        passcode_reg 《= hwdata[31:0];

        end

        end

        //validate passcode to check authentication

        assign auth_check_fail = (passcode_reg != AUTH_CODE);

        //return irrelevant data if the authentication check of debug access fails

        assign hrdata_out = {32{data_read_en}}

        ((dbg_acc_d1 auth_check_fail) IRRELEVANT_DATA : normal_data_out);

        4. 實際的應用

        用戶經由上面的介紹完成了權限管理邏輯后,并且掛在AHB bus上,再經由仿真器(Cadence)仿真此權限管理邏輯的行為,如下面幾張圖所示:

        edm_restrict_access信號控制

        下圖說明由sw code把edm_restrict_access signal disable

        9.jpg

        圖表9 由sw code把edm_restrict_access signal disable

        trusted_debug_exit信號控制

        10.jpg

        圖表10 經由debug access把trusted_debug_exit signal設定成high

        debug_access信號

        下圖說明經由debug host來做存取時,debug_access signal會從low變成high

        11.jpg

        圖表11 經由debug host來做存取時,debug_access signal會從low變成high

        下圖說明經由執(zhí)行IRTE instruction時,debug_access signal會從high變成low

        12.jpg

        圖表12 經由執(zhí)行IRTE instruction時,debug_access signal會從high變成low

        5. 結語

        安全存取是保護周邊裝置內容不被竊取的功能,也因為越來越多客戶使用到此功能,所以撰寫此技術文章讓客戶更能進一步了解到此功能的用途,讓客戶能夠很快速的上手,并且使用晶心開發(fā)的安全存取是一件愉快與簡單的工作。


        上一頁 1 2 下一頁

        評論


        技術專區(qū)

        關閉
        主站蜘蛛池模板: 依兰县| 聂拉木县| 灵丘县| 嫩江县| 平塘县| 四子王旗| 凉城县| 尤溪县| 吉水县| 彭州市| 扶绥县| 绵竹市| 淮南市| 新闻| 麟游县| 炉霍县| 福鼎市| 龙井市| 清流县| 台东县| 江门市| 车险| 九江县| 秦安县| 天台县| 垫江县| 淳化县| 林口县| 布拖县| 昌宁县| 白玉县| 乌鲁木齐市| 罗田县| 新安县| 永平县| 云浮市| 肇庆市| 砀山县| 静乐县| 承德市| 嵩明县|