Blob Blame History Raw
From 80528f8d6ff44a0e2cd043cd0ba11e06aac8aea2 Mon Sep 17 00:00:00 2001
From: Gustavo Luiz Duarte <gustavold@linux.vnet.ibm.com>
Date: Wed, 12 Jun 2013 23:25:30 -0500
Subject: [PATCH 483/483] Initialize grub_file_filters_{all,enabled}

Without this we see an error on ppc during startup:

Elapsed time since release of system processors: 220520 mins 17 secs
DEFAULT CATCH!, exception-handler=fff00300
at   %SRR0: 0000000000010d1c   %SRR1: 0000000000003002
Open Firmware exception handler entered from non-OF code
 
Client's Fix Pt Regs:
00 000000000000b3a4 0000000001a3ff00 0000000000000000 000000000021ac50
04 000000000021a810 0000000000001240 00000000002195c0 000000000021ab30
08 000000000002195e 0000000065313237 0000000000000000 0000000001a3ff50
0c 0000000000000124 0000000000000000 0000000000000000 0000000000000000
10 0000000000000000 0000000000000000 0000000000000000 0000000000000000
14 0000000000c00000 0000000000000008 0000000000000000 0000000000000000
18 0000000000000000 0000000000000000 000000000021ab40 000000000020f8be
1c 000000000021aa40 000000000021ac50 0000000000000000 000000000021ac50

Special Regs:
%IV: 00000300     %CR: 40000044    %XER: 00000000  %DSISR: 40000000
%SRR0: 0000000000010d1c   %SRR1: 0000000000003002
%LR: 000000000000b3a4    %CTR: 000000000000b378
%DAR: 000000006531323f
Virtual PID = 0
ofdbg
0 > 

This doesn't appear to be the root cause of the problem; these should be
initalized by calls to grub_file_filter_register() called from various
GRUB_MOD_INIT() functions.  Nevertheless, right now it fixes the symptom.

---
 grub-core/kern/file.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/grub-core/kern/file.c b/grub-core/kern/file.c
index 6426668..f10d958 100644
--- a/grub-core/kern/file.c
+++ b/grub-core/kern/file.c
@@ -28,8 +28,8 @@
 
 void (*EXPORT_VAR (grub_grubnet_fini)) (void);
 
-grub_file_filter_t grub_file_filters_all[GRUB_FILE_FILTER_MAX];
-grub_file_filter_t grub_file_filters_enabled[GRUB_FILE_FILTER_MAX];
+grub_file_filter_t grub_file_filters_all[GRUB_FILE_FILTER_MAX] = {NULL, NULL, NULL, NULL};
+grub_file_filter_t grub_file_filters_enabled[GRUB_FILE_FILTER_MAX] = {NULL, NULL, NULL, NULL};
 
 /* Get the device part of the filename NAME. It is enclosed by parentheses.  */
 char *
-- 
1.8.2.1