gem5-dev@gem5.org

The gem5 Developer List

View all threads

[XS] Change in gem5/gem5[develop]: stdlib: write device tree after setting up bootloader in ARMBoard

HN
Hoa Nguyen (Gerrit)
Fri, Apr 21, 2023 1:56 AM

Hoa Nguyen has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/70017?usp=email )

Change subject: stdlib: write device tree after setting up bootloader in
ARMBoard
......................................................................

stdlib: write device tree after setting up bootloader in ARMBoard

The generation of the device tree in an arm system requires knowing
cpu-release-addr property, which is only available after setting up
the bootloader.

cpu-release-addr specifies where the secondary CPUs spin/sleep(?) before
being waken up by the kernel.

The incorrect cpu-release-addr causes booting an arm system using the
standard library with the arm's provided bootloader+linux_kernel to
fail to regconize more than 1 core.

Change-Id: Ice0e38492e2f77020b0e30c42dd4e8b7ee58e598
Signed-off-by: Hoa Nguyen hoanguyen@ucdavis.edu

M src/python/gem5/components/boards/arm_board.py
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/python/gem5/components/boards/arm_board.py
b/src/python/gem5/components/boards/arm_board.py
index 10e2c0e..b439edf 100644
--- a/src/python/gem5/components/boards/arm_board.py
+++ b/src/python/gem5/components/boards/arm_board.py
@@ -320,10 +320,6 @@
# The workload needs to know the dtb_file.
self.workload.dtb_filename = self._get_dtb_filename()

  •    # Calling generateDtb from class ArmSystem to add memory  
    

information to

  •    # the dtb file.
    
  •    self.generateDtb(self._get_dtb_filename())
    
  •     # Finally we need to setup the bootloader for the ArmBoard. An ARM
        # system requires three inputs to simulate a full system: a disk  
    

image,
# the kernel file and the bootloader file(s).
@@ -331,6 +327,10 @@
self, self._get_dtb_filename(), self._bootloader
)

  •    # Calling generateDtb from class ArmSystem to add memory  
    

information to

  •    # the dtb file.
    
  •    self.generateDtb(self._get_dtb_filename())
    
  • def _get_dtb_filename(self) -> str:
        """Returns the dtb file location.
    

--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/70017?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings

Gerrit-MessageType: newchange
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ice0e38492e2f77020b0e30c42dd4e8b7ee58e598
Gerrit-Change-Number: 70017
Gerrit-PatchSet: 1
Gerrit-Owner: Hoa Nguyen hoanguyen@ucdavis.edu

Hoa Nguyen has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/70017?usp=email ) Change subject: stdlib: write device tree after setting up bootloader in ARMBoard ...................................................................... stdlib: write device tree after setting up bootloader in ARMBoard The generation of the device tree in an arm system requires knowing cpu-release-addr property, which is only available after setting up the bootloader. cpu-release-addr specifies where the secondary CPUs spin/sleep(?) before being waken up by the kernel. The incorrect cpu-release-addr causes booting an arm system using the standard library with the arm's provided bootloader+linux_kernel to fail to regconize more than 1 core. Change-Id: Ice0e38492e2f77020b0e30c42dd4e8b7ee58e598 Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu> --- M src/python/gem5/components/boards/arm_board.py 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/python/gem5/components/boards/arm_board.py b/src/python/gem5/components/boards/arm_board.py index 10e2c0e..b439edf 100644 --- a/src/python/gem5/components/boards/arm_board.py +++ b/src/python/gem5/components/boards/arm_board.py @@ -320,10 +320,6 @@ # The workload needs to know the dtb_file. self.workload.dtb_filename = self._get_dtb_filename() - # Calling generateDtb from class ArmSystem to add memory information to - # the dtb file. - self.generateDtb(self._get_dtb_filename()) - # Finally we need to setup the bootloader for the ArmBoard. An ARM # system requires three inputs to simulate a full system: a disk image, # the kernel file and the bootloader file(s). @@ -331,6 +327,10 @@ self, self._get_dtb_filename(), self._bootloader ) + # Calling generateDtb from class ArmSystem to add memory information to + # the dtb file. + self.generateDtb(self._get_dtb_filename()) + def _get_dtb_filename(self) -> str: """Returns the dtb file location. -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/70017?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings Gerrit-MessageType: newchange Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: Ice0e38492e2f77020b0e30c42dd4e8b7ee58e598 Gerrit-Change-Number: 70017 Gerrit-PatchSet: 1 Gerrit-Owner: Hoa Nguyen <hoanguyen@ucdavis.edu>