Explicitly route all interrupts to the current cpu for now, we'll revisit
this when SMP is working.
Problem spotted and analyzed by Stephan Meisinger, fix inspired by FreeBSD.
Fix problem where packets would be duplicated, possibly looping, when
a domU is doing IP routing.
Problem reported and fix tested by Mike M. Volokhov on port-xen
While there, add some __predict_false/true in conditionnals where
appropriate, remove a always-true test, and fix handling of
mbuf shortage.
than 4MB.
Unless this fix, boot failed with the message as below.
| panic: pmap_kextract: Address 0x1400000 is not from kernel space.
| Data segment is too small?
sys/bswap.h in order to pick up the MD inline routines and the constant
folding definitions in the right order.
Code can include either sys/bswap.h or machine/bswap.h with the same effect.
- Accept bootinfo structure passed down from ofwboot v1.9
- Drop kernel re-mapping code
- Use permanent 4MB mappings provided by the loader instead
- Change kernel entry address to point directly at the code instead of pointing
at the trap table's first slot. This allows the bootloader to detect
those kernels which are aware of the new boot scheme
- Due to the changes in kernel mapping code, alter secondary CPU bootstrap
code to use trampoline just like FreeBSD does (some FreeBSD code is used
here as well)
- Map kernel with permanent 4MB pages to ease kernel's life
- Pass mappings down to the kernel as part of bootinfo structure
- Try to detect whether kernel is aware of the new boot scheme or not and
in the former case map the kernel using OpenFirmware and do not pass
bootinfo structure
- Provide -C switch to force compatibility mode if autodetection fails
- While on this, fix PR #25763: If load of default kernel fails, try one by
one those specified in compiled-in list
Much inspired by the bootloader of FreeBSD, with some imported code from there.
Use NULL instread of (struct fl *)0 - especically as this file doesn't
define struct fl.
XXX: there are more references in the comments to the struct fl
inherited from libsa/alloc.c.