Skip to content

Commit dc6014f

Browse files
committed
Merge remote-tracking branch 'gh/next' into gp20-alpha-drop-stable
2 parents bfc7e46 + 4e726e6 commit dc6014f

313 files changed

Lines changed: 26301 additions & 2462 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ m4/lt*
3838
m4/libtool.m4
3939
libtool
4040
src/include/version.h
41-
doc/sof_uapi
41+
doc/doxygen
4242
*.doxygen
4343

4444
autom4te*

Makefile.am

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,19 @@ export SOF_INCDIR = \
2727
-I $(SRC_DIR)/include \
2828
-I $(ROOT_DIR)/include
2929

30-
export ARCH_INCDIR = \
31-
-I $(SRC_DIR)/arch/$(ARCH)/include \
32-
-I $(SRC_DIR)/arch/$(ARCH)/xtos
30+
ARCH_INCDIR = -I $(SRC_DIR)/arch/$(ARCH)/include
31+
32+
if BUILD_XTENSA_SMP
33+
ARCH_INCDIR += \
34+
-I $(SRC_DIR)/arch/$(ARCH)/smp/include \
35+
-I $(SRC_DIR)/arch/$(ARCH)/smp/xtos
36+
else
37+
ARCH_INCDIR += \
38+
-I $(SRC_DIR)/arch/$(ARCH)/up/include \
39+
-I $(SRC_DIR)/arch/$(ARCH)/up/xtos
40+
endif
41+
42+
export ARCH_INCDIR
3343

3444
PLATFORM_INCDIR = -I $(SRC_DIR)/platform/$(PLATFORM)/include
3545

configure.ac

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ if test "$have_rimage" = "yes"; then
6969
fi
7070
AM_CONDITIONAL(BUILD_RIMAGE, test "$have_rimage" = "yes")
7171

