From patchwork Mon Jun 1 20:31:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jason A. Donenfeld" X-Patchwork-Id: 187346 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp3354773ilb; Mon, 1 Jun 2020 13:32:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhBixUg21HM1z/CfkyhnFkXEjx2X7X89WKCRA2ntNoPHaBzVJHxpW4xXU+l0gkbKAZaClc X-Received: by 2002:a25:3b08:: with SMTP id i8mr37959680yba.402.1591043548336; Mon, 01 Jun 2020 13:32:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591043548; cv=none; d=google.com; s=arc-20160816; b=DthtI4xQV1IVQxD72kJsSI3ph2jXW9EjWaFMjpKMDRbS5dOGVYDngi6sb0nWLG9vrV upzsafgWbya0gcASb4CgWsmOU080TN2JvTnYCviMKxNRjIzjYImsMp9/OxQHf/x+gAEP gAhNrkxpp1qQgzIQFzDa31AYwWoNcnuOH308KM8NagtCQZTF9TtjWfi6wUbqzrDxrZb9 RSRCXtNtmpOPZvK47wMclcsxOkXZCxe5TZLU9SAWHOg/VHYT959+puHBNmdBeAHYLeYC yCnlL91ZwxDTI61CtCcQfQXZk0fbOUeAnwSIzOVA0NWjihq57F2akLt/Jp0I49daA2so NXEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature; bh=BBRRl9tX0bZzchkCZzbkOwS1LzUNebD3aqCZ3vH+2P0=; b=CD56un2xxz4/h56dZb3eAFfi0/95hG0La6MYWZUbM8jlihZBIUvBsn88n/n8IDd0FO PVW8lP+0K6ZU+EsTwZLirlynMfg0ESmTNJKYUSBZ159NnrXYU4Gz0LVU/iZZMC5DBKaT 3MF+wB4mOW15zaB7WUUtQwzdfyQzAYDUw0wbY04glxDFRJwp37OUDIvOWypjZ/soBGpQ ZKm/sT76KyLqmptO2LFIAL03hTkUuLTBDOIJ/kHKrjZP1Flu73ZTmGonueDhq8b5opps r0y5sjTqU4gyl8g5JSQgl2Y7xiPUtMLvxzz9NRtpZDX3K22TAtsmW9xmaT/QrjCa/jgk 0W4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=G3M6WuU9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j82si368607ybj.1.2020.06.01.13.32.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jun 2020 13:32:28 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=G3M6WuU9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: from localhost ([::1]:49472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfr6h-0008NS-Qs for patch@linaro.org; Mon, 01 Jun 2020 16:32:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfr68-0008N9-5R for qemu-devel@nongnu.org; Mon, 01 Jun 2020 16:31:52 -0400 Received: from mail.zx2c4.com ([192.95.5.64]:34773) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfr66-0005p4-J0 for qemu-devel@nongnu.org; Mon, 01 Jun 2020 16:31:51 -0400 Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 59a01817; Mon, 1 Jun 2020 20:15:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=from:to:cc :subject:date:message-id:mime-version:content-transfer-encoding; s=mail; bh=58nGqeL2EkbwGSkolbgyaxYRu0E=; b=G3M6WuU9L+p5ROgN7eLr NQfC0HoEVeKZWQ71mbMri7Vsgb72a9TI1TUUcGzCkDZ3FYWk8y9ASuG2M0PN9uAj 2UODuvuRp1S/RLesfzLv5SnwFs2xA6p/4QhI6a+5IH6v1KoPSQIn6FsZiDqysBvG tb9Pw3IcbbZNJGm9KMsumFof7FpHiV6Vn5wLkECWA9xqd3HMkL+lX4HFvTVOGG0c keJKR/bBpNfP8PJHRMnRcDLqwxc+1jKYvIirJAdJVg/nTLSFPPfcTkGpLgwiaOYg rVJcb7BnhD2DvR8t3PWKnf0hk4CKsyMyQqnf0lU9xxF4U89rHEWbBAyVgCfETcNr Kw== Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id a08cc4c3 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 1 Jun 2020 20:15:44 +0000 (UTC) From: "Jason A. Donenfeld" To: qemu-devel@nongnu.org Subject: [PATCH] sparc: implement addr function Date: Mon, 1 Jun 2020 14:31:43 -0600 Message-Id: <20200601203143.93424-1-Jason@zx2c4.com> MIME-Version: 1.0 Received-SPF: pass client-ip=192.95.5.64; envelope-from=Jason@zx2c4.com; helo=mail.zx2c4.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/01 16:31:49 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Jason A. Donenfeld" , Mark Cave-Ayland Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The sparc firmware provides an addr function, which is used by operating systems like OpenBSD to query and work with framebuffer information, addressing the cells directly. Without it, QEMU cannot start OpenBSD at all, while with it, QEMU boots out of the box. Suggested-by: Mark Cave-Ayland Signed-off-by: Jason A. Donenfeld --- After this lands, somebody will need to update the submodule and prebuilt inside of qemu. forth/device/extra.fs | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.26.2 diff --git a/forth/device/extra.fs b/forth/device/extra.fs index 9ca6b78..f778f7a 100644 --- a/forth/device/extra.fs +++ b/forth/device/extra.fs @@ -19,6 +19,12 @@ rot encode-int 2swap property ; +: addr + parse-word $find if + cell + + then +; + \ ------------------------------------------------------------------------- \ property utils \ -------------------------------------------------------------------------