2021年8月25日 星期三

Errors for writing UEFI variables

Recently I got lots of questions for writing UEFI variables (ALT =), I believe it is because users wants to unlock the capability of your system.  And some blogs even mentioned how to do it with RU.

Due to the security reason, recent UEFI system firmware will not allow you to modify sensitive settings (variables).  And there is no way to change it unless you can update the SPI by a physical  programmer.

Here are what error numbers mean (UEFI spec) after you pressed CTRL-W.

0x00000000 EFI_SUCCESS               
0x00000001 EFI_LOAD_ERROR            
0x00000002 EFI_INVALID_PARAMETER     
0x00000003 EFI_UNSUPPORTED           
0x00000004 EFI_BAD_BUFFER_SIZE       
0x00000005 EFI_BUFFER_TOO_SMALL      
0x00000006 EFI_NOT_READY             
0x00000007 EFI_DEVICE_ERROR          
0x00000008 EFI_WRITE_PROTECTED       
0x00000009 EFI_OUT_OF_RESOURCES      
0x0000000a EFI_VOLUME_CORRUPTED      
0x0000000b EFI_VOLUME_FULL           
0x0000000c EFI_NO_MEDIA              
0x0000000d EFI_MEDIA_CHANGED         
0x0000000e EFI_NOT_FOUND             
0x0000000f EFI_ACCESS_DENIED         
0x00000010 EFI_NO_RESPONSE           
0x00000011 EFI_NO_MAPPING            
0x00000012 EFI_TIMEOUT               
0x00000013 EFI_NOT_STARTED           
0x00000014 EFI_ALREADY_STARTED       
0x00000015 EFI_ABORTED               
0x00000016 EFI_ICMP_ERROR            
0x00000017 EFI_TFTP_ERROR            
0x00000018 EFI_PROTOCOL_ERROR        
0x00000019 EFI_INCOMPATIBLE_VERSION  
0x0000001a EFI_SECURITY_VIOLATION    
0x0000001b EFI_CRC_ERROR             
0x0000001c EFI_END_OF_MEDIA          
0x0000001f EFI_END_OF_FILE           
0x00000020 EFI_INVALID_LANGUAGE      
0x00000021 EFI_COMPROMISED_DATA      
0x00000023 EFI_HTTP_ERROR            

 I won't be able to provide you on how to make it working, it is what it is from RU's perspective.

 

8 則留言:

G390 提到...

如果要輸入3位數的hex,是不是要把顯示改為32bit?

James Wang 提到...

Hi G390,

Yes. But for the UEFI variable, it is not necessary because it won't write the data immediately after your input until CTRL-W is pressed.

And also it depends on the H/W, if the H/W requires writing data with 32-bit all together then you have to switch to 32-bit, otherwise it is OK to enter the values byte by byte.

junfeng.jiang 提到...

我的按al+=后就卡住了,没有任何反应

Phil 提到...

你好 James,
有可能 build 一版 TARGET_ARCH = AA64的 RU.EFI嗎?

James Wang 提到...

Hi Phil,

Sorry RU does not support AA64.

匿名 提到...

Is it possible to change the variable for boot order lock in Microsoft surface?

James Wang 提到...

I think you can change BootOrder variable as long as the variable is not write-protected.

James Wang 提到...

@Phil,

AArch64 RU has been released finally.
http://ruexe.blogspot.com/2024/10/ru-5400433-beta-for-arm-support.html