From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 13411 invoked from network); 12 Apr 2021 16:56:46 -0000 Received: from 1ess.inri.net (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 12 Apr 2021 16:56:46 -0000 Received: from ms11p00im-qufo17281301.me.com ([17.58.38.50]) by 1ess; Mon Apr 12 12:48:13 -0400 2021 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1618246086; bh=gmW6l7Ia/vNyYlhWPey+wFtqboGiog2Lr2ZBhFnPftw=; h=From:Content-Type:Mime-Version:Subject:Date:To:Message-Id; b=b8dn3Y3aWMT/4Gd1Wdrw0Y+sd+28VdP28wkuC7zH1VdHsLJEaiA5sAtNS6EArnT4z o5JLrKlTs/UsfXxGL0db75FUe+38g8sCyJxR/Yltfwnw/yVVHqsxsu8mk/iC0LdyI+ IsMehJ0EpPORaL132u6nv+PZXt+wboHayR+A1YxmUH8lnT8esVh+ZKQpUqrO2U+IH6 lkqqFj8GdvThcoGuGhUM+YaBoK9FCHiJ4Q+2AXUrlrsgl1pUIpgTRngRezstliRpV3 LrlwHA7Iwi7YZihJTyy2ikK4c0R8sRqpJvjrB5+5PYkZLJtvkp7cq7y4xvq3XY3P8r QPcJfTpTOC61w== Received: from [192.168.1.52] (unknown [93.56.117.77]) by ms11p00im-qufo17281301.me.com (Postfix) with ESMTPSA id 8C8D7AC0101 for <9front@9front.org>; Mon, 12 Apr 2021 16:48:06 +0000 (UTC) From: Daniel Morandini Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.40.0.2.32\)) Date: Mon, 12 Apr 2021 18:48:02 +0200 References: <633FF4EC79DF3B38CDE5E179107968A5@felloff.net> To: 9front@9front.org In-Reply-To: <633FF4EC79DF3B38CDE5E179107968A5@felloff.net> Message-Id: <45BD661C-F92C-4005-A71D-68E9CEB99DD6@me.com> X-Mailer: Apple Mail (2.3654.40.0.2.32) X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.391,18.0.761,17.0.607.475.0000000_definitions?= =?UTF-8?Q?=3D2021-04-12=5F10:2021-04-12=5F03,2021-04-12=5F10,2020-04-07?= =?UTF-8?Q?=5F01_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=474 malwarescore=0 adultscore=0 phishscore=0 bulkscore=0 suspectscore=0 clxscore=1015 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2104120108 List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: encrypted compliant high-performance module-scale database Subject: Re: [9front] PXE booting Rpi Reply-To: 9front@9front.org Precedence: bulk > nonono. you have to save the R2 register on entry and get it to > main. see the diff later. >=20 > nononono. KADDR() translates a physical address to the KZERO window > of the kernel. like physical address 0 becomes (KZERO+0)... this > for accessing memory (reading the DTB/ATAGS). Sorry for these stupid questions, the code really is self explanatory > i already said that bootargs.c in bcm/ is shared also by the bcm64 > kernel, where we pass the dtb pointer to it. but it is not used in > the 32 bit bcm kernel. that is why there is a conditional. a pa > of 0 means the address is not valid. its like a NULL check. > theres also a special case that ATAGS are trashed on kernel-to-kernel > reboot. so even on bcm64, pa can be 0 when the information has been > converted to CONFADDR text block. All clear now. >> Just to learn something from a master, how are you debugging this? >> I=E2=80=99m collecting data and dumping it as soon as print is ready! >=20 > thats pretty much how you do it. >=20 > anyway, heres how i checked what R2 is on entry. basically, > move R2 to R10 (which is reserved by c code for the mach > pointer so c code wont trash it). and then before calling > main() put it in R0 (first arument). This is so cool cinap, thank you for sharing! *.* With patch attached and a `bootargsinit(arg0)` instead of 0 that=E2=80=99s= it, issue solved without `device_tree=3D` option! The fw loads a dtree and we correctly load it from the proper address! Cheers, dan=