The NetBSD Project

CVS log for src/sys/arch/xen/x86/xen_mainbus.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / arch / xen / x86

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.10 / (download) - annotate - [select for diffs], Sat Aug 7 16:19:08 2021 UTC (21 months, 3 weeks ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, netbsd-10-base, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
Changes since 1.9: +4 -6 lines
Diff to previous 1.9 (colored)

Merge thorpej-cfargs2.

Revision 1.9.8.1 / (download) - annotate - [select for diffs], Wed Aug 4 03:03:31 2021 UTC (21 months, 3 weeks ago) by thorpej
Branch: thorpej-cfargs2
Changes since 1.9: +4 -6 lines
Diff to previous 1.9 (colored) next main 1.10 (colored)

Adapt to CFARGS().

Revision 1.9 / (download) - annotate - [select for diffs], Sat Apr 24 23:36:51 2021 UTC (2 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Branch point for: thorpej-cfargs2
Changes since 1.8: +8 -5 lines
Diff to previous 1.8 (colored)

Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
  actually needed.
- Don't be explicit about what interface attribute is attaching if
  the device only has one.  (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
  situations, making is visibly easier to see when indirect config is
  in play, and allowing for future change in semantics.  (As of now,
  this is just a wrapper around config_match(), but that is an
  implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance.  This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).

Revision 1.8.4.1 / (download) - annotate - [select for diffs], Fri Apr 2 22:17:42 2021 UTC (2 years, 1 month ago) by thorpej
Branch: thorpej-cfargs
Changes since 1.8: +8 -5 lines
Diff to previous 1.8 (colored) next main 1.9 (colored)

config_found_ia() -> config_found() w/ CFARG_IATTR.

Revision 1.8 / (download) - annotate - [select for diffs], Sat May 2 16:44:36 2020 UTC (3 years ago) by bouyer
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-futex, thorpej-cfargs-base
Branch point for: thorpej-cfargs
Changes since 1.7: +3 -2 lines
Diff to previous 1.7 (colored)

Introduce Xen PVH support in GENERIC.
This is compiled in with
options XENPVHVM
x86 changes:
- add Xen section and xen pvh entry points to locore.S. Set vm_guest
  to VM_GUEST_XENPVH in this entry point.
  Most of the boot procedure (especially page table setup and switch to
  paged mode) is shared with native.
- change some x86_delay() to delay_func(), which points to x86_delay() for
  native/HVM, and xen_delay() for PVH

Xen changes:
- remove Xen bits from init_x86_64_ksyms() and init386_ksyms()
  and move to xen_init_ksyms(), used for both PV and PVH
- set ISA no-legacy-devices property for PVH
- factor out code from Xen's cpu_bootconf() to xen_bootconf()
  in xen_machdep.c
- set up a specific pvh_consinit() which starts with printk()
  (which uses a simple hypercall that is available early) and switch to
  xencons when we can use pmap_kenter_pa().

Revision 1.7 / (download) - annotate - [select for diffs], Sat Apr 25 15:26:17 2020 UTC (3 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.6: +29 -33 lines
Diff to previous 1.6 (colored)

Merge the bouyer-xenpvh branch, bringing in Xen PV drivers support under HVM
guests in GENERIC.
Xen support can be disabled at runtime with
boot -c
disable hypervisor

Revision 1.6.12.3 / (download) - annotate - [select for diffs], Sat Apr 18 15:06:18 2020 UTC (3 years, 1 month ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.6.12.2: +3 -3 lines
Diff to previous 1.6.12.2 (colored) to branchpoint 1.6 (colored) next main 1.7 (colored)

Add PVHVM multiprocessor support:
We need the hypervisor to be set up before cpus attaches.
Move hypervisor setup to a new function xen_hvm_init(), called at the
beggining of mainbus_attach(). This function searches the cfdata[] array
to see if the hypervisor device is enabled (so you can disable PV
support with
disable hypervisor
from userconf).
For HVM, ci_cpuid doens't match the virtual CPU index needed by Xen.
Introduce ci_vcpuid to cpu_info. Introduce xen_hvm_init_cpu(), to be
called for each CPU in in its context, which initialize ci_vcpuid and
ci_vcpu, and setup the event callback.
Change Xen code to use ci_vcpuid.

Do not call lapic_calibrate_timer() for VM_GUEST_XENPVHVM, we will use
Xen timers.

Don't call lapic_initclocks() from cpu_hatch(); instead set
x86_cpu_initclock_func to lapic_initclocks() in lapic_calibrate_timer(),
and call *(x86_cpu_initclock_func)() from cpu_hatch().
Also call x86_cpu_initclock_func from cpu_attach() for the boot CPU.
As x86_cpu_initclock_func is called for all CPUs, x86_initclock_func can
be a NOP for lapic timer.

Reorganize Xen code for x86_initclock_func/x86_cpu_initclock_func.
Move x86_cpu_idle_xen() to hypervisor_machdep.c

Revision 1.6.12.2 / (download) - annotate - [select for diffs], Thu Apr 16 17:46:44 2020 UTC (3 years, 1 month ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.6.12.1: +26 -15 lines
Diff to previous 1.6.12.1 (colored) to branchpoint 1.6 (colored)

Don't try to attach hypervisor on non Xen; no more error messages about
hypervisor when booting on bare metal.

Revision 1.6.12.1 / (download) - annotate - [select for diffs], Thu Apr 16 08:46:35 2020 UTC (3 years, 1 month ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.6: +5 -20 lines
Diff to previous 1.6 (colored)

Reorganise sources to make it possible to include Xen PVHVM support in
native kernels. Among others:
- move xen/include/amd64/hypercall.h to amd64/include/xen and
  xen/include/i386/hypercall.h to i386/include/xen
- exclude some native files from the build for xenpv
- add xen to "machine" config statement for amd64 and i386
- split arch/xen/conf/files.xen to arch/xen/conf/files.xen (for pv drivers)
  and arch/xen/conf/files.xen.pv (for full pv support)
- add GENERIC_XENHVM kernel config which includes GENERIC and add Xen PV
  drivers.

Revision 1.6.4.2 / (download) - annotate - [select for diffs], Mon Jun 10 22:06:56 2019 UTC (3 years, 11 months ago) by christos
Branch: phil-wifi
Changes since 1.6.4.1: +163 -0 lines
Diff to previous 1.6.4.1 (colored) to branchpoint 1.6 (colored) next main 1.7 (colored)

Sync with HEAD

Revision 1.6.4.1, Thu Feb 14 08:18:26 2019 UTC (4 years, 3 months ago) by christos
Branch: phil-wifi
Changes since 1.6: +0 -163 lines
FILE REMOVED

file xen_mainbus.c was added on branch phil-wifi on 2019-06-10 22:06:56 +0000

Revision 1.6 / (download) - annotate - [select for diffs], Thu Feb 14 08:18:26 2019 UTC (4 years, 3 months ago) by cherry
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, isaki-audio2-base, isaki-audio2, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Branch point for: phil-wifi, bouyer-xenpvh
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

Welcome XENPVHVM mode.

It is UP only, has xbd(4) and xennet(4) as PV drivers.

The console is com0 at isa and the native portion is very
rudimentary AT architecture, so is probably suboptimal to
run without PV support.

Revision 1.5 / (download) - annotate - [select for diffs], Wed Feb 13 09:57:46 2019 UTC (4 years, 3 months ago) by cherry
Branch: MAIN
Changes since 1.4: +4 -2 lines
Diff to previous 1.4 (colored)

Conditionally compile a conditionally used variable.

Revision 1.4.2.2 / (download) - annotate - [select for diffs], Wed Dec 26 14:01:46 2018 UTC (4 years, 5 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.4.2.1: +161 -0 lines
Diff to previous 1.4.2.1 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.4.2.1, Sat Dec 22 08:35:04 2018 UTC (4 years, 5 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.4: +0 -161 lines
FILE REMOVED

file xen_mainbus.c was added on branch pgoyette-compat on 2018-12-26 14:01:46 +0000

Revision 1.4 / (download) - annotate - [select for diffs], Sat Dec 22 08:35:04 2018 UTC (4 years, 5 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226
Branch point for: pgoyette-compat
Changes since 1.3: +9 -10 lines
Diff to previous 1.3 (colored)

Style, once again.

Revision 1.3 / (download) - annotate - [select for diffs], Sat Dec 22 07:45:58 2018 UTC (4 years, 5 months ago) by cherry
Branch: MAIN
Changes since 1.2: +14 -78 lines
Diff to previous 1.2 (colored)

This change modifies the mainbus(4) entry point for all x86 sub-archs
in the following way:

i) It provides a unified entry point in
   x86/x86/mainbus.c:mainbus_attach()
ii) It carves out the preliminary bus attachment sequence that is
   common to all sub-archs into
   x86/x86/mainbus.c: x86_cpubus_attach()
iii) It consolidates the remaining pathways as internal callee
   functions so that these may be called piecemeal if required. A
   special usecase of this is XEN PVHVM which may need to call the
   native configure path, the xen configure path, or both.
iv) It moves the driver private data structures from
   i386/i386_mainbus.c to an x86/ level one. This allows for other
   sub-arch's to do similar, if needed. (They do not at the moment).
v) For dom0 kernels, it enables 'acpi0 at mainbus?' and
   'acpi0 at hypervisorbus'. This serves two purposes:
   a) To demonstrate the possibility of dynamic configuration tree
      traversal ordering changes.
   b) To allow for the common acpi_check(self, "acpibus") call in
   x86/mainbus.c to not barf when it is called from the dom0 attach
   path. We allow for the acpi0 device to be a child of mainbus with
   the changes to amd64/conf/XEN3_DOM0 and i386/conf/XEN3PAE_DOM0
   without actually probing further in the code. This path will later
   be pursued in a PVHVM boot codepath.

There should be no operative changes with this change. If there are,
please complain loudly.

Revision 1.2 / (download) - annotate - [select for diffs], Sat Dec 22 06:59:27 2018 UTC (4 years, 5 months ago) by cherry
Branch: MAIN
Changes since 1.1: +3 -2 lines
Diff to previous 1.1 (colored)

Don't forget pedigree. Re-introduce old RCS Id tags from the originals

Revision 1.1 / (download) - annotate - [select for diffs], Sat Dec 22 06:33:37 2018 UTC (4 years, 5 months ago) by cherry
Branch: MAIN

Move mainbus(4) driver files in various x86 sub-archs to name prefixed
versions. This allows us to further modularise them by unifying common
bus probe code in x86/x86/mainbus.c to  be introduced next.

This commit has no functional changes. It is done for ease of
visibility of newer diffs in the queue.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>