diff options
| author | Frans Kaashoek <kaashoek@mit.edu> | 2018-10-03 17:58:21 -0400 | 
|---|---|---|
| committer | Frans Kaashoek <kaashoek@mit.edu> | 2018-10-03 17:58:21 -0400 | 
| commit | 23a58370a4fa441fd0ee152a3e1e7619e5d8bd6b (patch) | |
| tree | 37b6fc8efcdf7d67eff07dd7bf60fa2e507265c6 | |
| parent | 020fc6a1c68c9e996a8ede395acf2d61cc030f57 (diff) | |
| download | xv6-labs-23a58370a4fa441fd0ee152a3e1e7619e5d8bd6b.tar.gz xv6-labs-23a58370a4fa441fd0ee152a3e1e7619e5d8bd6b.tar.bz2 xv6-labs-23a58370a4fa441fd0ee152a3e1e7619e5d8bd6b.zip | |
Switch back bpmain back to main
| -rw-r--r-- | entry.S | 4 | ||||
| -rw-r--r-- | main.c | 12 | 
2 files changed, 8 insertions, 8 deletions
| @@ -84,8 +84,8 @@ start64:    # Clear frame pointer for stack walks    movl $0, %ebp    # Call into C code. -  call bpmain -  # should not return from bpmain +  call main +  # should not return from main    jmp .  .code32 @@ -9,7 +9,7 @@  extern pde_t *kpgdir;  extern char end[]; // first address after kernel loaded from ELF file -static void main(void)  __attribute__((noreturn)); +static void mpmain(void)  __attribute__((noreturn));  static void startothers(void); @@ -17,7 +17,7 @@ static void startothers(void);  // Allocate a real stack and switch to it, first  // doing some setup required for memory allocator to work.  int -bpmain(uint64 mbmagic, uint64 mbaddr) +main(uint64 mbmagic, uint64 mbaddr)  {    if(mbmagic != 0x2badb002)         panic("multiboot header not found"); @@ -41,13 +41,13 @@ bpmain(uint64 mbmagic, uint64 mbaddr)    kinit2(P2V(4*1024*1024), P2V(PHYSTOP)); // must come after startothers()    userinit();      // first user process -  main();         +  mpmain();            return 0;  }  // Common CPU setup code.  static void -main(void) +mpmain(void)  {    cprintf("cpu%d: starting %d\n", cpuid(), cpuid());    idtinit();       // load idt register @@ -55,14 +55,14 @@ main(void)    scheduler();     // start running processes  } -// Other CPUs jump here from entryother.S. +// AP processors jump here from entryother.S.  void  apmain(void)  {    switchkvm();    seginit();    lapicinit(); -  main(); +  mpmain();  }  void apstart(void); | 
