From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2a00:1450:4864:20::242; helo=mail-lj1-x242.google.com; envelope-from=mw@semihalf.com; receiver=edk2-devel@lists.01.org Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9FE7A2097F564 for ; Thu, 12 Jul 2018 00:40:52 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id q127-v6so20668582ljq.11 for ; Thu, 12 Jul 2018 00:40:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BNVNb9tu64AqW9rxFWo2VMw745bsHNjllCy9LucySZc=; b=vlgmMKJtQaNxQYE3mvopoURpRoTiow3kbk59rVocdkMlKtibl+HNJSOio9KunO6qaA 9bqvzv4Szu1LSCZHBG7mNeQE+Q6ItH84FnIQMjFr2HxNfjj0qcq0KiAKok2ARJ9hXgs6 1qiiVkR+5U8LYO2Nj/fGg8h9L8a4c+S0MNGCzS3wcSFd/h6Z4cin9B0QL8PPV/549OG0 U6h7fZxAqxsGfdBqC0MvccSWikHzVa/0BsKphYUbsA6UYD4+mFeRdPy6acKw++HDOl90 cTdFNSBuf5BzQGvIqIQqOVDmnkoiY/be0twDx4jQcPIL/mIlKm1PbjjHrDX40bclNfjr WckA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BNVNb9tu64AqW9rxFWo2VMw745bsHNjllCy9LucySZc=; b=ZGtlWIuUmhBFBrsQSJ1OyntQf6h7riIVEW9IGTMIEwfcxsrnnD8iy7yKydwm2vN1yC TZnj3L/KiOu014TzorVUxN0ua3d8W/HMvu4wJ/g/Xi6Lx0sRkk1ivoiP2wtwQL9DU8x9 i0ME3kork8SRAHp9a02gvZD/3BGR8mbmG2hcDzdvZKGJ9u8HK9qDT7y2JT6OE0wEVmDo 0j/LFVDBWZxuGOtpNniQ0nBynae1T/fVDRsNgQBRThHlsoi4omSRd4HknGG/di3hVWII ghOgFiZ+Ve92gE2MzEkHxLHVHvi6Z/eyxvBmo8186BSk6SObUO0HX2Y5lYXiO6T5JwGZ xQeA== X-Gm-Message-State: APt69E3kjhCY49+lWzM4KG9PKRQtRLssYdsUVsi8P8rkWG/R3jaF4O8m cxOyfFJhLsyOokDadB2YMfNvp0W5SRw= X-Google-Smtp-Source: AAOMgpcka0YLAegaKZaYCYYxn7De5OSeocOFtI4ckW7MYp7qXb/6rugvm/qOxMgzOPMMuOeywRAMjg== X-Received: by 2002:a2e:5617:: with SMTP id k23-v6mr20816852ljb.86.1531381250561; Thu, 12 Jul 2018 00:40:50 -0700 (PDT) Received: from gilgamesh.semihalf.com (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id p20-v6sm3367058lji.37.2018.07.12.00.40.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Jul 2018 00:40:49 -0700 (PDT) From: Marcin Wojtas To: edk2-devel@lists.01.org Cc: leif.lindholm@linaro.org, ard.biesheuvel@linaro.org, nadavh@marvell.com, hannah@marvell.com, mw@semihalf.com, jsd@semihalf.com, jaz@semihalf.com Date: Thu, 12 Jul 2018 09:39:57 +0200 Message-Id: <1531381201-5022-3-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1531381201-5022-1-git-send-email-mw@semihalf.com> References: <1531381201-5022-1-git-send-email-mw@semihalf.com> Subject: [platforms: PATCH 2/6] Marvell/Library: Introduce ArmadaIcuLib class X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2018 07:40:53 -0000 ICU (Interrupt Consolidation Unit) is a mechanism, that allows to send a message-based interrupts from the CP110 unit (South Bridge) to the Application Processor hardware block. After dispatching the interrupts in the GIC are generated. This patch adds a basic version of the library, that allows to configure a static mapping between CP110 interfaces and GIC. It is required for the cases, where the OS does not support the ICU controller on its own (e.g. ACPI boot). Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas --- Silicon/Marvell/Marvell.dec | 1 + Silicon/Marvell/Include/Library/ArmadaIcuLib.h | 45 ++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 Silicon/Marvell/Include/Library/ArmadaIcuLib.h diff --git a/Silicon/Marvell/Marvell.dec b/Silicon/Marvell/Marvell.dec index 4def897..616624e 100644 --- a/Silicon/Marvell/Marvell.dec +++ b/Silicon/Marvell/Marvell.dec @@ -61,6 +61,7 @@ [LibraryClasses] ArmadaBoardDescLib|Include/Library/ArmadaBoardDescLib.h + ArmadaIcuLib|Include/Library/ArmadaIcuLib.h ArmadaSoCDescLib|Include/Library/ArmadaSoCDescLib.h SampleAtResetLib|Include/Library/SampleAtResetLib.h diff --git a/Silicon/Marvell/Include/Library/ArmadaIcuLib.h b/Silicon/Marvell/Include/Library/ArmadaIcuLib.h new file mode 100644 index 0000000..9b68934 --- /dev/null +++ b/Silicon/Marvell/Include/Library/ArmadaIcuLib.h @@ -0,0 +1,45 @@ +/** +* +* Copyright (C) 2018, Marvell International Ltd. and its affiliates +* +* This program and the accompanying materials are licensed and made available +* under the terms and conditions of the BSD License which accompanies this +* distribution. The full text of the license may be found at +* http://opensource.org/licenses/bsd-license.php +* +* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +* +**/ +#ifndef __ARMADA_ICU_LIB_H__ +#define __ARMADA_ICU_LIB_H__ + +typedef enum { + Level = 0, + Edge = 1 +} ICU_IRQ_TYPE; + +typedef struct { + UINTN IcuId; + UINTN SpiId; + ICU_IRQ_TYPE IrqType; +} ICU_IRQ; + +typedef struct { + const ICU_IRQ *Map; + UINTN Size; +} ICU_CONFIG_ENTRY; + +typedef struct { + ICU_CONFIG_ENTRY NonSecure; + ICU_CONFIG_ENTRY Sei; + ICU_CONFIG_ENTRY Rei; +} ICU_CONFIG; + +EFI_STATUS +EFIAPI +ArmadaIcuInitialize ( + VOID + ); + +#endif /* __ARMADA_ICU_LIB_H__ */ -- 2.7.4