flat assembler
Message board for the users of flat assembler.
  
       
      Index
      > OS Construction > paging ?Goto page Previous 1, 2, 3, 4 Next  | 
  
| Author | 
  | 
              
| 
                  
                   f0dder 22 Jan 2010, 19:25 
                  egos wrote: 
 I've heard claims that some systems (relatively recent ones, not talking pre-90'es or anything) don't support this system call, though... dunno if it's true, and if it is, how many machines it affects (if it's limited to high-end server BIOSes or EFI systems, I guess it's not that bad _________________ carpe noctem  | 
              |||
                  
  | 
              
| 
                  
                   egos 22 Jan 2010, 20:01 
                  Quote: Yup, that's how I did it in my toy kernel  | 
              |||
                  
  | 
              
| 
                  
                   dosin 22 Jan 2010, 21:33 
                  egos:
 
                Quote: Why did you this? Fill page dir with zeroes (or as I did). was just making sure the mem used is cleared... would it be best just to fill the page dir? Code: mov edi,0x5000 mov eax,0x6000 mov ecx,1024 @@: or eax,7 stosd add eax,4096 loop @b  | 
              |||
                  
  | 
              
| 
                  
                   egos 23 Jan 2010, 08:20 
                  No. Did you understand what you did? Fill page dir with zeroes and set only that dir entries which are necessary.
 
                Code: xor eax,eax mov ecx,1024 mov edi,5000h rep stosd ... mov dword [5000h+0*4], FIRST_PAGE_TAB_ADDR or 7  | 
              |||
                  
  | 
              
| 
                  
                   dosin 23 Jan 2010, 19:55 
                  I see - I was filling all the tables - as present.. instead of 0
 
                So I need to set the rest of the dir to 0 and just set the ones I am using to presant.. Quote: set only that dir entries which are necessary ? What would the min dir entries should I start with?  | 
              |||
                  
  | 
              
| 
                  
                   egos 23 Jan 2010, 21:42 
                  Quote: What would the min dir entries should I start with? Code: ... lea eax,[edi-1000h+PAGE_LOCAL] mov edi,ebx stosd ; set 1st PDE mov ecx,1022 xor eax,eax rep stosd lea eax,[ebx+PAGE_LOCAL-PF_APL] stosd ; set last PDE ...  | 
              |||
                  
  | 
              
| 
                  
                   dosin 01 Feb 2010, 20:40 
                  This is messed up.. I can enable paging / long mode - 4 MB  .. 
 
                works perfect every test.. but my protected mode paging crashes everytime.. I can not figure out the bug.. I will prob take a break and work on the long mode for now.. unless anyone has any sugestions.. the page table and dir fill in the same way..for the 4 MB pmode or long mode paging.. the only difference is this step to enable long mode: Code: mov ecx,0C0000080h rdmsr or eax,1 shl 8 wrmsr one crashes the other works fine..  | 
              |||
                  
  | 
              
| 
                  
                   egos 06 Feb 2010, 20:55 
                  Quote: or do you have a small demo I could use to test... 
 
  | 
              |||||||||||||||||||||
                  
  | 
              
| 
                  
                   egos 10 Feb 2010, 08:25 
                  Quote: This is messed up.. I can enable paging / long mode - 4 MB ..  | 
              |||
                  
  | 
              
| 
                  
                   dosin 10 Feb 2010, 16:17 
                  Thanks for the info.. 
 
                with the 32 bit paging - its writing to the video mem... and displaying junk on the screen... no matter what address I chose to start the paging at... but its not crashing like it was.. even tried your example in my kernel and same thing.. fill the screen with junk...  | 
              |||
                  
  | 
              
| 
                  
                   zhak 10 Feb 2010, 20:57 
                  egos, it would be nice if you could put comments in your source if you share it with others as a template for educational purposes. 
                 | 
              |||
                  
  | 
              
| 
                  
                   egos 11 Feb 2010, 09:23 
                  My source was intended for topic starter. If you want to see my comments show me what fragment you are interested in. 
                 | 
              |||
                  
  | 
              
| 
                  
                   zhak 11 Feb 2010, 21:12 
                  Code: mov dx,03F2h mov al,0 out dx,al cli mov al,8Fh out 70h,al in al,71h this ports operations are new for me. could you explain this part, please?  | 
              |||
                  
  | 
              
| 
                  
                   f0dder 11 Feb 2010, 21:16 
                  out(70h,8Fh) is for disabling NMIs - dunno about the rest. 
                 | 
              |||
                  
  | 
              
| 
                  
                   baldr 11 Feb 2010, 21:46 
                  zhak,
 
                0x03F2 port is digital output register of FDC, out(0x03F2, 0) stops drives' motors, disables DMA and resets controller.  | 
              |||
                  
  | 
              
| 
                  
                   zhak 11 Feb 2010, 23:30 
                  heh, never worked with FDC. not surprised that i'm not familiar with this stuff  
                 | 
              |||
                  
  | 
              
| 
                  
                   f0dder 12 Feb 2010, 06:18 
                  Ah yes, I see I had that 0x3F2 code in my toy kernel bootloader as well - been quite a while since I messed with it  
                 | 
              |||
                  
  | 
              
| 
                  
                   smiddy 12 Feb 2010, 11:36 
                  f0dder wrote: Ah yes, I see I had that 0x3F2 code in my toy kernel bootloader as well - been quite a while since I messed with it If I recall right, this is only if you switch processor modes. If you stay in real mode, you shouldn't need to turn the floppy off.  | 
              |||
                  
  | 
              
| 
                  
                   revolution 12 Feb 2010, 11:41 
                  smiddy wrote: If I recall right, this is only if you switch processor modes. If you stay in real mode, you shouldn't need to turn the floppy off.  | 
              |||
                  
  | 
              
| Goto page  Previous  1, 2, 3, 4  Next < Last Thread | Next Thread >  | 
    
Forum Rules: 
  | 
    
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.