c - How to correctly use a startup-ipi to start an application processor? -


my goal let own kernel start application cpu. uses same mechanism linux kernel:

  • send asserting , level triggered init-ipi
  • wait...
  • send deasserting , level triggered init-ipi
  • wait...
  • send 2 startup-ipis vector number (0x40000 >> 12) (the entry code application processor lies there)

currently i'm interested in making work qemu. unfortunately, instead of jumping 0x40000, application cpu jumps 0x0 cs register set 0x4000. (i checked gdb).

the intel multiprocessor specification (b.4.2) explains behavior noticed valid if target processor halted after reset or init. shouldn't apply code of linux kernel? sends startup-ipi after init-ipi. or misunderstand specification?

what can have application processor jump 0x000vv000 , not 0x0 cs register set 0xvv00? can't see, linux changes behavior.

it seems misunderstood specification: since application cpu started in real mode 0x000vv000 equivalent 0xvv00:0x0000. not possible represent address in 16 bit ip register. therefore segment offset code segment required.

additionally, debugging real mode code gdb comparable complicated because not respect segment offset. when required see disassembled code of trampoline @ current position, necessary calculate physical location:

x/20i $eip+0xvv000 

this makes gdb print next 20 instructions @ 0xvv00:$eip.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -