blob: 41b04b60c1ee88b02938f2918eab8ff9522cf0e5 [file] [log] [blame] [edit]
// Copyright 2020 The Fuchsia Authors
//
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT
#include <lib/arch/x86/boot-cpuid.h>
namespace arch {
namespace internal {
// The zeroth basic, hypervisor, and extended leaves (0, 0x4000'0000, and
// 0x8000'0000) are handled specially in InitializeBootCpuid itself.
// Note that they are not in the special section.
CpuidIo gBootCpuid0;
CpuidIo gBootCpuidHyp0;
CpuidIo gBootCpuidExt0;
// These leaves are used from assembly code that needs unmangled names for
// them, but InitializeBootCpuid handles them like implicit instantiations.
[[gnu::section("BootCpuidData")]] alignas(uint32_t) CpuidIo gBootCpuidFeature;
[[gnu::section("BootCpuidLeaf"),
gnu::used]] alignas(uint32_t) static const uint32_t kBootCpuidFeatureLeaf[2] = {
CpuidFeatureFlagsC::kLeaf, 0};
[[gnu::section("BootCpuidData")]] alignas(uint32_t) CpuidIo gBootCpuidExtf;
[[gnu::section("BootCpuidLeaf"),
gnu::used]] alignas(uint32_t) static const uint32_t kBootCpuidExtfLeaf[2] = {
CpuidExtendedFeatureFlagsB::kLeaf, 0};
} // namespace internal
} // namespace arch