Chinaunix首页 | 论坛 | 博客
  • 博客访问: 456629
  • 博文数量: 73
  • 博客积分: 3593
  • 博客等级: 中校
  • 技术积分: 912
  • 用 户 组: 普通用户
  • 注册时间: 2009-10-14 11:32
文章分类

全部博文(73)

文章存档

2013年(2)

2012年(20)

2011年(25)

2010年(12)

2009年(14)

分类:

2011-11-16 21:47:51

原文地址:Mips cache lock 作者:苍白的手


Maybe mips cache lock is not used as much as cache writeback and cache invalidate,so we need a chance to "learning through practice".

In embedded system,before we have init the RAM,we have no writeable space for stack,but we can use mips cache lock to solve it,lock stack in cache and we can get a small wirteable space for our "C" code.That is what U-Boot do on some mips platform board.

You can see the U-BOOT-SOURCE/cpu/mips/cache.S and U-BOOT-SOURCE/cpu/mips/start.S for detail.It use cache op is 0x1d,reference "See MIPS Run Linux Second Edition" chapter 4,you can know it lock the L1 D-cache.

BTW:In "See MIPS Run Linux Second Edition" Section 4.9.1 The Cache Instruction,third paragraph:
        Of the 5-bit field,the upper 2 bits select which cache to work on
should be:
        Of the 5-bit field,the lower 2 bits select which chache to work on
阅读(1059) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~