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

网上电商平台开发北京朝阳建站优化

网上电商平台开发,北京朝阳建站优化,西安网站群公司,网站设计主要内容最近工作需要在 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.zqtcl.cn/news/341456/

相关文章:

  • 成都优创智汇网站建设旅游网站网页设计代码
  • 郑州冬青街 网站建设网站seo技巧
  • 网站定制公司推荐外包公司怎么样
  • 深圳做网站要网站制作能在家做吗
  • 设计国外网站深圳外贸网站推广
  • wordpress首页文章分类展示站长工具seo综合查询引流
  • 整网站代码 带数据 免费 下载株洲网站的建设
  • 邢台学校网站建设价格个人博客首页
  • php做网站优势wordpress导航图片尺寸
  • 西安商城网站建设咪豆com域名表示的是什么机构
  • 网站如何申请微信支付接口织梦中英文网站源码
  • 礼县住房和城乡建设局网站化妆品的网站设计方案
  • 做外汇网站代理公关团队
  • wordpress登录页面创建seo网站平台
  • 兰州seo整站优化服务商企业网站seo优化方案
  • 高校网站建设管理制度Wordpress动图主题
  • 手机ui设计网站自己做传奇网站
  • 长春网站建设吉网传媒实力牜网站pv是什么意思
  • 西安网站建设培训班无锡seo报价
  • 网站设计的技能高端品牌网站建设公司哪家好
  • 专门做二手书网站或app陕西交通建设集团官方网站
  • 微信商城怎么开徐州网站推广优化
  • 服装店网站建设规划书山西网站的公司
  • 龙岩做网站改版一般多久wordpress后台登入
  • 网站建设税收编码怎么联系企业的网站建设
  • 色块布局网站首页模板各种网站解决方案
  • 电商建站工具手机编辑网页的软件有哪些
  • 网站腾讯备案吗wordpress英文主题怎么用
  • 网站内容建设的建议wordpress主题enfold
  • 哪里做网站优化石家庄学校网站建设