gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::loader::DtbFile Class Reference

#include <dtb_file.hh>

Inheritance diagram for gem5::loader::DtbFile:
gem5::loader::ImageFile

Public Member Functions

 DtbFile (const std::string &name)
 
 ~DtbFile ()
 
bool addBootData (const char *_cmdline, size_t cmdline_len, off_t initrd_addr, size_t initrd_len)
 Adds the passed in Command Line options and initrd for the kernel to the proper location in the device tree.
 
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.
 
Addr findReleaseAddr ()
 Parse the DTB file enough to find the provided release address and return it.
 
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.
 
uint8_t * fileData = nullptr
 
size_t length = 0
 
- Protected Attributes inherited from gem5::loader::ImageFile
ImageFileDataPtr imageData
 

Additional Inherited Members

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

Detailed Description

Definition at line 46 of file dtb_file.hh.

Constructor & Destructor Documentation

◆ DtbFile()

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

Definition at line 46 of file dtb_file.cc.

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

◆ ~DtbFile()

gem5::loader::DtbFile::~DtbFile ( )

Definition at line 56 of file dtb_file.cc.

References fileData, and fileDataMmapped.

Member Function Documentation

◆ addBootCmdLine()

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

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 78 of file dtb_file.hh.

References addBootData(), and gem5::ArmISA::len.

◆ addBootData()

bool gem5::loader::DtbFile::addBootData ( const char * _cmdline,
size_t cmdline_len,
off_t initrd_addr,
size_t initrd_len )

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

Parameters
_cmdlinecommand line to append
cmdline_lenlength of the command line string
initrd_addrstarting physical address of initrd
initrd_lenlength of initrd data in memory
Returns
returns true on success, false otherwise

Definition at line 65 of file dtb_file.cc.

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

Referenced by addBootCmdLine().

◆ buildImage()

MemoryImage gem5::loader::DtbFile::buildImage ( ) const
overridevirtual

Implements gem5::loader::ImageFile.

Definition at line 181 of file dtb_file.cc.

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

◆ findReleaseAddr()

Addr gem5::loader::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 160 of file dtb_file.cc.

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

Member Data Documentation

◆ fileData

uint8_t* gem5::loader::DtbFile::fileData = nullptr
protected

Definition at line 53 of file dtb_file.hh.

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

◆ fileDataMmapped

bool gem5::loader::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 52 of file dtb_file.hh.

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

◆ length

size_t gem5::loader::DtbFile::length = 0
protected

Definition at line 54 of file dtb_file.hh.

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


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

Generated on Tue Jun 18 2024 16:24:19 for gem5 by doxygen 1.11.0