Esempio n. 1
0
        private void RequestMemory()
        {
            var size = _Height * _Pitch;

            // TODO: Don't replace Addr field
            _Addr = SysCalls.GetPhysicalMemory(_Addr, (uint)size);
        }
Esempio n. 2
0
        public static unsafe FrameBuffer CreateFrameBuffer()
        {
            var targetProcId = SysCalls.GetProcessIDForCommand(SysCallTarget.GetFramebufferInfo);
            var fbInfoMem    = SysCalls.RequestMessageBuffer(4096, targetProcId);

            SysCalls.GetFramebufferInfo(fbInfoMem);
            var fbPresent = (int *)fbInfoMem.Start;

            if (*fbPresent == 0)
            {
                return(null);
            }

            var fbInfo = *(BootInfoFramebufferInfo *)(fbInfoMem.Start + 4);

            fbInfo.FbAddr = SysCalls.GetPhysicalMemory(fbInfo.FbAddr, fbInfo.RequiredMemory);
            return(new FrameBuffer(ref fbInfo));
        }
Esempio n. 3
0
        public void Init()
        {
            var memorySize = (uint)(_Pitch * _Height * 4);

            _Addr = SysCalls.GetPhysicalMemory(_Addr, memorySize);
        }
Esempio n. 4
0
 public void Initialize()
 {
     _Rows    = 25;
     _Columns = 80;
     BaseAddr = SysCalls.GetPhysicalMemory(0x0B8000, (uint)(_Rows * _Columns * 2));
 }
Esempio n. 5
0
        /// <summary>
        /// Gets a block of memory from the kernel
        /// </summary>
        /// <param name="address">The address.</param>
        /// <param name="size">The size.</param>
        public override ConstrainedPointer GetPhysicalMemory(Pointer address, uint size)
        {
            var virtAddr = (Addr)SysCalls.GetPhysicalMemory((uint)address, size);

            return(new ConstrainedPointer((Pointer)(uint)virtAddr, size));
        }