[edk2] How can I "umount" filesystem from UEFI Shell?
Hi folks. After UEFI Shell was run I can see FS0 filesystem. FS0 is alias for PciRoot/Pci/Ata device. I want to remove all MBR and GPT partition from this device (I write zeros to the 0,1,last sectors). What I doing: 1 I get Handle for this device, 2 I call gBS->DisconnectController (DiskHandle,NULL,NULL); for umount (If I return in this step, UEFI Shell is not answer) 3 I call WriteBlock for erase data. 4 I return to the UEFI Shell, and it doesn't answer) If I skip step 2, then UEFI Shell is will be broken too. How can I erase data from disk without breaking UEFI Shell? --- Best regards, Leonid Myravjev -- Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ ___ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
[edk2] Get GPT DiskGuid (PartitionTypeGUID)
Hi folks! I am writing bootloader. The bootloader need to found all GPT partition with vendor GUID. I can to get all Handles of DiskIO protocol. I can to get a Path protocol and select only MEDIA_DEVICE_PATH, MEDIA_HARDDRIVE_DP. >From PathDev I can to get all UniquePartitionGUID. But how can get PartitionTypeGUID? I can see one way: * find a partition. * find a parent handle of the partition * read PrimaryHeader * find in the EFI_PARTITION_ENTRYs a UniquePartitionGUID that equal the partition UniquePartitionGUID. * save PartitionTypeGUID if it was found How can I do it more simple? --- Best regards, Leonid Myravjev -- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk ___ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
[edk2] Questions about booting
Hi folks! I apologize for the stupid questions, but I really can not understand how it works. Please help me. I need to make new boot item, and boot from it. Loading do using specific getting image, and startimage with specific preparation. Load using LOAD_FILE PROTOCOL from MyLoad function. For this goals I read UEFI_2_4 spec and MdeModulePkg PxeBcDriver. I do to achieve the goal: * I make DXE driver. * I load it from ROM. * DXE Driver: ** Creates (On entry point) new Boot### variable in NvRam. It make description "BootForMe" and EFI_DEVICE_PATH_PROTOCOL instance with MESSAGING_DEVICE_PATH (HW_VENDOR_DP). ** Driver call EfiLibInstallDriverBindingComponentName2() for registering. >From EFI_DRIVER_BINDING_PROTOCOL.Start() I add to DeviceHandle new protocol: EFI_LOAD_FILE_PROTOCOL. For it I use gBS->InstallMultipleProtocolInterfaces(). EFI_LOAD_FILE_PROTOCOL contains pointer to MyLoad function. How I understand in EFI firmware must be created EFI_HANDLER * Device, which will support bootoption DEVICE_PATH_PROTOCOL. I need detect it device in EFI_DRIVER_BINDING_PROTOCOL.Supported(), and add to it EFI_LOAD_FILE_PROTOCOL support for boot manager. Boot Manager get Device from DEVICE_PATH_PROTOCOL, and call LoadImage, StartImage after. Am I right to do and understand? If yes, how to create EFI_HANDLER * Device? I just need to do is start image from new boot option. Image get from MyLoad function. Start image from MyStart. Maybe this can be get easier? Thank you. --- Best regards, Leonid Myravjev -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk ___ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
Re: [edk2] Questions about booting
On 1 October 2013 18:47, Andrew Fish wrote:
> The EFI Driver Model, EFI_DRIVER_BINDING_PROTOCOL, assumes that an EFI_HANDLE
> exists that you can connect to. So the Handle that represents the 1st device
> path node is usually added by a DXE driver. So on most platform this is
> usually the PCI root bridge driver. So in the entry point to your driver you
> need to install a new Handle with the root node of your device path. Then
> when you driver gets connected that handle exists. If you pass in a NULL
> handle to InstallMultipleProtocolInterfaces() it will create a new handle.
As I understand it, I first need to create a Handle. I Wrote:
EFI_STATUS
EFIAPI
MyLoadFile (
IN EFI_LOAD_FILE_PROTOCOL *This,
IN EFI_DEVICE_PATH_PROTOCOL *FilePath,
IN BOOLEAN BootPolicy,
IN OUT UINTN*BufferSize,
IN VOID *Buffer OPTIONAL
)
{
AsciiPrint("TRY LOAD FILE!\n");
//return EFI_SUCCESS;
return EFI_DEVICE_ERROR;
}
static EFI_LOAD_FILE_PROTOCOL mLoadFileProtocolAccess = { MyLoadFile };
EFI_STATUS
EFIAPI
DxeInitializeMyDXE (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
EFI_STATUSStatus;
EFI_HANDLEMyDevice=NULL;
Status = gBS->InstallMultipleProtocolInterfaces(
&MyDevice,
&gEfiLoadFileProtocolGuid,
&mLoadFileProtocolAccess,
NULL
);
return Status;
}
As I understand this code must create new Handle and do nothing.
After what I may to bind this Handle to device path. (It is a next stage for me)
When running in QEMU program, UEFI stops after some while. What I make wrong?
> So in the entry point to your driver you need to install a new Handle with
> the root node of your device path
I do not understand, how can I do it?
---
Best regards,
Leonid Myravjev
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
___
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Re: [edk2] Questions about booting
> You just did it. All you need to do is add a device path, protocol to the > handle. I did it, all works! My brain is back from a state of collapse. Andrew, thank you very much! --- Best regards, Leonid Myravjev -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk ___ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
