| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Peripherals/Bus/ |
| D | BusControllerProxy.cs | 33 … public virtual byte ReadByte(ulong address, IPeripheral context = null, ulong? cpuState = null) in ReadByte() argument 35 if(ValidateOperation(ref address, BusAccessPrivileges.Read, context)) in ReadByte() 37 return ParentController.ReadByte(address, context, cpuState); in ReadByte() 42 … public virtual byte ReadByteWithState(ulong address, IPeripheral context, IContextState stateObj) in ReadByteWithState() argument 44 if(ValidateOperation(ref address, BusAccessPrivileges.Read, context)) in ReadByteWithState() 46 return ParentController.ReadByteWithState(address, context, stateObj); in ReadByteWithState() 51 …public virtual void WriteByte(ulong address, byte value, IPeripheral context = null, ulong? cpuSta… in WriteByte() argument 53 if(ValidateOperation(ref address, BusAccessPrivileges.Write, context)) in WriteByte() 55 ParentController.WriteByte(address, value, context, cpuState); in WriteByte() 59 …public virtual void WriteByteWithState(ulong address, byte value, IPeripheral context, IContextSta… in WriteByteWithState() argument [all …]
|
| D | IBusController.cs | 27 byte ReadByte(ulong address, IPeripheral context = null, ulong? cpuState = null); in ReadByte() argument 28 byte ReadByteWithState(ulong address, IPeripheral context, IContextState stateObj); in ReadByteWithState() argument 29 … void WriteByte(ulong address, byte value, IPeripheral context = null, ulong? cpuState = null); in WriteByte() argument 30 … void WriteByteWithState(ulong address, byte value, IPeripheral context, IContextState stateObj); in WriteByteWithState() argument 32 ushort ReadWord(ulong address, IPeripheral context = null, ulong? cpuState = null); in ReadWord() argument 33 ushort ReadWordWithState(ulong address, IPeripheral context, IContextState stateObj); in ReadWordWithState() argument 34 … void WriteWord(ulong address, ushort value, IPeripheral context = null, ulong? cpuState = null); in WriteWord() argument 35 … void WriteWordWithState(ulong address, ushort value, IPeripheral context, IContextState stateObj); in WriteWordWithState() argument 37 uint ReadDoubleWord(ulong address, IPeripheral context = null, ulong? cpuState = null); in ReadDoubleWord() argument 38 uint ReadDoubleWordWithState(ulong address, IPeripheral context, IContextState stateObj); in ReadDoubleWordWithState() argument [all …]
|
| D | SystemBusGenerated.cs | 23 public byte ReadByte(ulong address, IPeripheral context = null, ulong? cpuState = null) in ReadByte() argument 26 if(IsAddressRangeLocked(address.By((ulong)accessWidth), context)) in ReadByte() 33 using(SetLocalContext(context, cpuState)) in ReadByte() 35 …if(!TryFindPeripheralAccessMethods(address, context, out var accessMethods, out var startAddress, … in ReadByte() 67 public byte ReadByteWithState(ulong address, IPeripheral context, IContextState stateObj) in ReadByteWithState() argument 70 if(!TryConvertStateToUlongForContext(context, stateObj, out ulong? state)) in ReadByteWithState() 76 return ReadByte(address, context, state); in ReadByteWithState() 79 …public void WriteByte(ulong address, byte value, IPeripheral context = null, ulong? cpuState = nul… in WriteByte() argument 82 if(IsAddressRangeLocked(address.By((ulong)accessWidth), context)) in WriteByte() 89 using(SetLocalContext(context, cpuState)) in WriteByte() [all …]
|
| D | SystemBus.cs | 116 … RegisterInner(peripheral, methods, contextRegistration, context: contextRegistration.Initiator); in Register() 126 …Registration) => RegisterInner(peripheral, methods, contextRegistration, context: contextRegistrat… in Register() 131 …Registration) => RegisterInner(peripheral, methods, contextRegistration, context: contextRegistrat… in Register() 160 …xt(IBusPeripheral peripheral, BusRangeRegistration newRegistration, ICPU context, Func<IEnumerable… in MoveRegistrationWithinContext() argument 162 if(context == null && !TryFindCurrentThreadCPUAndId(out context, out var _)) in MoveRegistrationWithinContext() 167 …var busRegisteredEntries = peripheralsCollectionByContext[context].Peripherals.Where(x => x.Periph… in MoveRegistrationWithinContext() 189 if(IsAddressRangeLocked(busRegistered.RegistrationPoint.Range, context)) in MoveRegistrationWithinContext() 193 UnregisterAccessFlags(busRegistered.RegistrationPoint, context); in MoveRegistrationWithinContext() 194 peripheralsCollectionByContext.WithStateCollection(context, null, collection => in MoveRegistrationWithinContext() 201 AddMappingsForPeripheral(peripheral, newRegistration, context); in MoveRegistrationWithinContext() [all …]
|
| D | SystemBusGenerated.tt | 47 …public <#= type #> Read<#= name #>(ulong address, IPeripheral context = null, ulong? cpuState = nu… 50 if(IsAddressRangeLocked(address.By((ulong)accessWidth), context)) 57 using(SetLocalContext(context, cpuState)) 59 …if(!TryFindPeripheralAccessMethods(address, context, out var accessMethods, out var startAddress, … 91 …public <#= type #> Read<#= name #>WithState(ulong address, IPeripheral context, IContextState stat… 94 if(!TryConvertStateToUlongForContext(context, stateObj, out ulong? state)) 96 ….Log(LogLevel.Warning, "Tried to read {0} bytes at 0x{1:X} but failed on context state conversion,… 100 return Read<#=name#>(address, context, state); 103 …public void Write<#=name#>(ulong address, <#=type#> value, IPeripheral context = null, ulong? cpuS… 106 if(IsAddressRangeLocked(address.By((ulong)accessWidth), context)) [all …]
|
| D | Redirector.cs | 78 public byte[] ReadBytes(long offset, int count, IPeripheral context = null) in ReadBytes() argument 80 … return systemBus.ReadBytes(redirectedAddress + checked((ulong)offset), count, context: context); in ReadBytes() 83 …oid WriteBytes(long offset, byte[] array, int startingIndex, int count, IPeripheral context = null) in WriteBytes() argument 85 … systemBus.WriteBytes(array, redirectedAddress + checked((ulong)offset), count, context: context); in WriteBytes()
|
| D | IMultibyteWritePeripheral.cs | 14 byte[] ReadBytes(long offset, int count, IPeripheral context = null); in ReadBytes() argument 15 …id WriteBytes(long offset, byte[] array, int startingIndex, int count, IPeripheral context = null); in WriteBytes() argument
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/DMA/ |
| D | NPCX_MDMA.cs | 46 foreach(var context in channelContexts) in Reset() 48 context.Reset(); in Reset() 62 DMAChannelContext context; in DefineRegisters() 66 context = DefineChannel0Registers(sourceAddress); in DefineRegisters() 69 context = DefineChannel1Registers(destinationAddress); in DefineRegisters() 75 channelContexts[channelIdx] = context; in DefineRegisters() 79 .WithFlag(0, out context.Enabled, name: "MDMAEN (MDMA Enable)", in DefineRegisters() 87 context.Enabled.Value = true; in DefineRegisters() 93 … if(context.Direction == DMAChannelContext.TransferDirection.ToPeripheral) in DefineRegisters() 97 context.TryPerformCopy(); in DefineRegisters() [all …]
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Peripherals/DMA/ |
| D | DmaEngine.cs | 23 public Response IssueCopy(Request request, CPU.ICPU context = null) in IssueCopy() argument 42 var whatIsAtSource = sysbus.WhatIsAt(sourceAddress, context); in IssueCopy() 57 sysbus.ReadBytes(sourceAddress, request.Size, buffer, 0, context: context); in IssueCopy() 66 sysbus.ReadBytes(sourceAddress, readLengthInBytes, buffer, 0, context: context); in IssueCopy() 80 buffer[transferred] = sysbus.ReadByte(readAddress, context); in IssueCopy() 83 … BitConverter.GetBytes(sysbus.ReadWord(readAddress, context)).CopyTo(buffer, transferred); in IssueCopy() 86 … BitConverter.GetBytes(sysbus.ReadDoubleWord(readAddress, context)).CopyTo(buffer, transferred); in IssueCopy() 89 … BitConverter.GetBytes(sysbus.ReadQuadWord(readAddress, context)).CopyTo(buffer, transferred); in IssueCopy() 104 var whatIsAtDestination = sysbus.WhatIsAt(destinationAddress, context); in IssueCopy() 121 sysbus.WriteBytes(buffer, destinationAddress, context: context); in IssueCopy() [all …]
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Storage/VirtIO/ |
| D | Virtqueue.cs | 48 …var readData = parent.SystemBus.ReadBytes(Descriptor.BufferAddress, toRead, context: GetCurrentCon… in TryReadFromBuffers() 80 …parent.SystemBus.WriteBytes(data, Descriptor.BufferAddress, (long)toWrite, context: GetCurrentCont… in TryWriteToBuffers() 103 …ent.SystemBus.ReadWord(AvailableAddress + (ulong)UsedAndAvailable.Index, context: GetCurrentContex… in Handle() 134 var context = GetCurrentContext(); in WriteVirtqueueUsed() 139 … parent.SystemBus.WriteWord(UsedAddress + (ulong)UsedAndAvailable.Flags, 0, context: context); in WriteVirtqueueUsed() 140 …mBus.WriteDoubleWord(ringAddress + (ulong)UsedRing.Index, (uint)chainFirstIndex, context: context); in WriteVirtqueueUsed() 141 …temBus.WriteDoubleWord(ringAddress + (ulong)UsedRing.Length, (uint)BytesWritten, context: context); in WriteVirtqueueUsed() 142 …iteWord(UsedAddress + (ulong)UsedAndAvailable.Index, (ushort)UsedIndexForDriver, context: context); in WriteVirtqueueUsed() 163 …es = parent.SystemBus.ReadBytes(descriptorAddress, DescriptorSizeOffset, context: GetCurrentContex… in ReadDescriptorMetadata() 206 var context = GetCurrentContext(); in ReadDescriptorFromAvail() [all …]
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Core/Extensions/ |
| D | MemoryDumpExtensions.cs | 18 … DumpBinary(this IMemory memory, SequencedFilePath fileName, ulong offset = 0, ICPU context = null) in DumpBinary() argument 20 memory.DumpBinary(fileName, offset, (ulong)memory.Size - offset, context); in DumpBinary() 23 …ary(this IMemory memory, SequencedFilePath fileName, ulong offset, ulong size, ICPU context = null) in DumpBinary() argument 34 WriteBinaryMemoryChunk(writer, memory, offset, i, context); in DumpBinary() 39 WriteBinaryMemoryChunk(writer, memory, offset, windows, context, lastChunkSize); in DumpBinary() 48 …(this IMemory memory, SequencedFilePath fileName, ulong offset = 0, ICPU context = null, HexAddres… in DumpHEX() argument 50 memory.DumpHEX(fileName, offset, (ulong)memory.Size - offset, context, addressOption); in DumpHEX() 53 …emory memory, SequencedFilePath fileName, ulong offset, ulong size, ICPU context = null, HexAddres… in DumpHEX() argument 81 … WriteHexMemoryChunk(writer, memory, offset, baseAddress, ref extendedAddress, i, context); in DumpHEX() 86 …oryChunk(writer, memory, offset, baseAddress, ref extendedAddress, chunks, context, lastChunkSize); in DumpHEX() [all …]
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/CPU/GuestProfiling/ |
| D | BaseProfiler.cs | 92 context = new Stack<Stack<string>>(); in ProfilerContext() 98 if(context.Count == 0) in PopCurrentStack() 104 currentStack = context.Pop(); in PopCurrentStack() 110 context.Push(currentStack); in PushCurrentStack() 116 context.Clear(); in Clear() 119 public int Count => context.Count; 123 private readonly Stack<Stack<string>> context; field in Antmicro.Renode.Peripherals.CPU.GuestProfiling.BaseProfiler.ProfilerContext
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Extensions/Utilities/GDB/Commands/ |
| D | ReadMemoryCommand.cs | 35 if(manager.Machine.SystemBus.WhatIsAt(access.Address, context: manager.Cpu) == null) in Execute() 47 … val = manager.Machine.SystemBus.ReadByte(access.Address, context: manager.Cpu); in Execute() 51 … val = manager.Machine.SystemBus.ReadWord(access.Address, context: manager.Cpu); in Execute() 55 … val = manager.Machine.SystemBus.ReadDoubleWord(access.Address, context: manager.Cpu); in Execute() 59 … val = manager.Machine.SystemBus.ReadQuadWord(access.Address, context: manager.Cpu); in Execute() 63 …ta = manager.Machine.SystemBus.ReadBytes(access.Address, (int)access.Length, context: manager.Cpu); in Execute()
|
| D | WriteDataToMemoryCommand.cs | 64 … manager.Machine.SystemBus.WriteByte(access.Address, (byte)val, context: manager.Cpu); in WriteData() 67 … manager.Machine.SystemBus.WriteWord(access.Address, (ushort)val, context: manager.Cpu); in WriteData() 70 … manager.Machine.SystemBus.WriteDoubleWord(access.Address, (uint)val, context: manager.Cpu); in WriteData() 73 … manager.Machine.SystemBus.WriteQuadWord(access.Address, (ulong)val, context: manager.Cpu); in WriteData() 76 …stemBus.WriteBytes(data, access.Address, startingIndex, (long)access.Length, context: manager.Cpu); in WriteData()
|
| D | CalculateCRCCommand.cs | 41 if(manager.Machine.SystemBus.WhatIsAt(access.Address, context: manager.Cpu) == null) in Execute() 48 …es(access.Address, (int)access.Length, data, currentIndex, onlyMemory: true, context: manager.Cpu); in Execute()
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/Wireless/ |
| D | AT86RF233.cs | 81 result = HandleRegisterRead((Registers)context); in Transmit() 85 HandleRegisterWrite((Registers)context, data); in Transmit() 92 return HandleFrameBufferRead(context++); in Transmit() 96 HandleFrameBufferWrite(context++, data); in Transmit() 137 context = (byte)(data & 0x3F); in HandleCommandByte() 138 …this.DebugLog("Register 0x{0:X} {1} request", context, accessType == AccessType.ReadAccess ? "read… in HandleCommandByte() 142 context = -1; in HandleCommandByte() 210 this.Log(LogLevel.Warning, "Read from unexpected register: 0x{0:X}", context); in HandleRegisterRead() 249 … this.Log(LogLevel.Warning, "Write value 0x{0:X} to unexpected register: 0x{1:X}", data, context); in HandleRegisterWrite() 261 if(context < frameBuffer.Length) in HandleFrameBufferRead() [all …]
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Core/ |
| D | ObjectCreator.cs | 26 var context = new Context(this); in OpenContext() 27 contexts.Push(context); in OpenContext() 28 return context; in OpenContext() 91 private void CloseContext(Context context) in CloseContext() argument 93 if(context != contexts.Peek()) in CloseContext()
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Utilities/GDB/ |
| D | Command.cs | 206 …private static object HandleArgumentNotResolved(ParsingContext context, ParameterInfo parameterInf… in HandleArgumentNotResolved() argument 214 var startPosition = context.CurrentPosition; in HandleArgumentNotResolved() 217 if(startPosition > context.Packet.Data.DataAsString.Length) in HandleArgumentNotResolved() 222 …var separatorPosition = attribute.Separator == '\0' ? -1 : context.Packet.Data.DataAsString.IndexO… in HandleArgumentNotResolved() 223 …var length = (separatorPosition == -1 ? context.Packet.Data.DataAsString.Length : separatorPositio… in HandleArgumentNotResolved() 224 var valueToParse = context.Packet.Data.DataAsString.Substring(startPosition, length); in HandleArgumentNotResolved() 225 context.CurrentPosition += length + 1; in HandleArgumentNotResolved() 234 return context.Packet.Data.DataAsBinary.Skip(startPosition).ToArray(); in HandleArgumentNotResolved()
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Extensions/Utilities/ |
| D | MachineExtensions.cs | 53 …ddress, string bootargs = null, bool append = true, string disabledNodes = "", ICPU context = null) in LoadFdt() argument 63 sysbus.WriteBytes(fdtBlob, address, true, context); in LoadFdt() 112 sysbus.WriteBytes(fdtBlob, address, true, context); in LoadFdt() 115 …iteASCIIString(this IBusController sysbus, ulong address, string stringToLoad, ICPU context = null) in WriteASCIIString() argument 117 sysbus.WriteBytes(Encoding.ASCII.GetBytes(stringToLoad), address, true, context); in WriteASCIIString()
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/CPU/Disassembler/ |
| D | LLVMDisassembler.cs | 104 context = llvm_create_disasm_cpu_with_flags(triple, cpu, flags); in LLVMDisasWrapper() 112 context = llvm_create_disasm_cpu(triple, cpu); in LLVMDisasWrapper() 115 if(context == IntPtr.Zero) in LLVMDisasWrapper() 145 if(context != IntPtr.Zero) in Dispose() 147 llvm_disasm_dispose(context); in Dispose() 158 …var bytes = llvm_disasm_instruction(context, marshalledData, (ulong)(data.Length - memoryOffset), … in TryDisassembleInstruction() 267 private readonly IntPtr context; field in Antmicro.Renode.Peripherals.CPU.Disassembler.LLVMDisassembler.LLVMDisasWrapper
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/Sensors/ |
| D | PAC1934.cs | 71 return ReadRegister((uint)context); in Read() 79 context = (Registers)data[0]; in Write() 80 state = GetStateBasedOnContext(context); in Write() 86 WriteRegister(context, data[0]); in Write() 93 context = default(Registers); in Reset() 160 private Registers context; field in Antmicro.Renode.Peripherals.Sensors.PAC1934
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Cores/Debug/ |
| D | CPUTracer.cs | 146 var readBytes = bus.ReadBytes(value, SizeOfStringBatch, context: cpu); in TranslateParameter() 164 return bus.ReadBytes(value, size, context: cpu); in TranslateParameter() 169 … Buffer.BlockCopy(bus.ReadBytes(value, byteLength, context: cpu), 0, intResult, 0, byteLength); in TranslateParameter() 176 … Buffer.BlockCopy(bus.ReadBytes(value, byteLength, context: cpu), 0, uintResult, 0, byteLength); in TranslateParameter()
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Peripherals/UART/ |
| D | VirtualConsole.cs | 95 public long WriteBufferToMemory(ulong address, int maxCount, ICPU context = null) in WriteBufferToMemory() argument 98 bus.WriteBytes(buffer, address, true, context); in WriteBufferToMemory()
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Peripherals/CPU/ExecutionTracer/ |
| D | TraceWriter.cs | 67 var key = AttachedCPU.Bus.ReadDoubleWord(pc, context: AttachedCPU); in TryReadAndDisassembleInstruction() 71 var mem = AttachedCPU.Bus.ReadBytes(pc, MaxOpcodeBytes, context: AttachedCPU); in TryReadAndDisassembleInstruction()
|
| /Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Extensions/UserInterface/ |
| D | MonitorCommands.cs | 923 var context = CreateInvocationContext(device, info); in InvokeGet() 924 if(context != null) in InvokeGet() 926 return Dynamic.InvokeGet(context, info.Name); in InvokeGet() 946 var context = CreateInvocationContext(device, info); in InvokeSet() 947 if(context != null) in InvokeSet() 949 Dynamic.InvokeSet(context, info.Name, parameter); in InvokeSet() 971 var context = InvokeContext.CreateStatic(method.ReflectedType); in InvokeExtensionMethod() 972 if(context != null) in InvokeExtensionMethod() 974 … return InvokeWithContext(context, method, (new [] { device }.Concat(parameters)).ToArray()); in InvokeExtensionMethod() 984 var context = CreateInvocationContext(device, method); in InvokeMethod() [all …]
|