gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Protected Attributes | List of all members
DtbFile Class Reference

#include <dtb_file.hh>

Inheritance diagram for DtbFile:
ImageFile

Public Member Functions

 DtbFile (const std::string &name)
 
 ~DtbFile ()
 
bool addBootCmdLine (const char *_args, size_t len)
 Adds the passed in Command Line options for the kernel to the proper location in the device tree. More...
 
Addr findReleaseAddr ()
 Parse the DTB file enough to find the provided release address and return it. More...
 
MemoryImage buildImage () const override
 

Protected Attributes

bool fileDataMmapped
 Bool marking if this dtb file has replaced the original read in DTB file with a new modified buffer. More...
 
uint8_t * fileData = nullptr
 
size_t length = 0
 
- Protected Attributes inherited from ImageFile
ImageFileDataPtr imageData
 

Additional Inherited Members

- Protected Member Functions inherited from ImageFile
 ImageFile (ImageFileDataPtr data)
 
virtual ~ImageFile ()
 

Detailed Description

Definition at line 41 of file dtb_file.hh.

Constructor & Destructor Documentation

◆ DtbFile()

DtbFile::DtbFile ( const std::string &  name)

Definition at line 42 of file dtb_file.cc.

References fileData, fileDataMmapped, ImageFile::imageData, length, and panic_if.

◆ ~DtbFile()

DtbFile::~DtbFile ( )

Definition at line 52 of file dtb_file.cc.

References fileData, and fileDataMmapped.

Member Function Documentation

◆ addBootCmdLine()

bool DtbFile::addBootCmdLine ( const char *  _args,
size_t  len 
)

Adds the passed in Command Line options for the kernel to the proper location in the device tree.

Parameters
_argscommand line to append
lenlength of the command line string
Returns
returns true on success, false otherwise

Definition at line 61 of file dtb_file.cc.

References fileData, fileDataMmapped, length, ArmISA::offset, and warn.

Referenced by FreebsdArmSystem::initState(), and LinuxArmSystem::initState().

◆ buildImage()

MemoryImage DtbFile::buildImage ( ) const
overridevirtual

Implements ImageFile.

Definition at line 150 of file dtb_file.cc.

References fileData, fileDataMmapped, ImageFile::imageData, and length.

Referenced by FreebsdArmSystem::initState(), and LinuxArmSystem::initState().

◆ findReleaseAddr()

Addr DtbFile::findReleaseAddr ( )

Parse the DTB file enough to find the provided release address and return it.

Returns
release address for SMP boot

Definition at line 129 of file dtb_file.cc.

References betoh(), ArmISA::fd, fileData, ArmISA::len, and ArmISA::offset.

Referenced by FreebsdArmSystem::initState().

Member Data Documentation

◆ fileData

uint8_t* DtbFile::fileData = nullptr
protected

Definition at line 48 of file dtb_file.hh.

Referenced by addBootCmdLine(), buildImage(), DtbFile(), findReleaseAddr(), and ~DtbFile().

◆ fileDataMmapped

bool DtbFile::fileDataMmapped
protected

Bool marking if this dtb file has replaced the original read in DTB file with a new modified buffer.

Definition at line 47 of file dtb_file.hh.

Referenced by addBootCmdLine(), buildImage(), DtbFile(), and ~DtbFile().

◆ length

size_t DtbFile::length = 0
protected

Definition at line 49 of file dtb_file.hh.

Referenced by addBootCmdLine(), buildImage(), and DtbFile().


The documentation for this class was generated from the following files:

Generated on Fri Feb 28 2020 16:27:10 for gem5 by doxygen 1.8.13