Sourcecode Fortschritt
- 
					
					
					
					
 Nach hartem "Kampf" im IRC  nun Revision 347: nun Revision 347:- Ergebnisse Code Review pci.c 
 - syscall zur Begrenzung des Scrollbereichs.
 - Math-Fkts. von Iteem (Danke dafür!) eingebaut.
 
- 
					
					
					
					
 Rev. 348: - rtl8139.h geschaffen 
 - EHCI und RTL8139 Funktionen aus os.h entfernt
 - kleine Verbesserungen (falscher Kommentar in rtl8139, Klammer)Tests: Bochs: alles ok (hat kein EHCI) 
 Qemu: alles ok (incl. EHCI)
 VMWare: bricht im Bootscreen ab
 VBox: USB devices lassen sich nicht einbinden, sonst alles ok
 Auf real Hardware Probleme z.T. bei Memory-Erkennung und bei EHCI MMIO.
 
- 
					
					
					
					
 Revision 349: - Flags durch Events ersetzt. 
 - -fno-common als gcc-schalter genutzt -> Der Kampf um "extern" ist vorbei, die pro-extern-Fraktion hat (zum Glück ) gewonnen ) gewonnen
 -- Daraus resultierende Fehler behoben
 - "pause" nach dem compilieren in build.bat
 
- 
					
					
					
					
 Rev. 350: os.h u. ckernel.c: kleine Aufräumarbeiten 
 
- 
					
					
					
					
 Revision 351: - Anderes Eventsystem: Fkt-Ptr. basiert 
 - pciList von überflüssigem _Diagnosis_ befreit.
 - list.c: Fehler in listShowElement und listDeleteAll behoben
 
- 
					
					
					
					
 Rev. 352: - zwischenschritt ehci.c (#PF bei thread "EHCI") warum ist der thread zum EHCI init nur "user"? PrettyOS [Version 0.0.0.352] Console 0: EHCI -------------------------------------------------------------------------------- Page Fault ( - user-mode) at 00041D92h - EIP: 00041D92h err_code: 00000005h address(eip): 00041D92h edi: 00000000h esi: 00000000h ebp: 00000000h eax: 00000000h ebx: 00000000h ecx: 00000000h edx: 00000000h cs: 0000001Bh ds: 00000023h es: 00000023h fs: 00000023h gs 00000023h ss 00000023 h int_no 14 eflags 00010202h useresp 01420000h Page Fault! | <Exception - System Halted> Press key for exit from the task! |
 
- 
					
					
					
					
 Rev. 353: work-around, bis das thema ring0/ring3 geklärt ist bei threads: 
 task.c, line 229/230:// new_task->privilege = parentTask->privilege; new_task->privilege = 0; /// TEST
 
- 
					
					
					
					
 Revision 354: - create_thread nimmt keinen parentTask mehr, ist jetzt immer current_task 
 - Optimierungen in userlib.c
 - list.c: Überflüssige (und m.E. falsche, mglw. Memory-Leaks produzierende) Fkt. entfernt
 - abs heißt nun fabs, nimmt doubles und nutzt die FPU
 
- 
					
					
					
					
 Revision 355: - Projektfile für VC++. Wer will kann auch welche für andere IDEs machen. 
 - pODA ist nun kein Pointer mehr und heißt somit ODA.
 
- 
					
					
					
					
 Rev. 356: Vor USB-Transfer wird gestoppt (Tastendruck), damit sind mehrere Konsolen bereit dazu. 
 USB-Transfer klappt aber bisher nur einmal erfolgreich bei real Hardware)Da EHCI/USB2 noch ziemlich unübersichtlich ist durch die Vielzahl der Ports und Möglichkeiten, hier die Konsolen meines "Entwicklungs-PCs": Konsole M: PrettyOS [Version 0.0.0.355] Shell -------------------------------------------------------------------------------- 1.44 MB FDD device 0 #0 0:0.0 dev:2774h vend:8086h IRQ:0 #1 0:1.0 dev:2775h vend:8086h IRQ:5 #2 0:27.0 dev:27D8h vend:8086h IRQ:3 #3 0:28.0 dev:27D0h vend:8086h IRQ:5 #4 0:28.4 dev:27E0h vend:8086h IRQ:5 #5 0:28.5 dev:27E2h vend:8086h IRQ:11 #6 0:29.0 dev:27C8h vend:8086h IRQ:11 USB UHCI 6000h I/O sz:-65504 #7 0:29.1 dev:27C9h vend:8086h IRQ:11 USB UHCI 6400h I/O sz:-65504 #8 0:29.2 dev:27CAh vend:8086h IRQ:11 USB UHCI 6800h I/O sz:-65504 #9 0:29.3 dev:27CBh vend:8086h IRQ:3 USB UHCI 7000h I/O sz:-65504 #10 0:29.7 dev:27CCh vend:8086h IRQ:11 USB EHCI CDBFF800h MMIO sz:1024 EHCI_MMIO CDBFF800h mapped to virt addr FF000000h, offset: 0800h >>> >>> function: analyzeEHCI EHCI bar get_phys_Addr: 0DBFF800h HCIVERSION: 0100h HCSPARAMS: 00104208h Ports: 8 HCCPARAMS: 00006871h OpRegs Address: FF000820h #11 0:30.0 dev:244Eh vend:8086h IRQ:0 #12 0:31.0 dev:27B8h vend:8086h IRQ:0 #13 0:31.1 dev:27DFh vend:8086h IRQ:0 #14 0:31.2 dev:27C0h vend:8086h IRQ:5 #15 0:31.3 dev:27DAh vend:8086h IRQ:0 #16 1:3.0 dev:8023h vend:104Ch IRQ:11 #17 1:4.0 dev:8211h vend:1283h IRQ:3 #18 1:5.0 dev:4320h vend:11ABh IRQ:11 #19 2:0.0 dev:3132h vend:1095h IRQ:11 #20 3:0.0 dev:108Bh vend:8086h IRQ:5 <RAM Disk at C0002000h DIR> dev 35 info 9562 shell >>> >>> function: ehci_handler: Port Change >>> >>> function: ehci_handler: Port ChangeScreenshot (Thread) $> -------------------------------------------------------------------------------- _______ _______ <>_<> (_______) |_|_|_|_|_|_|| [] [] | .---|'"`|---. `-oo---oo-'`-oo-----oo-'`-o---o-'`o"O-OO-OO-O"o' -------------------------------------------------------------------------------- Monday, April 12, 2010, 00:38:22 47 s runtime. CPU: 3753 MHz \Konsole 0: PrettyOS [Version 0.0.0.355] Console 0: EHCI -------------------------------------------------------------------------------- >>> >>> function: initEHCIHostController >>> >>> function: startHostController (reset HC) waiting for HC reset >>> >>> function: DeactivateLegacySupport DeactivateLegacySupport: eecp = 0068h eecp = 0068h, eecp_id = 0001h set OS-Semaphore. BIOS-Semaphore being not set. OS-Semaphore being set. Check: BIOSownedSemaphore: 0 OSownedSemaphore: 1 >>> >>> function: ehci_handler: Port Change HCHalted bit set to 0 (OK), ports can be enabled now. >>> >>> function: enablePorts >>> >>> function: resetPort 1 >>> >>> function: resetPort 2 >>> >>> function: resetPort 3 >>> >>> function: resetPort 4 >>> >>> function: resetPort 5 >>> >>> function: resetPort 6 >>> >>> function: resetPort 7 >>> >>> function: resetPort 8 >>> Press key to close this console. <<<Konsole 1: PrettyOS [Version 0.0.0.355] Console 1: EHCI Ports -------------------------------------------------------------------------------- >>> >>> function: showPORTSC >>> >>> function: checkPortLineStatus >>> Status of USB Ports <<< port 1: 00001801h, line: 02h J-state port 2: 00001005h, line: 00h SE0,power on, enabled, EHCI owned >>> Press key to start USB-Test. <<<Konsole 2: PrettyOS [Version 0.0.0.355] Console 2: EHCI Ports -------------------------------------------------------------------------------- >>> >>> function: showPORTSC >>> >>> function: resetPort 8 >>> >>> function: checkPortLineStatus >>> Status of USB Ports <<< port 1: 00001801h, line: 02h J-state port 2: 00001005h, line: 00h SE0,power on, enabled, EHCI owned >>> Press key to start USB-Test. <<<Taste auf Konsole 2 bringt einen korrekten USB-Transfer.  
 
