Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1kXaQa-0005QY-C2 for mharc-grub-devel@gnu.org; Tue, 27 Oct 2020 21:39:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41964) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXaQY-0005QM-PU for grub-devel@gnu.org; Tue, 27 Oct 2020 21:39:03 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:32884) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kXaQX-00056U-2F for grub-devel@gnu.org; Tue, 27 Oct 2020 21:39:02 -0400 Received: by mail-pf1-x442.google.com with SMTP id j18so2002800pfa.0 for ; Tue, 27 Oct 2020 18:39:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axtens.net; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0dVXXHljKFAwVWcWMnoeNqTXTzFQp2QvXX8ta4IJ65Q=; b=GkjxYmdYpzUy6uhHRZtzmQhWFkd5vJIUpTaiRcQ1sIOuq7lL8xUeIOn9M0U5Rs8Jxk lCPZr2wkYEld0ISNcK0towzIBhLAKnPrO2Pz2KAULsC31TwFXDvEfLlU+VWbgsnX6XEQ Ep5/NaipBj3Ar7c+Bt0G4pjF/Fd34fQrcSpHs= 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:mime-version :content-transfer-encoding; bh=0dVXXHljKFAwVWcWMnoeNqTXTzFQp2QvXX8ta4IJ65Q=; b=VtLlEFsf7gp+sU79i9jxI4+wbB8328UAqddnbmLPfH6NKMqnM88Nhv5zX1xOUrPXZn gI0LBuLcBqNojOO2dGYcuvg/1BGkZkXzjKTgD113HjWMiYRfJy2HLYSh0Bp8Nz7uSsap H4Otrn+i68fso+nZtvYyq7HSuxVv8d+9w+cZ3b146ADUKsfGTP5CyhfxecODRn9whw5J taWSylX8+HA+h5Lg7r2OWbaUAKidlFaoXV4O1Pi5+EvuYs2dja5p7dKDXvQPxFfH07rs uCEj5L+sML2dhy1DhOBN1iM3tNBvuMNwmhhD31zTR2rQSW8NW+m3Y4sCoQwpgKJ2T1k5 iEzA== X-Gm-Message-State: AOAM5319viPw683HJZRmututeqaDSJmL/Ly3QzPlxtZaLgezujn5gh2g knOAEyqWk5rVCR3Q40KuzVm8h0YdZW3qwg== X-Google-Smtp-Source: ABdhPJxuqsadK61AGzex6lYxxxD2QT+BwjJoVXXq5kdIO4J9gqxbkXETjtPiPGTr76OH26eejTSldA== X-Received: by 2002:a05:6a00:1492:b029:163:f204:808a with SMTP id v18-20020a056a001492b0290163f204808amr4958647pfu.62.1603849138890; Tue, 27 Oct 2020 18:38:58 -0700 (PDT) Received: from localhost (2001-44b8-1113-6700-b4f7-e8d4-abaa-2197.static.ipv6.internode.on.net. [2001:44b8:1113:6700:b4f7:e8d4:abaa:2197]) by smtp.gmail.com with ESMTPSA id n15sm3611820pgt.75.2020.10.27.18.38.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 18:38:58 -0700 (PDT) From: Daniel Axtens To: grub-devel@gnu.org Cc: rashmica.g@gmail.com, alastair@d-silva.org, Daniel Axtens Subject: [PATCH] ieee1275: claim up to 512MB memory Date: Wed, 28 Oct 2020 12:38:51 +1100 Message-Id: <20201028013851.1128388-1-dja@axtens.net> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::442; envelope-from=dja@axtens.net; helo=mail-pf1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2020 01:39:03 -0000 If we are verifying large kernels, we need more that 32MB. (Many distro kernels are quite large, and debug kernels can be even bigger!) This is possibly not the way we want to go with for upstream as it breaks booting on systems with <= 512MB. We're working on a more upstream-friendly solution and will post it shortly. However, for an end-user or packager with a higher minimum memory requirement, this will work fine. Signed-off-by: Daniel Axtens --- grub-core/kern/ieee1275/init.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c index 1d9a2b33483e..04fcb5a4ae2e 100644 --- a/grub-core/kern/ieee1275/init.c +++ b/grub-core/kern/ieee1275/init.c @@ -52,15 +52,13 @@ #ifdef __i386__ #define HEAP_MAX_SIZE (unsigned long) (64 * 1024 * 1024) #else -#define HEAP_MAX_SIZE (unsigned long) (32 * 1024 * 1024) +#define HEAP_MAX_SIZE (unsigned long) (512 * 1024 * 1024) #endif -/* If possible, we will avoid claiming heap above this address, because it - seems to cause relocation problems with OSes that link at 4 MiB */ #ifdef __i386__ #define HEAP_MAX_ADDR (unsigned long) (64 * 1024 * 1024) #else -#define HEAP_MAX_ADDR (unsigned long) (32 * 1024 * 1024) +#define HEAP_MAX_ADDR (unsigned long) (512 * 1024 * 1024) #endif extern char _start[]; -- 2.25.1