[Kos-dev] patch bochs et probleme de cvs

Thomas Petazzoni kos-dev@yoda.isnpro.com
Sun, 04 Mar 2001 15:16:35 +0100


This is a multi-part message in MIME format.
--------------966979DD2CB847E709ED9C73
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

salut,

j'ai un probleme avec cvs :

thomas@thomas:~/kos/repository/kos-contrib$ cvs remove
patch_bochs_pour_info_debugging_double_fault
thomas@enix.org's password: 
Cannot access /var/cvs/kos/CVSROOT
No such file or directory

pourtant je fais tout comme d'habitude..; un pb de droits peut etre ?


sinon, je joint le patch pour bochs qui permet de gerer correctement le
double fault. ATTENTION ce patch ne doit pas etre applique sur le
precedent patch, mais bien sur une version propre de bochs, fraichement
decompresse.

thomas
-- 
PETAZZONI Thomas
thomas.petazzoni@meridon.com     UIN : 34937744
Projet KOS : http://kos.enix.org
--------------966979DD2CB847E709ED9C73
Content-Type: text/plain; charset=us-ascii;
 name="patch_bochs_pour_double_fault"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="patch_bochs_pour_double_fault"

*** bochs-2000_0104c-old/cpu/exception.cc	Tue Jan  4 21:27:57 2000
--- bochs-2000_0104c/cpu/exception.cc	Sat Feb 24 15:25:06 2001
***************
*** 144,149 ****
--- 144,150 ----
        case 5: // 286/386 task gate
          // examine selector to TSS, given in task gate descriptor
          raw_tss_selector = gate_descriptor.u.taskgate.tss_selector;
+ 	printf("Raw TSS selector %d\n", raw_tss_selector);
          parse_selector(raw_tss_selector, &tss_selector);
  
          // must specify global in the local/global bit,
***************
*** 164,176 ****
          // AR byte must specify available TSS,
          //   else #TS(TSS selector)
          parse_descriptor(dword1, dword2, &tss_descriptor);
          if (tss_descriptor.valid==0 || tss_descriptor.segment) {
!           bx_panic("exception: TSS selector points to bad TSS\n");
            exception(BX_TS_EXCEPTION, raw_tss_selector & 0xfffc, 0);
            return;
            }
          if (tss_descriptor.type!=9 && tss_descriptor.type!=1) {
!           bx_panic("exception: TSS selector points to bad TSS\n");
            exception(BX_TS_EXCEPTION, raw_tss_selector & 0xfffc, 0);
            return;
            }
--- 165,182 ----
          // AR byte must specify available TSS,
          //   else #TS(TSS selector)
          parse_descriptor(dword1, dword2, &tss_descriptor);
+ 
          if (tss_descriptor.valid==0 || tss_descriptor.segment) {
!           bx_panic("exception: TSS selector points to bad TSS (validation problem)\n");
            exception(BX_TS_EXCEPTION, raw_tss_selector & 0xfffc, 0);
            return;
            }
+ 
+ 
+ 	printf("Type is %d\n", tss_descriptor.type);
+ 
          if (tss_descriptor.type!=9 && tss_descriptor.type!=1) {
!           bx_panic("exception: TSS selector points to bad TSS (type problem)\n");
            exception(BX_TS_EXCEPTION, raw_tss_selector & 0xfffc, 0);
            return;
            }
***************
*** 560,566 ****
    Bit8u    exception_type;
    unsigned prev_errno;
  
! //fprintf(stderr, "::exception(%u)\n", vector);
  
    BX_INSTR_EXCEPTION(vector);
    invalidate_prefetch_q();
--- 566,572 ----
    Bit8u    exception_type;
    unsigned prev_errno;
  
!   fprintf(stderr, "::exception(%u)\n", vector);
  
    BX_INSTR_EXCEPTION(vector);
    invalidate_prefetch_q();
***************
*** 579,584 ****
--- 585,591 ----
      ESP = BX_CPU_THIS_PTR save_esp;
      }
  
+ 
    BX_CPU_THIS_PTR errorno++;
    if (BX_CPU_THIS_PTR errorno >= 3) {
      bx_panic("exception(): 3rd exception with no resolution\n");
***************
*** 641,646 ****
--- 648,654 ----
      case  8: // double fault
        push_error = 1;
        exception_type = BX_ET_DOUBLE_FAULT;
+       printf("DOUBLE FAULT\n");
        break;
      case  9: // coprocessor segment overrun (286,386 only)
        push_error = 0;
***************
*** 665,670 ****
--- 673,679 ----
        exception_type = BX_ET_CONTRIBUTORY;
        error_code = (error_code & 0xfffe) | BX_CPU_THIS_PTR EXT;
        BX_CPU_THIS_PTR eflags.rf = 1;
+       printf("STACK FAULT !!\n");
        break;
      case 13: // general protection
        push_error = 1;
***************
*** 677,682 ****
--- 686,692 ----
        exception_type = BX_ET_PAGE_FAULT;
        // ??? special format error returned
        BX_CPU_THIS_PTR eflags.rf = 1;
+       printf("PAGE FAULT !!!\n");
        break;
      case 15: // reserved
        bx_panic("exception(15): reserved\n");
***************
*** 720,729 ****
     * Double Fault instead.  Otherwise, just record 1st exception
     */
    if (BX_CPU_THIS_PTR errorno >= 2) {
      if (is_exception_OK[BX_CPU_THIS_PTR curr_exception[0]][exception_type])
!       BX_CPU_THIS_PTR curr_exception[1] = exception_type;
      else
!       BX_CPU_THIS_PTR curr_exception[1] = BX_ET_DOUBLE_FAULT;
      }
    else {
      BX_CPU_THIS_PTR curr_exception[0] = exception_type;
--- 730,748 ----
     * Double Fault instead.  Otherwise, just record 1st exception
     */
    if (BX_CPU_THIS_PTR errorno >= 2) {
+     printf("We had two exceptions ... first was %d and second was %d\n",
+ 	   BX_CPU_THIS_PTR curr_exception[0], exception_type);
      if (is_exception_OK[BX_CPU_THIS_PTR curr_exception[0]][exception_type])
!       {
! 	BX_CPU_THIS_PTR curr_exception[1] = exception_type;
! 	printf("setting curr_exception[1] to exception type\n");
!       }
      else
!       {
! 	BX_CPU_THIS_PTR curr_exception[1] = BX_ET_DOUBLE_FAULT;
! 	vector = 8;
! 	printf("setting curr_exception[1] to double fault\n");
!       }
      }
    else {
      BX_CPU_THIS_PTR curr_exception[0] = exception_type;

--------------966979DD2CB847E709ED9C73--