EFI应用程序错误保护写保护 [英] EFI Application Erorr Write Protected

查看:369
本文介绍了EFI应用程序错误保护写保护的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图对我列举的文件系统进行一些写/读操作.问题是,当我要写入其他卷而不是自己的卷(fs0)时,它将返回WRITE PROTECTED错误.

I tried to do some write/read operations on filesystems that I have enumerated for. The problem is when I want to write to other volumes rather than my self (fs0), it will return WRITE PROTECTED Error.

 ... Enumerated and opened all available volumes successfuly

 efiStatus = root->Open(root, &token, L"xxx", EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE | EFI_FILE_MODE_CREATE, 0);
    
    if (efiStatus == EFI_SUCCESS)
    {
        char* myStr = "Sample Content";
        UINTN myStrSize = strlenEx(myStr);

        efiStatus = token->Write(token, &myStrSize, myStr);
        if (efiStatus != EFI_SUCCESS)
        {
            Print(L"[X] ! Error [%r]!\n", efiStatus);
        }
        Print(L"Found Some\n", efiStatus);
    }

我也尝试过ShellCreateDirectoryShellWriteFile.我真的可以从EFI应用程序访问写入硬盘(pci)吗?

I Also tried ShellCreateDirectory, ShellWriteFile. Do I really can access write hard disk (pci) from EFI Application?

drivers命令输出:

                T   D
D           Y C I
R           P F A
V  VERSION  E G G #D #C DRIVER NAME                         IMAGE NAME
== ======== = = = == == =================================== ==========
43 00000014 D - -  1  - AMI USB Driver                      Uhcd
45 00000014 B - -  1  4 USB bus                             Uhcd
46 00000002 D - -  3  - USB Hid driver                      Uhcd
47 00000001 D - -  1  - USB Mass Storage driver             Uhcd
85 00010000 ? - -  -  - AMI ExFat Driver                    EXFAT
86 00010000 D - -  5  - AMI NTFS Driver                     NTFS
89 00000001 D - -  2  - <null string>                       MouseDriver
8B 00000001 B - -  1  3 AMI AHCI BUS Driver                 Ahci
8F 00000001 ? - -  -  - AMI NVMe BUS Driver                 Nvme
123 00000010 D - -  1  - Serial ATA Controller Initializatio SataController
12E 00000010 B - -  1  1 AMI Console Splitter Text Out Drive ConSplitter
12F 00000010 B - -  1  1 AMI Console Splitter Text In Driver ConSplitter
130 00000010 B - -  1  1 AMI Console Splitter Pointer Driver ConSplitter
133 00000010 D - -  1  - AMI Graphic Console Driver          GraphicsConsole
134 0000000A D - - 15  - Generic Disk I/O Driver             DiskIoDxe
135 0000000B B - -  3 11 Partition Driver(MBR/GPT/El Torito) PartitionDxe
137 00000000 ? - -  -  - Integrated Touch Driver             IntegratedTouch
13A 00000010 B - -  1  5 AMI Generic LPC Super I/O Driver    GenericSio
13C 00A50110 B - -  1 15 AMI PCI Bus Driver                  PciBus
13E 00000010 ? - -  -  - AMI PS/2 Driver                     Ps2Main
13F 00000000 ? - -  -  - DNS Network Service Driver          DnsDxe
140 00000000 ? - -  -  - DNS Network Service Driver          DnsDxe
145 0000000A D - -  2  - FAT File System Driver              Fat
147 00010001 ? - -  -  - AMI ISO9660 File System Driver      FsIso9660
149 00000001 ? - -  -  - <null string>                       PcieSataController
14A 00000001 ? - -  -  - <null string>                       PcieSataController
14B 0000001B B - -  1  3 Intel(R) RST 16.0.2.3402 RAID Drive RaidDriver
159 09000432 B - -  1  1 Intel(R) GOP Driver [9.0.1074]      MemoryMapped(0x3,0x845F3018,0x846040D8)

推荐答案

我有根据的猜测是,您尝试访问NTFS卷(因为您谈到Windows分区),并且UEFI不支持 NTFS (默认情况下).至少,我还没有看到任何固件. UEFI仅支持FAT32文件系统.

My educated guess is that you trying to access NTFS volume (since you talked about Windows partitions) and NTFS is not supported by UEFI (by default). At least, I haven't seen any firmware that does. UEFI supports FAT32 file systems only.

如果您使用平台上的UEFI Shell,则应该看到映射表" (请参见下面的示例图片),如果有标记为"FS0&"的设备.这表明固件检测到磁盘,发现了分区,并能够安装文件系统.其余的卷标记为BLK,这意味着UEFI只能使用BlockIO协议进行访问.不支持FS协议.

If you drop into UEFI shell on your platform you should see the "Mapping table" (see the sample picture below), if there is a device labeled "FS0". This indicates that the firmware detected the disk, discovered the partition, and was able to mount the file system. The rest of the volumes labeled as BLK, which means UEFI can give the access using BlockIO Protocol only. No FS Protocol support.

这篇关于EFI应用程序错误保护写保护的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