#tyndur · 2010-03-14

374 Nachrichten · Seite 1 von 2 · Original-CSV herunterladen

  1. Jarvixa cpu_state can be done per cpu right
  2. Jarvixso u could simply add support? or am i reading wrong?
  3. JarvixJamesM calls it registers_t ?
  4. XanClicI doubt that's intended
  5. XanClicI have simple SMP support and I don't use any structure to describe the CPUs for now
  6. taljeth2I have never done SMP, but I guess the scheduling works more or less the same
  7. Jarvixi dunno exactly how to do SMP
  8. XanClicThere is just a point which contains the "ID" of the current CPU
  9. taljeth2Or task switching, not scheduling
  10. XanClicThis is at [esp & 0xFFFFE000]
  11. Jarvix:S
  12. XanClicAt least in kernel space
  13. Jarvixdont get it :P
  14. XanClicYeah, I took that trick from Linux ;-)
  15. taljeth2Hm, they use a page for per-CPU things?
  16. Jarvixu store the cpu number in the task struct, so wheere it is located (the task) ?
  17. taljeth2I had in mind it used segmentation
  18. XanClictaljeth2: No, they use 8 kB for the kernel stack
  19. XanClicAnd the lower 60 Byte (or similar) are used for task specific stuff
  20. XanClicJarvix: Every thread has its own kernel stack
  21. Jarvixthrread, or task?
  22. XanClicAnd when a CPU fetches a new thread, it writes its own ID into the stack
  23. XanClicthread
  24. Jarvixk
  25. XanClicWell, wait, it writes the thread pointer there *g*
  26. Jarvixdo u make those stacks in kmalloc?
  27. Jarvixor some other way?
  28. XanClicHrm, let me take a look...
  29. Jarvix:P
  30. XanClicNo, I have a special function for that, called alloc_aligned_area
  31. XanClicBut that's bad, I see right now *g*
  32. Jarvixi see\wich mapes phys with virt in an area in kernel space?
  33. XanClicWait, my whole concept is crap xD
  34. Jarvix:P:P:P
  35. JarvixxD
  36. XanClicBecause alloc_aligned_area allocates physically aligned
  37. XanClicBut my mapping function doesn't _map_ aligned
  38. JarvixHe just dicovers his whole os is crap xD
  39. XanClicWell, it worked until now *g*
  40. Jarvixah lol
  41. Jarvixwhy ultil now?
  42. Jarvixu screwed it?
  43. XanClicIt still works ;-)
  44. Jarvixhi pc
  45. XanClicBut I noticed the fault right now
  46. Jarvixah k
  47. taljeth2Jarvix: Wil je geen duits meer lezen? ;-)
  48. Jarvixnah
  49. Jarvixik las het toch niet meer
  50. Jarvixklikte eraleen ff op om gele balletje weg te krijgen
  51. Jarvixben jij nederlands ofzo? Dat je t zo goed kan :P
  52. taljeth2Is het goed?
  53. Jarvixjups
  54. Jarvixccorrect nederlands :)
  55. taljeth2Schrijven is niet zo makkelijk voor mij
  56. Jarvixis een goede zin, alleen zou een nederlander het nooi zo zeggen
  57. taljeth2Lezen gaat beter
  58. JarvixVoor mij is schrijven moeilijk
  59. Jarvixof
  60. Jarvixik vind schrijven niet makkelijk / moelijk
  61. Jarvix;)
  62. taljeth2Niet schrijven algemeen, maar schrijven in nederslands ;-)
  63. Jarvixweet ik
  64. Jarvixzet er 2 maal het tusen
  65. Jarvixniet het schrijven in het algemeen, maar schrijven in nederlands
  66. Jarvix:P
  67. Jarvixkan XanClic dit lezen?
  68. XanClicI think so
  69. taljeth2Ik denk hij kan
  70. JarvixIk denk dat hij het kan*
  71. Jarvixeen ACI :P
  72. taljeth2That's the same mistake I always make with Dutch
  73. Jarvix:P
  74. taljeth2I try to mimic English instead of German :-/
  75. XanClic"Ich denke, er kann es".
  76. XanClicWorks in German, too ;-)
  77. taljeth2But it needs the "es" at least
  78. XanClicHm, well, not necessarily
  79. XanClicAt least when speaking
  80. taljeth2Doch ;-)
  81. XanClic*g*
  82. JarvixxD
  83. XanClicI thought it's "quok", isn't it? ;-)
  84. Jarvixthats the guy who is away all the time?
  85. taljeth2quok_: See, I dare writing a language I'm not good at ;-)
  86. Jarvix ? u talking to quok, but he never said a thing
  87. XanClicNot today
  88. XanClictaljeth2: Well, qemu seems to be _very_ broken
  89. XanClicOr at least the OHCI part
  90. taljeth2Then... fix it? ;-)
  91. XanClicBut how?
  92. XanClicmom
  93. XanClichttp://pastebin.com/QxbvCnCM
  94. XanClicSegfaults in line 7
  95. XanClicNot earlier
  96. XanClicWith -O0
  97. XanClicAh, wait
  98. XanClicstr >.<
  99. XanClic*facepalm*
  100. taljeth2Was soll mir der Paste sagen?
  101. XanClicHm, na ja
  102. XanClicAlso in Zeile 3 geht es auch mit %s
  103. XanClicEr soll halt sagen, dass an sich alle Zugriffe gehen, das Gesamt-printf dann aber nicht mehr
  104. taljeth2Hm, was ist dprintf?
  105. XanClic#define dprintf printf
  106. taljeth2Schade
  107. JarvixSchade, we call that: KUT
  108. JarvixXan, nice, when u wanna remove dprintf
  109. Jarvixu just do
  110. Jarvix#define dprintf
  111. XanClicIt's dprintf(...), but in general that's true, yes ;-)
  112. Jarvixa thread structure conans all registers, and has its own kernelstack
  113. Jarvixalso its own userstack right?
  114. Jarvixbut not own userheap
  115. XanClicYes
  116. Jarvixcorrect?
  117. Jarvixcool
  118. Jarvixany update on the pretty-os-situation?
  119. taljeth2I'm not following it very closely. If they manage to get it running everywhere, we'll notice soon enough.
  120. Jarvixlol @ my comments: task->next = task; // Circular loop
  121. Jarvixtal, i think ur right ;)
  122. Jarvixcircular loop is a bit double
  123. taljeth2Maybe you should concentrate on non-circular loops instead
  124. Jarvix:P
  125. XanClicJarvix: Problem solved by implementing an aligning map function ;-)
  126. taljeth2Which problem?
  127. XanClicMy kernel stack alignment
  128. XanClic"esp & 0xFFFFE000" works with 8k aligned stacks only, obviously
  129. XanClicBut I aligned the physical address instead of the virtual one ;-)
  130. taljeth2Clever.
  131. Jarvixlol
  132. Jarvixhi
  133. XanClicmoin, Jarvix
  134. JarvixHow are uy today?
  135. Jarvixi am watching HarryPotter6 on ipod while programming the VM8086
  136. XanClicI'm reading comics on the internet because I don't know really what to do :-)
  137. eddybXanClic: gone thru abstruse goose?
  138. JarvixOHCI?
  139. Jarvixhi eddyb
  140. eddybhi
  141. Jarvixcurrently i have #PF :(
  142. eddybi was messing with fonts until i gave up and tried to refresh the vbe module...
  143. XanCliceddyb: Nope, cyanide & happiness
  144. Jarvixcyanide, isnt that a posion?
  145. XanClicI guess yes
  146. Jarvixpoision
  147. XanClicOr at least there are poisonous cyanides
  148. Jarvixused in WII ?
  149. eddybi do recommend abstruse goose, if you are (too much of)a geek...
  150. eddybcyanide is a substance
  151. JarvixxD
  152. eddybcontaining N and C(nitrogen and carbon)
  153. Jarvixsomeone knows how the vm8086 exactly works? How to program it?
  154. eddybhttp://www.wolframalpha.com/input/?i=cyanide
  155. XanClicWell, you set the appropriate bit in the EFLAGS register and push some more registers on the stack before doing the iret
  156. taljethJarvix: Heh, you're working on VM86, too?
  157. Jarvixyeh
  158. Jarvixto make the MT more completer
  159. Jarvixi set the bit yes
  160. Jarvixand i set osme pages
  161. Jarvix0x0 - 0x1000 to 0x0 - 0x1000 phsyical
  162. XanClicYou're also pushing more than you'd normally do?
  163. Jarvixi make apage at 0x1000 and 0x2000, i set stack to 0x3000, and put code at 0x1000, also IP
  164. taljethHe's getting PF, not GPF, so probably yes
  165. XanClici.e., ds, es, fs, gs
  166. Jarvixyes, pushing all segments too
  167. XanClicAh, missed that *g*
  168. JarvixIRET says so :)
  169. taljethJarvix: So what is your cr2?
  170. Jarvixsame as ESP :P
  171. taljethFixing the VM86 page faults is easy... If it's ROM, just identity map it. If not, map something else there.
  172. JarvixESP = 0xf000xxxxx
  173. Jarvixsoooo wrong
  174. Jarvixdunno how it becomes so
  175. Jarvixthe switch seems right
  176. Jarvixthe PF happends in the ISR, after the c code
  177. Jarvixpop ebx = pop the old content of the segmenets (DS, ES, FS, GS)
  178. Jarvixthats where it happends because stack is fucked
  179. taljethAh, I see. I thought in BIOS code
  180. Jarvixabout the segments
  181. Jarvixdo u set the segments of the vm task to not-0x00 ?
  182. taljethIt's RM segments
  183. taljethSo for cs certainly yes
  184. JarvixReal mode, and hwta may they be?
  185. taljethIt's just the usual (seg * 16) + ofs address calculation
  186. Jarvixatm,my cs is 0x8, if i set it 0, which should be, i get a triplle fault on #PF
  187. taljeth0x8 is most probably wrong
  188. taljethNot sure what code you try to execute, I for one use VM86 for the BIOS interrupts
  189. taljethSo it take both cs and ip from the IVT
  190. taljethFor the video BIOS cs is c000, usually
  191. Jarvixunless i add a debug printf pritning old and new ESP in a taskswitch, then i get a pagefalt (no triple)
  192. Jarvixorg 1000h
  193. Jarvixbits 16
  194. Jarvixmain:
  195. Jarvix mov al, 01h
  196. Jarvix jmp $
  197. Jarvixis what i am exectuing :P
  198. Jarvix4 bytes
  199. XanClicI'd anyway recommend using the SMP trampoline code for that *g*
  200. taljethThen you'll want to execute it at either 0001:0000 or 0000:1000