Comments (4)
Yes, this will be needed.
To be precise, the BIOS console driver, as well as the intended replacement for Advantech, the headless console driver, both setup a scheduler timer that calls a callback function every 8 jiffies. This callback function polls the BIOS and if input is ready, inserts a character into a TTY character queue that also wakes up any waiting processes.
I mention this because my thoughts are for the Advantech that it could use a modified headless driver that initializes the hardware serial port (no BIOS), then uses only a real hardware interrupt to process incoming characters, instead of the scheduling callback function. No BIOS polling required, and the system can wait in the HLT instruction. This entire scenario could be emulated with EMU86.
Of course, a timer is still required for ELKS, for two reasons: to update jiffies, and for implementing scheduler timer callbacks, of which select() is dependent on for accurate timeouts. Because of this, I recommend the implementation of a timer that attempts to emulate wall time, which would be suspended when active execution is stopped (at the emulator prompt). This would allow select() to function more accurately (until the HLT instruction). This could be implemented in a very basic way by having the timer count down by an amount linear to the number of CPU instructions emulated, say, 4 cycles per byte of code accessed.
Is this how you are implementing the Advantech hw timer emulator?
from emu86.
Hello @mfld-fr,
I have not yet updated the EMU86 commit in ELKS tools/Makefile to use the enhancements added several weeks ago, because the out-of-the-box EMU86 won't run ELKS without the INT 8 simulated on HLT.
Would you be open to a temporary PR that added INT 8 back in, for the purpose of having an EMU86 commit that would coincide with the ELKS v0.4.0 release? I think it would be nice to have an EMU86 commit that worked with ELKS, if for no other reason a reference point. This could be removed after a real dummy timer is coded. I plan to release ELKS v0.4.0 very soon.
Thank you!
from emu86.
Moved the temporary code to the right place in #24
from emu86.
Implementation completed in #24
from emu86.
Related Issues (20)
- Trace HW interrupts
- Console mode does not work on Linux HOT 9
- No assertion in BIOS emulation HOT 1
- BIOS INT 13h emulation HOT 2
- TF flag emulation HOT 4
- MSDOS or FreeDOS does not boot under EMU86 HOT 27
- Control-C breaks Linux terminal after exiting HOT 4
- Add graphical console using SDL HOT 14
- Use emulated memory as pixels buffer in SDL console HOT 9
- 8254 PIT emulation problem HOT 20
- Use a signal as a means to stop execution and drop into debug console HOT 18
- ELKS boot from disk image fails HOT 1
- Cannot play Alleycat ? HOT 3
- Warnings now errors in macOS port HOT 14
- Add symbols to disassembly listing HOT 3
- Compile fails when SERIAL=pty HOT 5
- Cannot debug with SERIAL=stdio
- Adaptative IPS HOT 1
- Add option to report current build configuration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emu86.