Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
soc:2008:stefanha:journal:start [2008/06/04 01:04]
stefanha
soc:2008:stefanha:journal:start [2008/08/08 05:25] (current)
stefanha
Line 3: Line 3:
 ===== Journal ===== ===== Journal =====
  
-  * [[:Week1|Week 1]] +  * [[.:week11#​fri_8_aug|Latest entry]] 
-  * [[:Week2|Week 2]] +  * [[.:week11|Week 11]] 
- +  ​* ​[[.:week10|Week 10]] 
-==== Week 2 ==== +  * [[.:week9|Week 9]] 
- +  ​* [[.:week8|Week 8]] 
-=== Mon Jun 2 === +  ​* ​[[.:week7|Week 7]] 
-Git commit: ​[[http://​git.etherboot.org/?​p=people/​stefanha/​gpxe.git;​a=commit;​h=0004992b5bb35b4d5df324d8afffae04e3ee8285|0004992b5bb35b4d5df324d8afffae04e3ee8285]] +  * [[.:week6|Week 6]] 
- +  * [[.:week5|Week 5]] 
-**I hit an interesting bug while writing the GDB stub test suite**. ​ The interrupt handler shares the stack with the main thread of control. +  * [[.:week4|Week 4]] 
- +  * [[.:week3|Week 3]] 
-If the main thread uses stack memory below the stack pointer when an interrupt comes in, then that memory may be corrupted. ​ The interrupt handler uses the stack to store the CPU state and assumes that memory below the stack pointer is unused. +  * [[.:week2|Week 2]] 
- +  * [[.:week1|Week 1]]
-One option is a seperate stack for the interrupt handler and GDB stub.  This stack doesn'​t need to be very big (definitely less than 4K, probably 512 bytes is fine). +
- +
-Another option is to subtract an arbitrary amount to "​bump"​ the stack pointer in the interrupt handler. ​ This is a hack and would not guarantee anything. +
- +
-Finally, I am going to leave this issue for now because I think there is very little code (if any) which behaves as described. ​ GCC tends to reserve space for locals variables at the beginning of a function. +
- +
-**Committed a test suite for the GDB stub**.  It works in two parts: a GDB script that executes tests and some assembly to set things up on gPXE's end.  The two parts pass control through each other using the GDB ''​continue''​ command and the x86 ''​int $3''​ breakpoint. +
- +
-The tests include register and memory read/​write. ​ I plan to add more as needed by the feature set. +
- +
-To run the test suite, build gPXE with ''​GDBSTUB''​ and make sure ''​tests/​gdbstub_test.S''​ gets linked in.  Then run: +
-<​code>​ +
-$ make bin/​gpxe.hd.tmp +
-$ make +
-$ qemu -serial tcp::​4444,​server bin/​gpxe.usb +
- +
-[From another terminal] +
-$ gdb -x tests/​gdbstub_test.gdb +
-</​code>​ +
- +
-=== Tue Jun 3 === +
-Git commits: ​[[http://​git.etherboot.org/?​p=people/​stefanha/​gpxe.git;​a=commit;​h=813fd7500972968b19f17326c5cac308c43b59b6|813fd7500972968b19f17326c5cac308c43b59b6]], [[http://​git.etherboot.org/?​p=people/​stefanha/​gpxe.git;​a=commit;​h=6b0bc333ef9123a2f255db49f1346a3cb2d28285|6b0bc333ef9123a2f255db49f1346a3cb2d28285]] +
- +
-**''​librm.S''​ ''#​ifdef''​ removal**. ​ The ''​GDBSTUB''​ ''​config.h''​ option was implemented using ''#​ifdef''​. ​ Today I got some advice from mcb30 and removed the ''#​ifdefs''​. ​ The GDB stub interrupt handlers are now linked in using weak symbols. ​ That means certain symbols are overridden when ''​GDBSTUB''​ is enabled, causing GDB IDT setup code to be called. +
- +
-**Split serial console from serial driver**. ​ This patch makes the serial driver interface available in ''​include/​gpxe/​serial.h''​. ​ It moves the serial console code from ''​core/​serial.c''​ to ''​core/​serial_console.c'',​ leaving just the serial driver itself. +
- +
-There is currently no check against ''​GDBSTUB''​ and ''​CONSOLE_SERIAL''​ being enabled at the same time.  Just don't do it :-). +
- +
-=== Wed Jun 4 === +
-Git commit: ​[[http://​git.etherboot.org/?​p=people/​stefanha/​gpxe.git;​a=commit;​h=b739cae42af8a7b37def48c9284381e98a91043e|b739cae42af8a7b37def48c9284381e98a91043e]] +
- +
-**Removed unused ''​arch/​i386/​core/​gdbsym.c''​**. ​ This was an attempt at GDB debugging via QEMU and mcb30 suggested it could be removed. ​ Its ''​GDBSYM''​ ''​config.h''​ option has potential to confuse users wanting to build the GDB stub, so I removed it. +
- +
-Next steps: +
-  * Send rom-o-matic patch to mdc so that ''​GDBSTUB''​ can be chosen when configuring a ROM. +
-  * Design a GDB protocol transport interface that serial and UDP can implement. ​ Discuss with mentors. +
-  * Handle disconnect properly - ignore breakpoints when GDB is not attached. +
-  * Implement hardware breakpoint and watchpoint support using debug registers. +
-  * Using debug register, implement NULL pointer bug guard. +
-  * Memory read/write support for device memory. ​ Check kgdb implementation for rules on device memory read/write.+

QR Code
QR Code soc:2008:stefanha:journal:start (generated for current page)