当前位置: 首页 > news >正文

上海网站建设公司哪家好?北京别墅设计网站

上海网站建设公司哪家好?,北京别墅设计网站,编程开发工具大全,iis 无法启动此网站最近工作需要在 UEFI Shell 下Check EC Ram 的设定#xff0c;发现手上只有 Windows 下的读取工具(RW Everything)。于是研究了一下如何在Shell 读取 EC Ram。根据【参考1】读取的流程如下#xff1a;Port 66 CommandsThere are also some EC commands that use ports 0x66 …最近工作需要在 UEFI  Shell 下Check EC Ram 的设定发现手上只有 Windows 下的读取工具(RW Everything)。于是研究了一下如何在Shell 读取 EC Ram。根据【参考1】读取的流程如下Port 66 CommandsThere are also some EC commands that use ports 0x66 and0x62. Some of these are standard ACPI commands as defined in the external ACPIspec, others are custom.The port 66 protocol is essentially the standard ACPI ECinterface protocol.1. Wait for port66.IBF 02. Write command byte to port 66.3. For each outgoing data or address byte:3a. Wait for port66.IBF 03b. Write data or address byte to port 62.4. For each incoming data byte:4a. Wait for port66.OBF 14b. Read data byte from port 62.5. If the command requires no data or address bytes, you candetermine when the command was accepted/executed by waiting for port66.IBF0.同时 ACPI 定义的通用 Command如下ACPI-defined port 66 commands0x80 Read EC (write 0x80 to port 66, write address byte toport 62, read data byte from port 62)0x81 Write EC (write 0x81 to port 66, write address byte toport 62, write data byte to port 62)0x82 Burst Enable (write 0x82 to port 66, read data bytefrom port 62 - the data byte is burst ACK, value 0x90)0x83 Burst Disable (write 0x83 to port 66, wait forport66.IBF0)0x84 Query EC (i.e. read SCI event queue) (write 0x84 toport 66, read data byte from port 62). When the data byte is 0, it means thatthe SCI event queue is empty.最终根据上述资料编写一个 Application 如下#include #include #include #include extern EFI_SYSTEM_TABLE *gST;extern EFI_BOOT_SERVICES *gBS;#define TIMEOUT 0xFFFF#define ECCOMMAND 0x66#define ECSTATUS 0x66#define ECDATA 0x62#define EC_S_OBF BIT0#define EC_S_IBF BIT1#define ECREADCMD 0x80UINT8 MemBuffer[16][16];void WaitIBF() {UINT32 Status;UINTN Count;Count 0;Status 0;Status IoRead8 (ECSTATUS);while (((Status EC_S_IBF) ! 0)||(CountTIMEOUT)) {Status IoRead8 (ECSTATUS);Count;}}void WaitOBF() {UINT32 Status;UINTN Count;Count 0;Status 0;Status IoRead8 (ECSTATUS);while (((Status EC_S_OBF) 0)||(CountTIMEOUT)) {Status IoRead8 (ECSTATUS);Count;}}UINT8 ReadECRam(UINT8 Index) {WaitIBF(); //1IoWrite8(ECCOMMAND,0x80);//2WaitIBF(); //3aIoWrite8(ECDATA, Index); //3bWaitOBF(); //4areturn IoRead8(ECDATA); //4b}void GetData(){UINT8 i,j;for (i0;i16;i)for (j0;j16;j) {MemBuffer[i][j]ReadECRam(i*16j);}}void ShowData(){UINT8 i,j;Print(L );for (i0;i16;i) Print(L%02X ,i);Print(L\n);for (i0;i16;i) {Print(L%02X: ,i);for (j0;j16;j) {Print(L%02X ,MemBuffer[i][j]);}Print(L\n);}Print(L\n);}/***Print a welcoming message.Establishes the main structure of the application.retval 0 The application exited normally.retval Other An error occurred.***/INTNEFIAPIShellAppMain (IN UINTN Argc,IN CHAR16 **Argv){EFI_INPUT_KEY Key;Key.ScanCodeSCAN_NULL;while (SCAN_UP!Key.ScanCode){gST-ConOut-ClearScreen(gST-ConOut);GetData();ShowData();gST - ConIn - ReadKeyStroke(gST-ConIn,Key);Print(LPress Arrow-Up to exit\n);gBS-Stall(1000000UL);}return(0);}在实体机上运行结果如下(按向上键退出)源代码和Application(X64)下载参考1. http://wiki.laptop.org/go/Ec_specification
http://www.pierceye.com/news/807719/

相关文章:

  • 怎么可以黑网站域名做网页的心得体会
  • 设计素材免费下载网站做广告牌子
  • 名师工作室网站建设 意义常州网站建设专业的公司
  • 中国建设银行官网站预定红念币天元建设集团有限公司地址
  • wix做网站教程网站建设 销售提成
  • 长安网站建设费用开天猫旗舰店网站建设
  • 网页游戏网站哪个最好专业建站公司建站系统该规划哪些内容
  • 青岛网站建设公司大全在那些网站上做企业宣传好
  • 天河定制型网站建设中国科技成就的例子
  • 网站报备查询android安卓软件下载
  • 百度站长平台网站验证wordpress关闭略缩图
  • 网站怎么做qq微信登陆界面设计的有趣的网站推荐
  • 设计logo网站赚钱注册域名怎么做网站
  • 网站备案 教程网站设计大全推荐
  • 临沂建设局网站官网文明网站建设工作进度表
  • 网站编辑seo旅游网站建设代码
  • 为什么自己做的网站打开是乱码wordpress live-2d
  • 素材下载网站电商自建站
  • 浙江省的网站建设公司有哪些代理注册公司一般多少钱
  • 如何在建设银行网站预约纪念币东莞网站建设服务有什
  • 有哪些可以做h5的网站代理网址上境外网
  • 做网站所需要的代码6红杏直播
  • 南通制作网站wordpress移动版设置
  • 哪个网站有免费ppt下载建筑类网站的推荐理由
  • 视觉差的网站公司外包
  • 基础做网站内蒙住房和城乡建设部网站
  • 发帖效果好的网站展馆展示设计公司排名
  • 童装网站建设文案什么网站做的号
  • 能打开的a站莆田网站建设建站系统
  • 上海市城乡建设管理局网站一个月做网站