Beispiel #1
0
        public Status FreePool <T>(T[] arr)
        {
#if DEBUG
            AllocateCount--;
#endif
            return((Status)RawCalliHelper.StdCall(_FreePool, Unsafe.As <T[], IntPtr>(ref arr)));
        }
Beispiel #2
0
 public unsafe Status GetInfo(ref Guid type, ref ulong bufSize, out FileInfo buf) {
     fixed(FileProtocol *_this = &this)
     fixed(Guid * _type    = &type)
     fixed(ulong *_bufSize = &bufSize)
     fixed(FileInfo * _buf = &buf)
     return((Status)RawCalliHelper.StdCall(_GetInfo, _this, _type, _bufSize, _buf));
 }
Beispiel #3
0
        // TODO: Figure out how to get rid of this pointer
        public unsafe Status AllocatePool(MemoryType type, ulong size, IntPtr *buf)
        {
#if DEBUG
            AllocateCount++;
#endif
            return((Status)RawCalliHelper.StdCall(_AllocatePool, type, size, buf));
        }
Beispiel #4
0
 public unsafe Status GetMemoryMap(ref ulong memMapSize, IntPtr memMap, out ulong mapKey, out ulong descSize, out uint descVer) {
     fixed(ulong *_memMapSize = &memMapSize)
     fixed(ulong *_mapKey   = &mapKey)
     fixed(ulong *_descSize = &descSize)
     fixed(uint *_descVer   = &descVer)
     return((Status)RawCalliHelper.StdCall(_GetMemoryMap, _memMapSize, memMap, _mapKey, _descSize, _descVer));
 }
Beispiel #5
0
        public Status FreePool(IntPtr buf)
        {
#if DEBUG
            AllocateCount--;
#endif
            return((Status)RawCalliHelper.StdCall(_FreePool, buf));
        }
Beispiel #6
0
 public unsafe Status SetCursorPosition(ulong column, ulong row) {
     fixed(SimpleTextOutputProtocol *_this = &this)
     return((Status)RawCalliHelper.StdCall(_SetCursorPosition, _this, column, row));
 }
Beispiel #7
0
 public unsafe Status ClearScreen() {
     fixed(SimpleTextOutputProtocol *_this = &this)
     return((Status)RawCalliHelper.StdCall(_ClearScreen, _this));
 }
Beispiel #8
0
 public unsafe Status GetControllerName(Handle controller, Handle child, NativeArray <byte> language, out ReadonlyNativeString name) {
     fixed(ComponentName2Protocol *_this = &this)
     fixed(ReadonlyNativeString * _name = &name)
     return((Status)RawCalliHelper.StdCall(_GetControllerName, _this, controller, child, language, _name));
 }
Beispiel #9
0
 public unsafe Status SetMode(uint mode) {
     fixed(GraphicsOutputProtocol *_this = &this)
     return((Status)RawCalliHelper.StdCall(_SetMode, _this, mode));
 }
Beispiel #10
0
 public Status SetWatchdogTimer(ulong timeout, ulong code, ulong dataSize, IntPtr data)
 => (Status)RawCalliHelper.StdCall(_SetWatchdogTimer, timeout, code, dataSize, data);
Beispiel #11
0
 public unsafe Status Close() {
     fixed(FileProtocol *_this = &this)
     return((Status)RawCalliHelper.StdCall(_Close, _this));
 }
Beispiel #12
0
 public unsafe Status CloseProtocol(Handle handle, ref Guid protocol, Handle agent, Handle controller) {
     fixed(Guid *pProt = &protocol)
     return((Status)RawCalliHelper.StdCall(_CloseProtocol, handle, pProt, agent, controller));
 }
Beispiel #13
0
 public unsafe Status HandleProtocol(Handle handle, ref Guid protocol, out IntPtr iface) {
     fixed(Guid *_protocol = &protocol)
     fixed(IntPtr * _iface = &iface)
     return((Status)RawCalliHelper.StdCall(_HandleProtocol, handle, _protocol, _iface));
 }
Beispiel #14
0
 // TODO: Get rid of the out Handle* and use an out Handle[] or out NativeArray<Handle> instead
 public unsafe Status LocateHandleBuffer(LocateSearchType searchType, ref Guid protocol, IntPtr searchKey, ref ulong numHandles, out NativeArray <Handle> buffer) {
     fixed(Guid *_protocol = &protocol)
     fixed(ulong *_numHandles            = &numHandles)
     fixed(NativeArray <Handle> *_buffer = &buffer)
     return((Status)RawCalliHelper.StdCall(_LocateHandleBuffer, searchType, _protocol, searchKey, _numHandles, _buffer));
 }
Beispiel #15
0
 public Status ExitBootServices(Handle imageHandle, ulong mapKey)
 => (Status)RawCalliHelper.StdCall(_ExitBootServices, imageHandle, mapKey);
