flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > Question about devices with UEFI |
Author |
|
Feryno 13 Dec 2020, 16:55
you should probably study https://www.tianocore.org/
|
|||
13 Dec 2020, 16:55 |
|
Fulgurance 15 Dec 2020, 08:08
I understood its on the media section with block functions, but I don't understand something, many function take mediaid to parameters, but how can I get all media ID for each connected devices?
|
|||
15 Dec 2020, 08:08 |
|
bzt 16 Mar 2021, 22:21
This isn't that simple. UEFI uses protocols, so also depends on what you mean by "write on devices"? If you mean file level access, then simply use "FS0:", "FS1:" etc. If you mean sector writes, then you'll need EFI_BLOCK_IO_PROTOCOL. You can query a list of handlers which do implement that protocol using LocateHandle and then HandleProtocol on each returned handle. This does not guarantee that all connected devices will be returned, it only guarantees that all devices which implements sector read/write returned.
I've written a small UEFI wrapper to provide POSIX-like interface for UEFI. See POSIX-UEFI. There for opening "/dev/diskX" pseudo-files with fopen(), I've implemented the aforementioned method to find devices that support block io, see here. It's in ANSI C, but you can translate that to your UEFI Assembly calls. Cheers, bzt |
|||
16 Mar 2021, 22:21 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.