[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
figure out bochs keypress and clock speed and timecounter?
I have used bochs successfully for several years. It is normal to have to
adjust keyboard_serial_delay and cpu: ips and after a few tries an
acceptable setting can be found.
But yesterday, I couldn't figure out keyboard_serial_delay on amd64
1895.61 MhZ running NetBSD -current.
I have tried numerous from 5 (lowest allowed) to 150000. At the boot
loader I can type fine, but once NetBD comes up (booting i386 NetBSD) my
keys always repeat way too fast. For example:
At the boot loader itself, I can type "boot" fine though. This problem is
after the kernel boots.
I built with --enable-show-ips and am using approximately the ips it
displays 'cpu: ips=12712908'
dmesg (within the bochs) says my cpu is around 127 MHz.
I want it way faster, but I guess I can live with that.
I also tried many keyboard_paste_delays (from lowest allowed 1000 to
999999999) but didn't notice any difference.
I also tried many vga_update_interval values but didn't notice difference.
To get my keyboard to work I increase my ips way higher than bochs
reported to like 'cpu: ips=50000000'. Then my keypresses don't repeat (at
least not as often). My CPU speed (in dmesg) is still 127 MHz.
(I am guessing that is CPU speed is reported wrong anyways, as I think
even a 450 MHz system can emulate over 150MHz. Is that something the
kernel benchmarks/figures out and should be precise? Or is that just what
the system told the speed is?)
But then I get new problems: initial boot up is very slow. For example,
the boot loader five second countdown takes almost a minute.
But then when NetBSD kernel actually loads, I get the opposite: time is
going fast. sleep and date are running about triple time.
Maybe this is related -- part of my dmesg in bochs:
total memory = 32316 KB
rbus: rbus_min_start set to 0x20000000
avail memory = 21524 KB
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
BIOS32 rev. 0 found at 0xfaa40
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Unknown AMD64 CPU (686-class), 127.13 MHz, id 0xf20
cpu0: features efd8bb7b<FPU,VME,PSE,TSC,MSR,PAE,CX8,APIC,SEP,MTRR>
cpu0: features efd8bb7b<PGE,CMOV,MPC,NOX,MMXX,MMX>
cpu0: features efd8bb7b<FXSR,SSE,SSE2,B27,LONG,3DNOW2,3DNOW>
cpu0: features2 802201<SSE3>
cpu0: "AMD Athlon(tm) processor"
cpu0: I-cache 64 KB 64B/line 2-way, D-cache 64 KB 64B/line 2-way
cpu0: L2 cache 512 KB 64B/line 16-way
cpu0: ITLB 255 4 KB entries direct-mapped, 255 4 MB entries direct-mapped
cpu0: DTLB 255 4 KB entries direct-mapped, 255 4 MB entries direct-mapped
cpu0: AMD Power Management features: 0
cpu0: calibrating local timer
cpu0: apic clock running at 127 MHz
Some of my sysctl's:
kern.clockrate: tick = 10000, tickadj = 40, hz = 100, profhz = 100, stathz
kern.monotonic_clock = 200112
kern.hardclock_ticks = 21162
kern.timecounter.choice = clockinterrupt(q=0, f=100 Hz) TSC(q=-100,
f=50000430 Hz) ACPI-Safe(q=900, f=3579545 Hz) i8254(q=100, f=1193182 Hz)
dummy(q=-1000000, f=1000000 Hz)
kern.timecounter.hardware = ACPI-Safe
kern.timecounter.timestepwarnings = 0
(I never changed them.)
So what I am looking for:
- system to run at correct clock speed so sleep and date are correct
- keypresses to not repeat
- and maybe over 127MHz
I don't know if this is some bochs configuration or NetBSD tunable or
Jeremy C. Reed
Main Index |
Thread Index |