72+
# check if we are building docs
73+
AC_ARG_ENABLE(doc, [AS_HELP_STRING([--enable-doc],[build doc])], have_doc=$enableval, have_doc=no)
74+
if test "$have_doc" = "yes"; then
75+
AC_DEFINE([CONFIG_DOC], [1], [Configure to build doc])
76+
fi
77+
AM_CONDITIONAL(BUILD_DOC, test "$have_doc" = "yes")
78+
7279
# Disable DMIC driver if requested, by default build for supported platforms
7380
AC_ARG_ENABLE([dmic], AS_HELP_STRING([--disable-dmic], [Disable DMIC driver]))
7481
AS_IF([test "x$enable_dmic" != "xno"], [
@@ -118,7 +125,7 @@ case "$with_arch" in
118125
AC_SUBST(ARCH)
119126
;;
120127
*)
121-
if test "$have_rimage" = "no"; then
128+
if test "$have_rimage" = "no" && test "$have_doc" = "no" ; then
122129
AC_MSG_ERROR([DSP architecture not specified])
123130
fi
124131
;;
@@ -134,6 +141,9 @@ AC_SUBST(AM_CCASFLAGS)
134141
AM_CONDITIONAL(BUILD_XTENSA, test "$ARCH" = "xtensa")
135142
AM_CONDITIONAL(BUILD_HOST, test "$ARCH" = "host")
136143

144+
# check for xtensa extension
145+
AM_CONDITIONAL(BUILD_XTENSA_SMP, test "$with_arch" = "xtensa-smp")
146+
137147
# Cmocka tests
138148
AC_ARG_WITH([cmocka-prefix],
139149
AS_HELP_STRING([--with-cmocka-prefix], [Path to cmocka]),
@@ -271,7 +281,7 @@ case "$with_platform" in
271281
AC_DEFINE([CONFIG_DMA_GW], [1], [Configure DMA Gateway])
272282
;;
273283
*)
274-
if test "$have_rimage" = "no"; then
284+
if test "$have_rimage" = "no" && test "$have_doc" = "no"; then
275285
if test "$ARCH" = "host"; then
276286
PLATFORM="host"
277287
AC_SUBST(PLATFORM)
@@ -428,8 +438,16 @@ AC_CONFIG_FILES([
428438
src/arch/xtensa/include/arch/Makefile
429439
src/arch/xtensa/include/xtensa/Makefile
430440
src/arch/xtensa/include/xtensa/config/Makefile
431-
src/arch/xtensa/hal/Makefile
432-
src/arch/xtensa/xtos/Makefile
441+
src/arch/xtensa/smp/Makefile
442+
src/arch/xtensa/smp/hal/Makefile
443+
src/arch/xtensa/smp/include/Makefile
444+
src/arch/xtensa/smp/include/arch/Makefile
445+
src/arch/xtensa/smp/xtos/Makefile
446+
src/arch/xtensa/up/Makefile
447+
src/arch/xtensa/up/hal/Makefile
448+
src/arch/xtensa/up/include/Makefile
449+
src/arch/xtensa/up/include/arch/Makefile
450+
src/arch/xtensa/up/xtos/Makefile
433451
src/arch/host/Makefile
434452
src/arch/host/include/Makefile
435453
src/arch/host/include/arch/Makefile
@@ -475,6 +493,7 @@ AC_CONFIG_FILES([
475493
src/platform/cannonlake/include/arch/xtensa/config/Makefile
476494
src/platform/cannonlake/include/platform/Makefile
477495
src/platform/intel/Makefile
496+
src/platform/intel/cavs/Makefile
478497
src/platform/intel/include/Makefile
479498
src/platform/intel/include/platform/Makefile
480499
src/platform/intel/include/platform/cavs/Makefile

doc/Makefile.am

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
EXTRA_DIST=sof_uapi.doxygen.in
1+
EXTRA_DIST=sof.doxygen.in
22

33
AM_CPPFLAGS=-I$(top_srcdir)/include
44

55
doc:
6-
test -e sof_uapi.doxygen || sed s:[@]top_srcdir[@]:..:g sof_uapi.doxygen.in > sof_uapi.doxygen
7-
doxygen sof_uapi.doxygen
6+
test -e sof.doxygen || sed s:[@]top_srcdir[@]:..:g sof.doxygen.in > sof.doxygen
7+
doxygen sof.doxygen
88

99
doc-clean:
10-
rm -rf $(top_srcdir)/doc/sof_uapi/*
10+
rm -rf $(top_srcdir)/doc/doxygen/*
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PROJECT_NAME = "Sound Open Firmware"
2-
OUTPUT_DIRECTORY = sof_uapi
2+
OUTPUT_DIRECTORY = doxygen
33
GENERATE_LATEX = NO
44
GENERATE_RTF = NO
55
GENERATE_MAN = NO
@@ -17,13 +17,14 @@ QUIET = YES
1717

1818
EXTRACT_ALL = NO
1919
EXTRACT_STATIC = NO
20+
WARN_IF_UNDOCUMENTED = NO
2021
SHOW_INCLUDE_FILES = NO
2122
JAVADOC_AUTOBRIEF = NO
2223
INHERIT_DOCS = YES
2324
ENABLED_SECTIONS = ""
2425
MACRO_EXPANSION = YES
2526
EXPAND_ONLY_PREDEF = YES
26-
PREDEFINED =
27+
PREDEFINED = __attribute__(x)=
2728

2829
OPTIMIZE_OUTPUT_FOR_C = YES
2930
TYPEDEF_HIDES_STRUCT = YES

src/arch/Makefile.am

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
1-
if BUILD_XTENSA
2-
SUBDIRS = xtensa
3-
endif
4-
5-
if BUILD_HOST
6-
SUBDIRS = host
7-
endif
1+
SUBDIRS = $(ARCH)

src/arch/xtensa/Makefile.am

Lines changed: 66 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
SUBDIRS = hal xtos include
1+
if BUILD_XTENSA_SMP
2+
SUBDIRS = smp include
3+
else
4+
SUBDIRS = up include
5+
endif
26

37
noinst_PROGRAMS = \
48
sof
@@ -25,8 +29,14 @@ $(LINK_SCRIPT): Makefile $(LINK_SCRIPT).in $(LINK_DEPS)
2529
noinst_LIBRARIES = \
2630
libreset.a
2731

32+
if BUILD_XTENSA_SMP
33+
libreset_a_SOURCES = \
34+
smp/xtos/memctl_default.S \
35+
smp/xtos/reset-vector.S
36+
else
2837
libreset_a_SOURCES = \
29-
reset-vector.S
38+
up/xtos/reset-vector.S
39+
endif
3040

3141
libreset_a_CCASFLAGS = \
3242
$(ARCH_INCDIR) \
@@ -36,11 +46,25 @@ libreset_a_CCASFLAGS = \
3646
-mtext-section-literals
3747

3848
sof_SOURCES = \
39-
crt1-boards.S \
40-
_vectors.S \
41-
init.c \
42-
timer.c \
43-
task.c
49+
timer.c
50+
51+
if BUILD_XTENSA_SMP
52+
sof_SOURCES += \
53+
smp/xtos/crt1-boards.S \
54+
smp/xtos/_vectors.S \
55+
smp/cpu.c \
56+
smp/init.c \
57+
smp/schedule.c \
58+
smp/task.c
59+
else
60+
sof_SOURCES += \
61+
up/xtos/crt1-boards.S \
62+
up/xtos/_vectors.S \
63+
up/cpu.c \
64+
up/init.c \
65+
up/schedule.c \
66+
up/task.c
67+
endif
4468

4569
if BUILD_BOOTLOADER
4670
sof_SOURCES += \
@@ -64,20 +88,32 @@ sof_LDADD = \
6488
../../init/libinit.a \
6589
../../tasks/libtasks.a \
6690
../../lib/libcore.a \
67-
../../platform/$(PLATFORM)/libplatform.a \
91+
../../platform/$(PLATFORM)/libplatform.la \
6892
../../ipc/libsof_ipc.a \
6993
../../lib/libdma.a \
7094
../../audio/libaudio.a \
7195
../../drivers/libdrivers.a \
7296
../../math/libsof_math.a \
73-
xtos/libxtos.a \
74-
xtos/libxlevel2.a \
75-
xtos/libxlevel3.a \
76-
xtos/libxlevel4.a \
77-
xtos/libxlevel5.a \
78-
hal/libhal.a \
7997
-lgcc
8098

99+
if BUILD_XTENSA_SMP
100+
sof_LDADD += \
101+
smp/xtos/libxtos.a \
102+
smp/xtos/libxlevel2.a \
103+
smp/xtos/libxlevel3.a \
104+
smp/xtos/libxlevel4.a \
105+
smp/xtos/libxlevel5.a \
106+
smp/hal/libhal.a
107+
else
108+
sof_LDADD += \
109+
up/xtos/libxtos.a \
110+
up/xtos/libxlevel2.a \
111+
up/xtos/libxlevel3.a \
112+
up/xtos/libxlevel4.a \
113+
up/xtos/libxlevel5.a \
114+
up/hal/libhal.a
115+
endif
116+
81117
if !BUILD_BOOTLOADER
82118
sof_LDADD += \
83119
libreset.a
@@ -107,9 +143,16 @@ $(LINK_BOOT_LDR_SCRIPT): Makefile $(LINK_BOOT_LDR_SCRIPT).in $(LINK_DEPS)
107143

108144
boot_ldr_SOURCES = \
109145
boot_entry.S \
110-
_vectors.S \
111146
boot_loader.c
112147

148+
if BUILD_XTENSA_SMP
149+
boot_ldr_SOURCES += \
150+
smp/xtos/_vectors.S
151+
else
152+
boot_ldr_SOURCES += \
153+
up/xtos/_vectors.S
154+
endif
155+
113156
boot_ldr_CFLAGS = \
114157
$(ARCH_INCDIR) \
115158
$(AM_CFLAGS) \
@@ -124,10 +167,17 @@ boot_ldr_CCASFLAGS = \
124167
$(PLATFORM_INCDIR)
125168

126169
boot_ldr_LDADD = \
127-
hal/libhal.a \
128170
libreset.a \
129171
-lgcc
130172

173+
if BUILD_XTENSA_SMP
174+
boot_ldr_LDADD += \
175+
smp/hal/libhal.a
176+
else
177+
boot_ldr_LDADD += \
178+
up/hal/libhal.a
179+
endif
180+
131181
boot_ldr_LDFLAGS = \
132182
$(AM_LDFLAGS) \
133183
$(ARCH_LDFLAGS) \

src/arch/xtensa/boot_entry.S

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@
4141
#include <xtensa/corebits.h>
4242
#include <xtensa/config/core-isa.h>
4343

44-
.type boot_pri_core, @function
45-
.type boot_sec_core, @function
44+
.type boot_master_core, @function
4645

4746
.begin literal_prefix .boot_entry
4847
.section .boot_entry.text, "ax"
@@ -145,16 +144,16 @@ boot_init:
145144
#endif
146145

147146
/* determine core we are running on */
148-
rsr a2, PRID
149-
beqz a2, 1f
147+
rsr.prid a2
148+
movi a3, PLATFORM_MASTER_CORE_ID
149+
beq a2, a3, 1f
150150

151-
/* we are seconadry core, so boot it */
152-
call8 boot_sec_core
151+
/* no core should get here */
153152
j dead
154153

155154
1:
156155
/* we are primary core so boot it */
157-
call8 boot_pri_core
156+
call8 boot_master_core
158157

159158
dead:
160159
/* should never get here - we are dead */

src/arch/xtensa/boot_loader.c

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@
3939
/* entry point to main firmware */
4040
extern void _ResetVector(void);
4141

42-
void boot_pri_core(void);
43-
void boot_sec_core(void);
42+
void boot_master_core(void);
4443

4544
#if defined(CONFIG_BOOT_LOADER)
4645

@@ -171,18 +170,8 @@ static uint32_t hp_sram_init(void)
171170
}
172171
#endif
173172

174-
/* boot secondary core - i.e core ID > 0 */
175-
void boot_sec_core(void)
176-
{
177-
/* TODO: prepare C stack for this core */
178-
while (1);
179-
180-
/* now call SOF entry */
181-
_ResetVector();
182-
}
183-
184-
/* boot primary core - i.e. core ID == 0 */
185-
void boot_pri_core(void)
173+
/* boot master core */
174+
void boot_master_core(void)
186175
{
187176
int32_t result;
188177

src/arch/xtensa/include/arch/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
noinst_HEADERS = \
22
atomic.h \
33
cache.h \
4+
init.h \
45
interrupt.h \
56
sof.h \
67
spinlock.h \

0 commit comments

Comments
 (0)