Skip to content

Commit fd1373e

Browse files
tomty89pelwell
authored andcommitted
armstub8: do not use GIC values for non-GIC devices (#105)
The new values could severely slow down booting (or actually, time, as even timeouts would be slowed down), specifically when booting FreeBSD with u-boot EFI on a RPI 3B+ (before the kernel kicks in). Therefore, revert to the old values when GIC is not enabled. For the record, the issue could be specific to / reproducible only on RPI 3B+, or BCM2837B0 (i.e. and 3A+). I assume the old values would do for BCM2837 (i.e. the 1.2GHz older variant) as well anyway.
1 parent 4a33552 commit fd1373e

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

armstubs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ clean :
2121
$(CC8) -c $< -o $@
2222

2323
%8-gic.o: %8.S
24-
$(CC8) -DGIC=1 -c $< -o $@
24+
$(CC8) -DGIC=1 -DBCM2711=1 -c $< -o $@
2525

2626
%8-32.o: %7.S
2727
$(CC) -DBCM2710=1 -c $< -o $@

armstubs/armstub8.S

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016 Raspberry Pi (Trading) Ltd.
2+
* Copyright (c) 2016-2019 Raspberry Pi (Trading) Ltd.
33
* Copyright (c) 2016 Stephen Warren <swarren@wwwdotorg.org>
44
* All rights reserved.
55
*
@@ -29,12 +29,21 @@
2929

3030
#define BIT(x) (1 << (x))
3131

32+
#if BCM2711
3233
#define LOCAL_CONTROL 0xff800000
3334
#define LOCAL_PRESCALER 0xff800008
35+
#else
36+
#define LOCAL_CONTROL 0x40000000
37+
#define LOCAL_PRESCALER 0x40000008
38+
#endif
3439
#define GIC_DISTB 0xff841000
3540
#define GIC_CPUB 0xff842000
3641

42+
#if BCM2711
3743
#define OSC_FREQ 54000000
44+
#else
45+
#define OSC_FREQ 19200000
46+
#endif
3847

3948
#define SCR_RW BIT(10)
4049
#define SCR_HCE BIT(8)

0 commit comments

Comments
 (0)