gem5  v20.1.0.0
fs_workload.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2007 The Hewlett-Packard Development Company
3  * All rights reserved.
4  *
5  * The license below extends only to copyright in the software and shall
6  * not be construed as granting a license to any other intellectual
7  * property including but not limited to intellectual property relating
8  * to a hardware implementation of the functionality of the software
9  * licensed hereunder. You may use the software subject to the license
10  * terms below provided that you ensure that this notice is replicated
11  * unmodified and in its entirety in all distributions of the software,
12  * modified or unmodified, in source code or in binary form.
13  *
14  * Redistribution and use in source and binary forms, with or without
15  * modification, are permitted provided that the following conditions are
16  * met: redistributions of source code must retain the above copyright
17  * notice, this list of conditions and the following disclaimer;
18  * redistributions in binary form must reproduce the above copyright
19  * notice, this list of conditions and the following disclaimer in the
20  * documentation and/or other materials provided with the distribution;
21  * neither the name of the copyright holders nor the names of its
22  * contributors may be used to endorse or promote products derived from
23  * this software without specific prior written permission.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36  */
37 
38 #ifndef __ARCH_X86_FS_WORKLOAD_HH__
39 #define __ARCH_X86_FS_WORKLOAD_HH__
40 
41 #include <string>
42 #include <vector>
43 
44 #include "arch/x86/regs/misc.hh"
45 #include "arch/x86/regs/segment.hh"
46 #include "base/types.hh"
47 #include "cpu/thread_context.hh"
48 #include "params/X86FsWorkload.hh"
49 #include "sim/kernel_workload.hh"
50 
51 namespace X86ISA
52 {
53 
54 namespace SMBios
55 {
56 
57 class SMBiosTable;
58 
59 } // namespace SMBios
60 namespace IntelMP
61 {
62 
63 class FloatingPointer;
64 class ConfigTable;
65 
66 } // namespace IntelMP
67 
68 /* memory mappings for KVMCpu in SE mode */
69 const Addr syscallCodeVirtAddr = 0xffff800000000000;
70 const Addr GDTVirtAddr = 0xffff800000001000;
71 const Addr IDTVirtAddr = 0xffff800000002000;
72 const Addr TSSVirtAddr = 0xffff800000003000;
73 const Addr TSSPhysAddr = 0x63000;
74 const Addr ISTVirtAddr = 0xffff800000004000;
75 const Addr PFHandlerVirtAddr = 0xffff800000005000;
76 const Addr MMIORegionVirtAddr = 0xffffc90000000000;
77 const Addr MMIORegionPhysAddr = 0xffff0000;
78 
80  SegDescriptor desc, bool longmode);
81 
82 class FsWorkload : public KernelWorkload
83 {
84  public:
85  typedef X86FsWorkloadParams Params;
87 
88  public:
89  void initState() override;
90 
91  protected:
92 
97 
99  Addr &headerSize, Addr &tableSize, Addr table=0);
100 
101  void writeOutMPTable(Addr fp,
102  Addr &fpSize, Addr &tableSize, Addr table=0);
103 
104  const Params *params() const { return (const Params *)&_params; }
105 };
106 
107 } // namespace X86ISA
108 
109 #endif // __ARCH_X86_FS_WORKLOAD_HH__
X86ISA::GDTVirtAddr
const Addr GDTVirtAddr
Definition: fs_workload.hh:70
ArmISA::fp
Bitfield< 19, 16 > fp
Definition: miscregs_types.hh:173
X86ISA::IntelMP::FloatingPointer
Definition: intelmp.hh:86
X86ISA::FsWorkload::mpConfigTable
IntelMP::ConfigTable * mpConfigTable
Definition: fs_workload.hh:95
X86ISA::FsWorkload::FsWorkload
FsWorkload(Params *p)
Definition: fs_workload.cc:53
KernelWorkload
Definition: kernel_workload.hh:42
X86ISA::SMBios::SMBiosTable
Definition: smbios.hh:149
header
output header
Definition: nop.cc:36
X86ISA::TSSPhysAddr
const Addr TSSPhysAddr
Definition: fs_workload.hh:73
X86ISA::FsWorkload
Definition: fs_workload.hh:82
X86ISA::IntelMP::ConfigTable
Definition: intelmp.hh:144
X86ISA::ACPI::RSDP
Definition: acpi.hh:65
ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition: thread_context.hh:88
segment.hh
X86ISA::syscallCodeVirtAddr
const Addr syscallCodeVirtAddr
Definition: fs_workload.hh:69
X86ISA::FsWorkload::rsdp
ACPI::RSDP * rsdp
Definition: fs_workload.hh:96
X86ISA::MMIORegionPhysAddr
const Addr MMIORegionPhysAddr
Definition: fs_workload.hh:77
X86ISA::IDTVirtAddr
const Addr IDTVirtAddr
Definition: fs_workload.hh:71
X86ISA::FsWorkload::mpFloatingPointer
IntelMP::FloatingPointer * mpFloatingPointer
Definition: fs_workload.hh:94
X86ISA::SegmentRegIndex
SegmentRegIndex
Definition: segment.hh:43
X86ISA
This is exposed globally, independent of the ISA.
Definition: acpi.hh:55
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
X86ISA::PFHandlerVirtAddr
const Addr PFHandlerVirtAddr
Definition: fs_workload.hh:75
X86ISA::FsWorkload::writeOutMPTable
void writeOutMPTable(Addr fp, Addr &fpSize, Addr &tableSize, Addr table=0)
Definition: fs_workload.cc:343
X86ISA::FsWorkload::writeOutSMBiosTable
void writeOutSMBiosTable(Addr header, Addr &headerSize, Addr &tableSize, Addr table=0)
Definition: fs_workload.cc:325
X86ISA::TSSVirtAddr
const Addr TSSVirtAddr
Definition: fs_workload.hh:72
X86ISA::FsWorkload::initState
void initState() override
initState() is called on each SimObject when not restoring from a checkpoint.
Definition: fs_workload.cc:105
X86ISA::p
Bitfield< 0 > p
Definition: pagetable.hh:151
types.hh
X86ISA::installSegDesc
void installSegDesc(ThreadContext *tc, SegmentRegIndex seg, SegDescriptor desc, bool longmode)
Definition: fs_workload.cc:61
X86ISA::ISTVirtAddr
const Addr ISTVirtAddr
Definition: fs_workload.hh:74
X86ISA::FsWorkload::params
const Params * params() const
Definition: fs_workload.hh:104
kernel_workload.hh
KernelWorkload::_params
const Params & _params
Definition: kernel_workload.hh:48
X86ISA::FsWorkload::Params
X86FsWorkloadParams Params
Definition: fs_workload.hh:85
misc.hh
X86ISA::FsWorkload::smbiosTable
SMBios::SMBiosTable * smbiosTable
Definition: fs_workload.hh:93
thread_context.hh
X86ISA::seg
Bitfield< 2, 0 > seg
Definition: types.hh:82
X86ISA::MMIORegionVirtAddr
const Addr MMIORegionVirtAddr
Definition: fs_workload.hh:76

Generated on Wed Sep 30 2020 14:01:59 for gem5 by doxygen 1.8.17