-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdevelopment_notes
158 lines (141 loc) · 5.29 KB
/
development_notes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
visible improvements:
- Add support for Datalink 150S watches (from Frank Denis)
- It will now only search in the users path for serblink and svgablink
not any hard-coded paths.
- settime is now installed by default and will accept a command line for
the different types of watches
- svgablink no longer hangs on exit
02-08-2001 console change
looking at the console change code and the kernel call that is
responsible for that ioctl VT_ACTIVATE drivers/char/vt.c 771
arg--;
-> vc_allocate(arg);
assumption is that is already there
(X was running right?)
-> set_console(arg);
want_console=arg;
tasklet_struct.func = console_softint
tasklet_schedule(&console_tasklet);
-> hide_cursor(fg_console);
-> change_console(want_console);
-> kill_proc (probably)
or -> complete_change_console
VT_WAITACTIVE -> vt_waitactive(arg-1)
VT_DISALLOCATE -> vc_disallocate(arg-1)
sw->con_deinit
XF86 Ver 4.0 code (lnx_init.c)
ioctl( (newtty fd), VT_GETSTATE, &vts)
activeVT= vts.v_active
//detach from controlling tty
i=open("/dev/tty", O_RDWR))
ioctl(i, TIOCNOTTY,0);
close(i);
get console( ioctl(newfd, VT_ACTIVATE, vtno)
.*VT_WAITACTIVE
/* set user controlled enter/exit console handlers */
VT_GETMODE,
VT_SETMODE
KDSETMODE
/* in xf86CloseConsole() */
KDSETMODE // text mode
VT_SETMODE // default vt handling
ioctl(newfd, VT_ACTIVATE, activeVT)
close(newfd)
*** revision 1.6 of vt.c contains the code to change back to auto
mode to fix this problem.
02-04-2001
hang at svgablink.c:150 trying to do a close_vt(oldvt); call
02-04-2001 patching process from Frank Denis
used `indent -bls -bli0 -bl -v -kr -i8 *.c *.h` to help format code
in Makefile (-mine, +his)
-CFLAGS = -g -DBINDIR=\"$(BINDIR)\"
-#CFLAGS = -O2 -DBINDIR=\"$(BINDIR)\"
+#CFLAGS = -g -DBINDIR=\"$(BINDIR)\"
+CFLAGS = -O2 -DYY_NO_UNPUT -D_GNU_SOURCE -Wall -W -DBINDIR=\"$(BINDIR)\" -DDEBUGGING=1
leaving until I figure out why
in README
+***** NEVER ADD A SETUID BIT TO THESE PROGRAMS *****
+
+This can be a major security flaw. Grab a snapshot of SVGAlib with the
+"svgalib_helper" module instead.
+
+If lines are only visible at the top of the screen, don't use a frame buffer
+console. Reboot using "vga=0" as a Lilo parameter.
+
+
+
+
+Best regards,
+
+ Frank Denis "Jedi/Sector One" <[email protected]>.
diff --exclude=CVS -u --recursive --new-file ./TODO /home/david/programming/cc/X/ironman/split_package/watchlink-0.3/TODO
--- ./TODO Mon Jan 22 22:42:27 2001
+++ /home/david/programming/cc/X/ironman/split_package/watchlink-0.3/TODO Mon Apr 17 05:49:47 2000
@@ -1,3 +1,12 @@
+open_vt is definitly not the right thing to do, especially with modern
+unices. Linux has Unix98 pty and DevFS. Use them.
+
+
+
+There is *a lot* of buffer overflows. Fix them all.
+
+
+
./dl_new_item.c
has + (void) wi;
why? so it is used?
------------------------------------------------------------
2015-12-31 Teensy 3 blinker notes
Unlike the AVR Timer/Counters, the FlexTimer overflow interrupt flag
must be manually cleared or the interrupt will fire again.
CRT monitor, resolution 1024x768 could easily sync 3 feet away,
if the lines were 145 wide in the center it still had no problem
picking up the signal, it was having problems with a width of about
half of that.
It is hanging at times writing the data out. It seems to be a problem
on transmitting data to the computer.
LED_ON write() LED_OFF,
socat listen first, then serblink, hangs with the LED off,
most of usb_dev.c will unconditionally disable then enable interrupts,
but it should only enable them if they were disabled.
restoring irq status in usb_desc.c code size cost 8 bytes
I see 2 instructions (get primask and conditional), I don't see where
the other two bytes went.
For the entire USB system, code size increase 56 bytes
Still was seeing corruption and hanging.
Disabled interrupts in my code and no problems so far.
my routine calls usb_serial_write which calls usb_tx_packet_count
which was unconditionally enabling interrupts
usb_serial_available doesn't call any routines enabling interrupts
my routine calls usb_serial_read which calls usb_rx which enables
interrupts
Verified that without the cores/teensy3/usb_* fix even disabling
interrupts on my side my program will hang and fail, so the fix must
be in both places.
power draw,
toggling a green LED each time through the main loop sees a constant
amount of wakeups when on USB, none when not on USB
not on USB, power draw measured using 110 Ohm resistance
not using __WFI()
green LED off, 2.37 / 110 = 21.5 mA
using __WFI(), wait for interrupt sleep mode
green LED on, 1.862 V / 110 = 16.9 mA
green LED off, 1.353 / 110 = 12.3 mA
using sleepdeep (stop) and __WFI()
.36V / 110 = 3.27 mA, but while it appears to receive data, the LED
doesn't blink and it doesn't work
starting without USB connected just on power, something's left running,
2.00 / 110 = 18 mA
enable SCB_SCR_SLEEPONEXIT
1.34 / 110 = 12.18 mA no measurable difference with or without
very low power run and return to normal run on interrupt
1.34 / 110 = 12.18 mA
very low power run, don't enable return to normal on interrupt
1.34 / 110 = 12.18 mA
set very low power run before each __WFI() return to normal on
interrupt
1.34 / 110 = 12.18 mA
system clock divider of 16 so 3 MHz operation
1.34 / 110 = 12.18 mA
also clock divider for 2 & 4 of 16
1.34 / 110 = 12.18 mA