From owner-freebsd-arm@FreeBSD.ORG Tue Mar 3 00:43:03 2015 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 144A64BF for ; Tue, 3 Mar 2015 00:43:03 +0000 (UTC) Received: from mail-qc0-x22e.google.com (mail-qc0-x22e.google.com [IPv6:2607:f8b0:400d:c01::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C210E1C5 for ; Tue, 3 Mar 2015 00:43:02 +0000 (UTC) Received: by qcxr5 with SMTP id r5so27899021qcx.10 for ; Mon, 02 Mar 2015 16:43:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=GoFRNUvVyB9ZtnRQwYJWqt5TAkmvYRZjIJHx39+QNWs=; b=wFNMP/926fQM7k4vZSPtF/W+M/tIFFanz37ja78hjRI/gPOO2KB89ctQ8cTo4I1mwR zBxXcib4jA65bAXMRkxo2zWFi6Yxr5bd+gxgoeEOYgJFh8EFwqgX5ViXH9RNmFqEn2Zx TIOHX++Y8gv2eZnnXMt4xBZ+XwEMFb404BXV2nKDqBeWyaGy+k/3i9c/1npUnKy6qGg0 rMFj+yqZ9fMU8CJwJtDA2sspSZcnifA9q+BoBlsrjbUY/yD5o15pww7RBYofXo8YHxOX zz353hLFP/uyY8ZW1KS7hzrIgPbwuqSNVRpD7tyhVfoUkIZpO3IjedxmIX6rNWDaxTwY zL/w== MIME-Version: 1.0 X-Received: by 10.140.102.19 with SMTP id v19mr53772709qge.32.1425343381939; Mon, 02 Mar 2015 16:43:01 -0800 (PST) Received: by 10.140.37.82 with HTTP; Mon, 2 Mar 2015 16:43:01 -0800 (PST) Date: Mon, 2 Mar 2015 21:43:01 -0300 Message-ID: Subject: Resource allocation on character driver From: =?UTF-8?Q?Mat=C3=ADas_Perret_Cantoni?= To: freebsd-arm@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2015 00:43:03 -0000 Hello! I'm trying to write a very simple character driver. What I need is to allocate a specific byte of memory and then write/read it. I know that for newbus drivers one can use the bus_set_resource() and bus_alloc_resource_any() for this. Is there any way for doing this in a driver that doesn't only implements the loader() function? (no identify, probe and attach methods) I'm new at this, so all kind of advises are welcomed! Regards, Matias.-