You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

cpu_aix.go 605B

123456789101112131415161718192021222324252627282930313233
  1. // Copyright 2019 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. //go:build aix
  5. package cpu
  6. const (
  7. // getsystemcfg constants
  8. _SC_IMPL = 2
  9. _IMPL_POWER8 = 0x10000
  10. _IMPL_POWER9 = 0x20000
  11. )
  12. func archInit() {
  13. impl := getsystemcfg(_SC_IMPL)
  14. if impl&_IMPL_POWER8 != 0 {
  15. PPC64.IsPOWER8 = true
  16. }
  17. if impl&_IMPL_POWER9 != 0 {
  18. PPC64.IsPOWER8 = true
  19. PPC64.IsPOWER9 = true
  20. }
  21. Initialized = true
  22. }
  23. func getsystemcfg(label int) (n uint64) {
  24. r0, _ := callgetsystemcfg(label)
  25. n = uint64(r0)
  26. return
  27. }