Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D2395C433EF for ; Mon, 23 May 2022 02:33:10 +0000 (UTC) Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94.2) (envelope-from ) id 1nsxsC-0007aR-Tp; Sun, 22 May 2022 22:32:44 -0400 Received: from mscreen.etri.re.kr ([129.254.9.16]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA (Exim 4.94.2) (envelope-from ) id 1nsxsA-0007ZB-4t for kernelnewbies@kernelnewbies.org; Sun, 22 May 2022 22:32:42 -0400 Received: from unknown (HELO send001-relay.gov-dooray.com) (211.180.235.152) by 129.254.9.16 with ESMTP; 23 May 2022 11:32:35 +0900 X-Original-SENDERIP: 211.180.235.152 X-Original-MAILFROM: ckim@etri.re.kr X-Original-RCPTTO: kernelnewbies@kernelnewbies.org Received: from [10.162.225.112] (HELO smtp002-imp.gov-dooray.com) ([10.162.225.112]) by send001-relay.gov-dooray.com with SMTP id 20585e36628af243; Mon, 23 May 2022 11:32:35 +0900 DKIM-Signature: a=rsa-sha256; b=HaGbCUo+WXa3h6EQ4s6XZeYAi2hHMJ1BNgAMVQpOj98VJWmbZ4+z4Sy9RVMtCUQR3Xg//nYWGO jAvzpsCNqUrc6uKVbQOxUkI8cfeWVhlj4lcPAqyhZIu3ZNkzReMiMBCLl3IknQIJIQy9+qjqFLub rP3XqS7D/w6+zKM5YMwqDNxVWbbCwQk5l2fYbOep6Fl3jnhcqa4Z3nDJkEcOSMDdPH8xu3qBFXfA qmGmx1HAZhVGDz2k3RaQXcixAo8DA5495VGQyHneSNxBPxwidjRtJ2XRuYGC03CnjgW+dqw4qKab pE+mGm53nFbpVqRiaAM1NaQikUs78tMCVy4laJnA==; c=relaxed/relaxed; s=selector; d=dooray.com; v=1; bh=3+1OwTy21Su6FPWglrYIzKZr9WFZeUomwIkSYdbkRRs=; h=From:To:Subject:Message-ID; Received: from [129.254.132.39] (HELO CHANKIMPC) ([129.254.132.39]) by smtp002-imp.gov-dooray.com with SMTP id e34a224f628af242; Mon, 23 May 2022 11:32:35 +0900 From: "Chan Kim" To: References: In-Reply-To: Subject: RE: when is pci_dev->resource values are filled? Date: Mon, 23 May 2022 11:32:33 +0900 Message-ID: <0cf601d86e4d$5bf54f10$13dfed30$@etri.re.kr> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQHu4tTYM5TxoZzpzoBpJHdq5SFWgqz+1CLQ Content-Language: ko X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org It looks like these values in pci_dev.resources are filled in pci_read_bases function which is called in pci_setup_device function. So linux is reading the values set by the BIOS and setting them in its pci_dev struct. And the devices's driver is called after that. Chan Kim > -----Original Message----- > From: Chan Kim > Sent: Friday, May 20, 2022 10:50 AM > To: kernelnewbies@kernelnewbies.org > Subject: when is pci_dev->resource values are filled? > > Hi, all > > When initializing a PCI device, during the pci_driver's probe function, > pci_request_region is called. > Inside the pci_request_region, it is just calling request_region with the > values in pci_dev->resource[bar].start and end. > But when is this pci->dev->resource values filled? Is it done by the > BIOS(or UEFI) before linux boots? > Probably not because this pci_dev struct is from linux and should be > filled by linux code and I couldn't find where it's done. > > Chan Kim _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies