#tyndur · 2010-03-14
374 Nachrichten · Seite 1 von 2 · Original-CSV herunterladen
- Jarvixa cpu_state can be done per cpu right
- Jarvixso u could simply add support? or am i reading wrong?
- JarvixJamesM calls it registers_t ?
- XanClicI doubt that's intended
- XanClicI have simple SMP support and I don't use any structure to describe the CPUs for now
- taljeth2I have never done SMP, but I guess the scheduling works more or less the same
- Jarvixi dunno exactly how to do SMP
- XanClicThere is just a point which contains the "ID" of the current CPU
- taljeth2Or task switching, not scheduling
- XanClicThis is at [esp & 0xFFFFE000]
- Jarvix:S
- XanClicAt least in kernel space
- Jarvixdont get it :P
- XanClicYeah, I took that trick from Linux ;-)
- taljeth2Hm, they use a page for per-CPU things?
- Jarvixu store the cpu number in the task struct, so wheere it is located (the task) ?
- taljeth2I had in mind it used segmentation
- XanClictaljeth2: No, they use 8 kB for the kernel stack
- XanClicAnd the lower 60 Byte (or similar) are used for task specific stuff
- XanClicJarvix: Every thread has its own kernel stack
- Jarvixthrread, or task?
- XanClicAnd when a CPU fetches a new thread, it writes its own ID into the stack
- XanClicthread
- Jarvixk
- XanClicWell, wait, it writes the thread pointer there *g*
- Jarvixdo u make those stacks in kmalloc?
- Jarvixor some other way?
- XanClicHrm, let me take a look...
- Jarvix:P
- XanClicNo, I have a special function for that, called alloc_aligned_area
- XanClicBut that's bad, I see right now *g*
- Jarvixi see\wich mapes phys with virt in an area in kernel space?
- XanClicWait, my whole concept is crap xD
- Jarvix:P:P:P
- JarvixxD
- XanClicBecause alloc_aligned_area allocates physically aligned
- XanClicBut my mapping function doesn't _map_ aligned
- JarvixHe just dicovers his whole os is crap xD
- XanClicWell, it worked until now *g*
- Jarvixah lol
- Jarvixwhy ultil now?
- Jarvixu screwed it?
- XanClicIt still works ;-)
- Jarvixhi pc
- XanClicBut I noticed the fault right now
- Jarvixah k
- taljeth2Jarvix: Wil je geen duits meer lezen? ;-)
- Jarvixnah
- Jarvixik las het toch niet meer
- Jarvixklikte eraleen ff op om gele balletje weg te krijgen
- Jarvixben jij nederlands ofzo? Dat je t zo goed kan :P
- taljeth2Is het goed?
- Jarvixjups
- Jarvixccorrect nederlands :)
- taljeth2Schrijven is niet zo makkelijk voor mij
- Jarvixis een goede zin, alleen zou een nederlander het nooi zo zeggen
- taljeth2Lezen gaat beter
- JarvixVoor mij is schrijven moeilijk
- Jarvixof
- Jarvixik vind schrijven niet makkelijk / moelijk
- Jarvix;)
- taljeth2Niet schrijven algemeen, maar schrijven in nederslands ;-)
- Jarvixweet ik
- Jarvixzet er 2 maal het tusen
- Jarvixniet het schrijven in het algemeen, maar schrijven in nederlands
- Jarvix:P
- Jarvixkan XanClic dit lezen?
- XanClicI think so
- taljeth2Ik denk hij kan
- JarvixIk denk dat hij het kan*
- Jarvixeen ACI :P
- taljeth2That's the same mistake I always make with Dutch
- Jarvix:P
- taljeth2I try to mimic English instead of German :-/
- XanClic"Ich denke, er kann es".
- XanClicWorks in German, too ;-)
- taljeth2But it needs the "es" at least
- XanClicHm, well, not necessarily
- XanClicAt least when speaking
- taljeth2Doch ;-)
- XanClic*g*
- JarvixxD
- XanClicI thought it's "quok", isn't it? ;-)
- Jarvixthats the guy who is away all the time?
- taljeth2quok_: See, I dare writing a language I'm not good at ;-)
- Jarvix ? u talking to quok, but he never said a thing
- XanClicNot today
- XanClictaljeth2: Well, qemu seems to be _very_ broken
- XanClicOr at least the OHCI part
- taljeth2Then... fix it? ;-)
- XanClicBut how?
- XanClicmom
- XanClichttp://pastebin.com/QxbvCnCM
- XanClicSegfaults in line 7
- XanClicNot earlier
- XanClicWith -O0
- XanClicAh, wait
- XanClicstr >.<
- XanClic*facepalm*
- taljeth2Was soll mir der Paste sagen?
- XanClicHm, na ja
- XanClicAlso in Zeile 3 geht es auch mit %s
- XanClicEr soll halt sagen, dass an sich alle Zugriffe gehen, das Gesamt-printf dann aber nicht mehr
- taljeth2Hm, was ist dprintf?
- XanClic#define dprintf printf
- taljeth2Schade
- JarvixSchade, we call that: KUT
- JarvixXan, nice, when u wanna remove dprintf
- Jarvixu just do
- Jarvix#define dprintf
- XanClicIt's dprintf(...), but in general that's true, yes ;-)
- Jarvixa thread structure conans all registers, and has its own kernelstack
- Jarvixalso its own userstack right?
- Jarvixbut not own userheap
- XanClicYes
- Jarvixcorrect?
- Jarvixcool
- Jarvixany update on the pretty-os-situation?
- taljeth2I'm not following it very closely. If they manage to get it running everywhere, we'll notice soon enough.
- Jarvixlol @ my comments: task->next = task; // Circular loop
- Jarvixtal, i think ur right ;)
- Jarvixcircular loop is a bit double
- taljeth2Maybe you should concentrate on non-circular loops instead
- Jarvix:P
- XanClicJarvix: Problem solved by implementing an aligning map function ;-)
- taljeth2Which problem?
- XanClicMy kernel stack alignment
- XanClic"esp & 0xFFFFE000" works with 8k aligned stacks only, obviously
- XanClicBut I aligned the physical address instead of the virtual one ;-)
- taljeth2Clever.
- Jarvixlol
- Jarvixhi
- XanClicmoin, Jarvix
- JarvixHow are uy today?
- Jarvixi am watching HarryPotter6 on ipod while programming the VM8086
- XanClicI'm reading comics on the internet because I don't know really what to do :-)
- eddybXanClic: gone thru abstruse goose?
- JarvixOHCI?
- Jarvixhi eddyb
- eddybhi
- Jarvixcurrently i have #PF :(
- eddybi was messing with fonts until i gave up and tried to refresh the vbe module...
- XanCliceddyb: Nope, cyanide & happiness
- Jarvixcyanide, isnt that a posion?
- XanClicI guess yes
- Jarvixpoision
- XanClicOr at least there are poisonous cyanides
- Jarvixused in WII ?
- eddybi do recommend abstruse goose, if you are (too much of)a geek...
- eddybcyanide is a substance
- JarvixxD
- eddybcontaining N and C(nitrogen and carbon)
- Jarvixsomeone knows how the vm8086 exactly works? How to program it?
- eddybhttp://www.wolframalpha.com/input/?i=cyanide
- XanClicWell, you set the appropriate bit in the EFLAGS register and push some more registers on the stack before doing the iret
- taljethJarvix: Heh, you're working on VM86, too?
- Jarvixyeh
- Jarvixto make the MT more completer
- Jarvixi set the bit yes
- Jarvixand i set osme pages
- Jarvix0x0 - 0x1000 to 0x0 - 0x1000 phsyical
- XanClicYou're also pushing more than you'd normally do?
- Jarvixi make apage at 0x1000 and 0x2000, i set stack to 0x3000, and put code at 0x1000, also IP
- taljethHe's getting PF, not GPF, so probably yes
- XanClici.e., ds, es, fs, gs
- Jarvixyes, pushing all segments too
- XanClicAh, missed that *g*
- JarvixIRET says so :)
- taljethJarvix: So what is your cr2?
- Jarvixsame as ESP :P
- taljethFixing the VM86 page faults is easy... If it's ROM, just identity map it. If not, map something else there.
- JarvixESP = 0xf000xxxxx
- Jarvixsoooo wrong
- Jarvixdunno how it becomes so
- Jarvixthe switch seems right
- Jarvixthe PF happends in the ISR, after the c code
- Jarvixpop ebx = pop the old content of the segmenets (DS, ES, FS, GS)
- Jarvixthats where it happends because stack is fucked
- taljethAh, I see. I thought in BIOS code
- Jarvixabout the segments
- Jarvixdo u set the segments of the vm task to not-0x00 ?
- taljethIt's RM segments
- taljethSo for cs certainly yes
- JarvixReal mode, and hwta may they be?
- taljethIt's just the usual (seg * 16) + ofs address calculation
- Jarvixatm,my cs is 0x8, if i set it 0, which should be, i get a triplle fault on #PF
- taljeth0x8 is most probably wrong
- taljethNot sure what code you try to execute, I for one use VM86 for the BIOS interrupts
- taljethSo it take both cs and ip from the IVT
- taljethFor the video BIOS cs is c000, usually
- Jarvixunless i add a debug printf pritning old and new ESP in a taskswitch, then i get a pagefalt (no triple)
- Jarvixorg 1000h
- Jarvixbits 16
- Jarvixmain:
- Jarvix mov al, 01h
- Jarvix jmp $
- Jarvixis what i am exectuing :P
- Jarvix4 bytes
- XanClicI'd anyway recommend using the SMP trampoline code for that *g*
- taljethThen you'll want to execute it at either 0001:0000 or 0000:1000