Beispiel #16
0
 public unsafe Status OpenProtocol <T>(Handle handle, ref Guid protocol, out ReadonlyNativeReference <T> iface, Handle agent, Handle controller, uint attr) where T : unmanaged {
     fixed(Guid *_protocol = &protocol)
     fixed(ReadonlyNativeReference <T> *_iface = &iface)
     return((Status)RawCalliHelper.StdCall(_OpenProtocol, handle, _protocol, _iface, agent, controller, attr));
 }
Beispiel #17
0
 public unsafe Status EnableCursor(bool visible) {
     fixed(SimpleTextOutputProtocol *_this = &this)
     return((Status)RawCalliHelper.StdCall(_EnableCursor, _this, visible));
 }
Beispiel #18
0
 public unsafe Status Read(ref ulong bufSize, IntPtr buf) {
     fixed(FileProtocol *_this = &this)
     fixed(ulong *_bufSize = &bufSize)
     return((Status)RawCalliHelper.StdCall(_Read, _this, _bufSize, buf));
 }
Beispiel #19
0
 public unsafe Status Open(out ReadonlyNativeReference <FileProtocol> newHandle, string filename, FileMode mode, FileAttribute attr) {
     fixed(FileProtocol *_this = &this)
     fixed(ReadonlyNativeReference <FileProtocol> *_newHandle = &newHandle)
     fixed(char *f = &filename._firstChar)
     return((Status)RawCalliHelper.StdCall(_Open, _this, _newHandle, f, mode, attr));
 }
Beispiel #20
0
 public unsafe Status OpenVolume(out ReadonlyNativeReference <FileProtocol> root) {
     fixed(SimpleFileSystemProtocol *_this = &this)
     fixed(ReadonlyNativeReference <FileProtocol> *_root = &root)
     return((Status)RawCalliHelper.StdCall(_OpenVolume, _this, _root));
 }
Beispiel #21
0
 public unsafe Status Reset(bool ExtendedVerification) {
     fixed(SimpleTextOutputProtocol *_this = &this)
     return((Status)RawCalliHelper.StdCall(_Reset, _this, &ExtendedVerification));
 }
Beispiel #22
0
 public void SetMem(IntPtr buf, ulong size, byte val)
 => RawCalliHelper.StdCall(_SetMem, buf, size, val);
Beispiel #23
0
 public unsafe Status SetPosition(ulong pos) {
     fixed(FileProtocol *_this = &this)
     return((Status)RawCalliHelper.StdCall(_SetPosition, _this, pos));
 }
Beispiel #24
0
 public unsafe Status TestString(ReadonlyNativeString str) {
     fixed(SimpleTextOutputProtocol *_this = &this)
     return((Status)RawCalliHelper.StdCall(_TestString, _this, str));
 }
Beispiel #25
0
 public unsafe Status QueryMode(uint modeNumber, out ulong sizeOfInfo, out ReadonlyNativeReference <GraphicsOutputModeInformation> info) {
     fixed(GraphicsOutputProtocol *_this = &this)
     fixed(ulong *_sizeOfInfo = &sizeOfInfo)
     fixed(ReadonlyNativeReference <GraphicsOutputModeInformation> *_info = &info)
     return((Status)RawCalliHelper.StdCall(_QueryMode, _this, modeNumber, _sizeOfInfo, _info));
 }
Beispiel #26
0
 public unsafe Status QueryMode(ulong mode, out ulong columns, out ulong rows) {
     fixed(SimpleTextOutputProtocol *_this = &this)
     fixed(ulong *_columns = &columns, _rows = &rows)
     return((Status)RawCalliHelper.StdCall(_QueryMode, _this, mode, _columns, _rows));
 }
Beispiel #27
0
 // Change these 2 functions to use byte[] insteadd of NativeArray<byte>, and maybe string instead of ReadonlyNativeString
 public unsafe Status GetDriverName(NativeArray <byte> language, out ReadonlyNativeString name) {
     fixed(ComponentName2Protocol *_this = &this)
     fixed(ReadonlyNativeString * _name = &name)
     return((Status)RawCalliHelper.StdCall(_GetDriverName, _this, language, _name));
 }
Beispiel #28
0
 public unsafe Status SetMode(ulong mode) {
     fixed(SimpleTextOutputProtocol *_this = &this)
     return((Status)RawCalliHelper.StdCall(_SetMode, _this, mode));
 }
Beispiel #29
0
 public void OutputString(void *handle, char *str)
 {
     RawCalliHelper.StdCall(_outputString, (byte *)handle, str);
 }
Beispiel #30
0
 public unsafe Status SetAttribute(ulong attribute) {
     fixed(SimpleTextOutputProtocol *_this = &this)
     return((Status)RawCalliHelper.StdCall(_SetAttribute, _this, attribute));
 }