Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [netbsd-10] src/sys/arch



Module Name:    src
Committed By:   martin
Date:           Wed Oct  1 17:19:00 UTC 2025

Modified Files:
        src/sys/arch/amd64/amd64 [netbsd-10]: locore.S
        src/sys/arch/i386/i386 [netbsd-10]: locore.S
        src/sys/arch/xen/xen [netbsd-10]: hypervisor.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1168):

        sys/arch/i386/i386/locore.S: revision 1.202
        sys/arch/i386/i386/locore.S: revision 1.203
        sys/arch/i386/i386/locore.S: revision 1.204
        sys/arch/amd64/amd64/locore.S: revision 1.231
        sys/arch/amd64/amd64/locore.S: revision 1.232
        sys/arch/amd64/amd64/locore.S: revision 1.233
        sys/arch/xen/xen/hypervisor.c: revision 1.100
        all via patch

Our PVH bootstrap code assumed that the hvm_start_info structure provided
by Xen is just after the end of the symbol case. With Xen 4.20 it's not
always the case, so:
- get the symbol table size from the first byte of the symbol table area
  provided by Xen. As we don't know if there is a symbol table or not,
  do a minimal sanity check on the size.
- if the hvm_start_info structure is not in the page after kernel_end or
  esym, copy it there (this was already done in the genpvh case). While
  there, if we copy we can easily compute the size and not assume it all fits
  in one page.
With this, a NetBSD PVH dom0 can boot on Xen 4.20

Fix various typos, mainly in comments.

Fix some issues with symbol table detection on Xen PVH:
- the stack grows down so the last pushed value is at 0(%esp), not -4(%esp).
  Pointed out by Joachim Kuebart.
- 0x3fffffff is 1GB-1, not 1MB-1. Test the symtab size against 16MB
  (amd64 generic symbol table is just above 1MB these days)
- I got confused by cmp's arguments order between intel and gas syntax,
  so the tests did the opposite of intended and the symtab was always
  considered valid.
While there use unsigned conditions.
Should fix booting in PVH mode with netbsd-INSTALL (which is stripped)


To generate a diff of this commit:
cvs rdiff -u -r1.214.4.3 -r1.214.4.4 src/sys/arch/amd64/amd64/locore.S
cvs rdiff -u -r1.190.4.2 -r1.190.4.3 src/sys/arch/i386/i386/locore.S
cvs rdiff -u -r1.96.4.1 -r1.96.4.2 src/sys/arch/xen/xen/hypervisor.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index