From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id qV3gJrsggmDIawAAWB0awg (envelope-from ) for ; Thu, 22 Apr 2021 21:19:55 -0400 Received: by simark.ca (Postfix, from userid 112) id 902921F104; Thu, 22 Apr 2021 21:19:55 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id B4F701E01F for ; Thu, 22 Apr 2021 21:19:54 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1B8AC3896C16; Fri, 23 Apr 2021 01:19:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1B8AC3896C16 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1619140794; bh=/yGjPSa6fyXdpxQe+RQrrl5LlTJGecji5RGpPomQCpQ=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=a+Keq3WMrc3YFaFHfcF/6ASBoGbnONbU0qYQZx5IUgfD3EHok5ZZ79NGOVrP89yli FitJlSmT9Bb4pyhO7xmZ9ch669vo7OUk8hVqCYFYkfq61e1+F9kSFV/2xBhwepDLaK W74aq8PIkAQYU6NGzEhkG7l6O57UxUltqE2oUJjo= Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id BE7F7385DC33; Fri, 23 Apr 2021 01:19:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BE7F7385DC33 Received: from vapier (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C5C3B341350; Fri, 23 Apr 2021 01:19:50 +0000 (UTC) Date: Thu, 22 Apr 2021 21:19:50 -0400 To: Joel Sherrill Subject: Re: Microblaze libgloss and gdb simulator Message-ID: Mail-Followup-To: Joel Sherrill , Eli Zaretskii via Gdb , Newlib References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mike Frysinger via Gdb Reply-To: Mike Frysinger Cc: Newlib , Eli Zaretskii via Gdb Errors-To: gdb-bounces@sourceware.org Sender: "Gdb" On 22 Apr 2021 19:55, Joel Sherrill wrote: > On Thu, Apr 22, 2021, 7:27 PM Mike Frysinger wrote: > > ignoring that, the microblaze sim doesn't have syscall support hooked up. > > so it's only a CPU simulator atm. > > So it has no output whatsoever? Does it get used for anything? afaict, correct. the most basic sims just do CPU level stuff and then have their state inspected, or communicate pass/fail via exit status or abort. this behavior actually isn't that rare ... it's where most sims start. > We are resurrecting some old work that I did for a Microblaze port. I did > write an inbyte() and outbyte() which would normally come from the xil > library. But I don't have any idea how I figured out there was a uart at a > particular address. I swear I had it working to print then but now it > faults after the first instruction. > > Is there any known good executable for it? Even just seeing it operate with > a linked executable that had a crt0 and did something would be helpful at > this point. ftr, i've never worked on microblaze. i'm just reading the code and poking the toolchain :). getting i/o (or maybe just o) support into the sim shouldn't be terribly hard. we could even do the normal libgloss syscalls. the important things we need to know are: * how does outbyte work ? is it writing to MMIO UARTs, or something else ? * is there an interrupt or exception or specific insn that microblaze uses to trigger the hypervisor/monitor/whatever ? if so, should be possible to wire that up in the microblaze port. my reading of libgloss/microblaze/ isn't picking out anything interesting, but i'm by no means an expert here. if you can figure out those bits, happy to help on the sim side. -mike