Skip to content

Commit 409dbed

Browse files
author
Alexei Gladkikh
committed
Fixed VirtARM test and added linux buildroot patches
1 parent 2a10ba7 commit 409dbed

103 files changed

Lines changed: 4413 additions & 114472 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 54 additions & 49 deletions
Large diffs are not rendered by default.

kopycat-modules/cores/x86/src/main/kotlin/ru/inforion/lab403/kopycat/cores/x86/hardware/processors/x86COP.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@ import ru.inforion.lab403.kopycat.interfaces.IInteractive
2020
import ru.inforion.lab403.kopycat.modules.cores.x86Core
2121
import ru.inforion.lab403.kopycat.serializer.loadValue
2222
import java.util.logging.Level
23+
import java.util.logging.Level.*
2324

2425

2526
class x86COP(core: x86Core, name: String) : ACOP<x86COP, x86Core>(core, name) {
2627

2728
companion object {
28-
val log = logger(Level.INFO)
29+
val log = logger(CONFIG)
2930
}
3031

3132
enum class GateType(val id: Int) {
@@ -117,7 +118,7 @@ class x86COP(core: x86Core, name: String) : ACOP<x86COP, x86Core>(core, name) {
117118
if (exception is x86HardwareException) {
118119
error = HardwareError(exception.excCode as ExcCode, exception.errorCode)
119120
if (exception is x86HardwareException.PageFault) {
120-
log.warning { "[${core.pc.hex8}] Page fault for address 0x${exception.address.hex} code=0x${exception.errorCode.hex}" }
121+
log.config { "[${core.pc.hex8}] Page fault for address 0x${exception.address.hex} code=0x${exception.errorCode.hex}" }
121122
CTRLR.cr2.value(core, exception.address)
122123
}
123124
return null
@@ -148,7 +149,7 @@ class x86COP(core: x86Core, name: String) : ACOP<x86COP, x86Core>(core, name) {
148149
// TODO: Who has higher priority software or hardware interrupt in x86?
149150
// Currently hardware interrupt has higher priority
150151
interrupt != null -> {
151-
log.config { "Interrupt request: ${interrupt.stringify()}" }
152+
log.finest { "Interrupt request: ${interrupt.stringify()}" }
152153
interrupt.pending = false
153154
interrupt.inService = true
154155
interrupt.vector
@@ -185,7 +186,7 @@ class x86COP(core: x86Core, name: String) : ACOP<x86COP, x86Core>(core, name) {
185186

186187
val rpl = cs.cpl(core)
187188

188-
log.info {
189+
log.finest {
189190
val context = "cpl=$cpl rpl=$rpl ip=${saved_cs.hex}:${saved_ip.hex} sp=${saved_ss.hex}:${saved_sp.hex} flags=${saved_eflags.hex}"
190191
"--> INT [0x${vector.hex}] IDTR=$idtr hdl=${idtEntry.selector.hex}:${idtEntry.base.hex} $context"
191192
}

kopycat-modules/cores/x86/src/main/kotlin/ru/inforion/lab403/kopycat/cores/x86/instructions/cpu/branch/IRet.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ class IRet(core: x86Core, opcode: ByteArray, prefs: Prefixes):
158158
else protectedMode()
159159
}
160160

161-
log.info {
161+
log.finest {
162162
val prefs = Prefixes(core)
163163
val ip = x86Register.gpr(prefs.opsize, x86GPR.EIP)
164164
val sp = x86Register.gpr(prefs.opsize, x86GPR.ESP)

kopycat-modules/cores/x86/src/main/kotlin/ru/inforion/lab403/kopycat/cores/x86/instructions/cpu/control/Invlpg.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Invlpg(core: x86Core, opcode: ByteArray, prefs: Prefixes, vararg operands:
1313
override val mnem = "invlpg"
1414
override fun execute() {
1515
val page = op1.effectiveAddress(core)
16-
log.severe { "[${core.pc.hex}] Your TLB cache for 0x${page.hex8} invalidate! Ha-ha-ha..." }
16+
log.severe { "[${core.pc.hex}] Your TLB cache for 0x${page.hex8} invalidate!" }
1717
core.mmu.invalidatePageTranslation(page)
1818
}
1919
}

kopycat-modules/cores/x86/src/main/kotlin/ru/inforion/lab403/kopycat/cores/x86/instructions/cpu/system/Hlt.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class Hlt(core: x86Core, opcode: ByteArray, prefs: Prefixes):
1010
override val mnem = "hlt"
1111

1212
override fun execute() {
13+
// log.config { "Processor halt -> wait for interrupt" }
1314
core.cpu.halted = true
1415
}
1516
}

kopycat-modules/cores/x86/src/main/kotlin/ru/inforion/lab403/kopycat/cores/x86/operands/x86Register.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ abstract class x86Register(
327327
object cr2 : CTRLR(eCTRLR.CR2.id)
328328
object cr3 : CTRLR(eCTRLR.CR3.id) {
329329
override fun value(core: x86Core, data: Long) {
330-
log.severe { "[${core.pc.hex}] CR3 register changed to ${data.hex} -> paging cache invalidated!" }
330+
log.fine { "[${core.pc.hex}] CR3 register changed to ${data.hex} -> paging cache invalidated!" }
331331
core.cpu.cregs.writeIntern(reg, data)
332332
core.mmu.invalidatePagingCache()
333333
}

kopycat-modules/mcu/elanSC520/src/main/kotlin/ru/inforion/lab403/kopycat/modules/elanSC520/PIT.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import java.util.logging.Level.FINE
1717
import java.util.logging.Level.FINER
1818

1919
@Suppress("MemberVisibilityCanBePrivate", "PropertyName")
20-
2120
class PIT(parent: Module, name: String) : Module(parent, name) {
2221
companion object {
2322
val log = logger(FINE)
@@ -239,7 +238,7 @@ class PIT(parent: Module, name: String) : Module(parent, name) {
239238
if (it.COUNT == 0) {
240239
ports.irq.request(it.id)
241240
it.COUNT = it.LATCHED
242-
log.fine { "%s counter reached latched value at %,d ns".format(name, core.clock.time(Time.ns)) }
241+
log.finest { "%s counter reached latched value at %,d ns".format(name, core.clock.time(Time.ns)) }
243242
}
244243
}
245244
else -> TODO("Timer mode not implemented yet or not supported ${PITMODECTL.CTR_MODE}")

kopycat-modules/mcu/stm32f0xx/firmwares/usart_crc/.gitignore

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)