Specify timermsr on the command line for this and the kernel will instead of
polling the timers look for DSR signal events on the UART, effectively using
the UART as an interrupt controller.
Still need to support routing ECB interrupts this way.
extern int strcmp(const char *, const char *);
+/* Could move to discard */
+uint8_t platform_param(unsigned char *p)
+{
+ used(p);
+ if (strcmp(p, "msr") == 0)
+ timermsr = 1;
+ return 0;
+}
+
void map_init(void)
{
}
pagemap_add(i);
}
-uint8_t platform_param(char *p)
-{
- if (strcmp(p, "compumuse") == 0) {
- return 1;
- }
- return 0;
-}
-
void platform_swap_found(uint8_t letter, uint8_t m)
{
blkdev_t *blk = blk_op.blkdev;
uint16_t ramtop = PROGTOP;
uint16_t swap_dev = 0xFFFF;
+uint8_t timermsr = 0;
/* On idle we spin checking for the terminals. Gives us more responsiveness
for the polled ports */
void platform_interrupt(void)
{
- /* TODO */
tty_poll();
}
void sync_clock(void)
{
- irqflags_t irq = di();
- int16_t tmp;
- if (!re_enter++) {
- sync_clock_read();
- if (oldticks != 0xFF) {
- tmp = newticks - oldticks;
- if (tmp < 0)
- tmp += 60;
- tmp *= 10;
- while(tmp--) {
- timer_interrupt();
+ if (!timermsr) {
+ irqflags_t irq = di();
+ int16_t tmp;
+ if (!re_enter++) {
+ sync_clock_read();
+ if (oldticks != 0xFF) {
+ tmp = newticks - oldticks;
+ if (tmp < 0)
+ tmp += 60;
+ tmp *= 10;
+ while(tmp--) {
+ timer_interrupt();
+ }
+ platform_interrupt();
}
- platform_interrupt();
- }
- re_enter--;
- }
- irqrestore(irq);
+ re_enter--;
+ }
+ irqrestore(irq);
+ }
}
void update_sync_clock(void)