使用者工具

網站工具


uefi_debug_method

差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

uefi_debug_method [2025/11/26 17:04] (目前版本)
don 建立
行 1: 行 1:
 +====== UEFI DEBUG METHOD ======
  
 +===== OUTPUT 80H 81H DEBUG CODE =====
 +
 +輸出常數確認程式是否有執行
 +<code>
 +//DonRtest S+
 +    for(int i=0;i<800;i++)
 +    {
 +        for(int j=0;j<100;j++)
 +        {
 +            IoWrite8(0x81,0xAA);
 +            IoWrite8(0x80,0x55);
 +        }
 +    }       
 +//DonRtest E+
 +</code>
 +
 +輸出8位元變數
 +<code>
 +//DonRtest S+
 +    UINT8  RegRead;         //DonRtest
 +    RegRead=MmioRead8(0xFE001020);
 +    for(int i=0;i<800;i++)
 +    {
 +       for(int j=0;j<100;j++)
 +       {
 +          IoWrite8(0x81,0x33);
 +          IoWrite8(0x80,RegRead);
 +       }
 +    }
 +//DonRtest E+
 +</code>
 +
 +輸出32位元變數
 +<code>
 +//DonRtest S+
 +  UINT32  RegisterValue;
 +  UINT8   bytes[4];
 +
 +    bytes[0] = (UINT8)(RegisterValue & 0xFF);        // LOW Byte (LSB)
 +    bytes[1] = (UINT8)((RegisterValue >> 8) & 0xFF);
 +    bytes[2] = (UINT8)((RegisterValue >> 16) & 0xFF);
 +    bytes[3] = (UINT8)((RegisterValue >> 24) & 0xFF); // High Byte (MSB)
 +    for(int y=0;y<4;y++)
 +    {    
 +      for(int i=0;i<800;i++)
 +      {
 +        for(int j=0;j<100;j++)
 +        {
 +          IoWrite8(0x81,0xAA);
 +          IoWrite8(0x80,bytes[y]);
 +        }
 +      }
 +    }
 +//DonRtest E+
 +</code>
uefi_debug_method.txt · 上一次變更: 2025/11/26 17:04 由 don