- 
					
					
					
					
 Rev. 357: read_directory: bei nur 3 Zeichen im Namen noch ein '\t' ausgeben 
 ehci: Restart nach Host System Error per Einschub einer Message in event loop getriggertif (pOpRegs->USBSTS & STS_HOST_SYSTEM_ERROR) { settextcolor(4,0); printf("\nHost System Error"); settextcolor(15,0); pOpRegs->USBCMD &= ~CMD_ASYNCH_ENABLE; // necessary? pOpRegs->USBSTS |= STS_HOST_SYSTEM_ERROR; settextcolor(14,0); printf("\nInit EHCI after fatal error"); settextcolor(15,0); addEvent(&EHCI_INIT); }Hier mal ein dickes Lob an MrX für die Realisierung der Event Queue und Loop! Echt klasse das Teil.  
 
- 
					
					
					
					
 Rev. 358: ehci.c / usb2.c: Debug-Ausgaben etwas verdichtet, damit das auf einen Bildschirm passt 
 
- 
					
					
					
					
 Revision 359: - current_task weggemacht 
 - new_task wird nicht direkt aktiviert, sondern in der task-Queue am Ende eingefügt
 - Projektfile aufgeräumt
 - kleiner Shell-Fehler behoben.
 
- 
					
					
					
					
 Rev. 360: Damit wir mal mit float arbeiten können: userlib: 
 - ftoa anstelle float2string
 - atof- hello: rechnet pq-formel bitte testen, ob alles stimmt.  
 
- 
					
					
					
					
 Rev. 361: waren noch einige Korrekturen notwendig 
 
- 
					
					
					
					
 Rev. 362: - in PQEQ.ELF umbenannt und auch in FloppyImage eingebunden, damit man das überhaupt laden kann 
 - header für beep aus ckernel.c entferntWer die Ergebnisse des pq-equation-programms überprüfen will, dem empfehle ich folgendes C++-Programm: #include <iostream> #include <limits> // wait() #include <cmath> // sqrt(...) using namespace std; void wait() { cin.clear(); cin.ignore(numeric_limits<streamsize>::max(), '\n'); cin.get(); } int main() { cout << "Calculation of quadratic equation of type x*x + p*x + q = 0" << endl << endl; double p, q, x1, x2; cout << "Please enter p: "; cin >> p; cout << "Please enter q: "; cin >> q; x1 = -p/2 + sqrt( p*p/4.0 - q ); x2 = -p/2 - sqrt( p*p/4.0 - q ); cout << endl << "x1 = " << x1 << endl << "x2 = " << x2 << endl; wait(); }
 
- 
					
					
					
					
 Rev. 363: Code Review elf.c 
 
- 
					
					
					
					
 Rev. 364: gdt.c: |0xF bei granularity entfernt 
 
- 
					
					
					
					
 Rev. 365: ckernel.c: bss nullen siehe: http://www.c-plusplus.net/forum/viewtopic-var-t-is-260731-and-start-is-140.html (aber natürlich nicht statisch, sondern mit Variablen aus dem Linker-Skript) 
 
- 
					
					
					
					
 Revision 366: - os.h auseinandergenommen und andere Header-Umsortierungen (Darum so ein Riesen-Commit) 
 - _template_header.h entfernt sowie readelf.exe + read_program_elf.bat entfernt
 - Doppeltes PQ-EQ entfernt
 - atof und ftoa statt float2string in util.c
 - math.c -> util.c