Duncan Laurie has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32091
Change subject: ec/google/wilco: Add a romstage init function to send progress code ......................................................................
ec/google/wilco: Add a romstage init function to send progress code
When using FSP with debug enabled it takes too long to get to ramstage and send the first progress code to the EC. The same thing has been reported to happen when 2x16GB memory is installed.
BUG=b:127875364 TEST=boot with FSP debug and ensure EC does not try to turn off the system while it is still booting.
Change-Id: I5676354f5e53540273a9029411507f91864735a1 Signed-off-by: Duncan Laurie dlaurie@google.com --- M src/ec/google/wilco/Makefile.inc M src/ec/google/wilco/commands.h A src/ec/google/wilco/romstage.c A src/ec/google/wilco/romstage.h 4 files changed, 51 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/91/32091/1
diff --git a/src/ec/google/wilco/Makefile.inc b/src/ec/google/wilco/Makefile.inc index 2e1c0d4..fe8910c 100644 --- a/src/ec/google/wilco/Makefile.inc +++ b/src/ec/google/wilco/Makefile.inc @@ -1,6 +1,7 @@ ifeq ($(CONFIG_EC_GOOGLE_WILCO),y)
bootblock-y += bootblock.c +romstage-y += commands.c mailbox.c romstage.c ramstage-y += chip.c commands.c mailbox.c smm-y += commands.c mailbox.c smihandler.c
diff --git a/src/ec/google/wilco/commands.h b/src/ec/google/wilco/commands.h index 42bb4f2..85f5feb 100644 --- a/src/ec/google/wilco/commands.h +++ b/src/ec/google/wilco/commands.h @@ -63,6 +63,7 @@ };
enum bios_progress_code { + BIOS_PROGRESS_BEFORE_MEMORY = 0x00, BIOS_PROGRESS_MEMORY_INIT = 0x01, BIOS_PROGRESS_VIDEO_INIT = 0x02, BIOS_PROGRESS_LOGO_DISPLAYED = 0x03, diff --git a/src/ec/google/wilco/romstage.c b/src/ec/google/wilco/romstage.c new file mode 100644 index 0000000..4f5eef2 --- /dev/null +++ b/src/ec/google/wilco/romstage.c @@ -0,0 +1,23 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2019 Google LLC + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include "commands.h" +#include "ec.h" +#include "romstage.h" + +void wilco_ec_romstage_init(void) +{ + wilco_ec_send(KB_BIOS_PROGRESS, BIOS_PROGRESS_BEFORE_MEMORY); +} diff --git a/src/ec/google/wilco/romstage.h b/src/ec/google/wilco/romstage.h new file mode 100644 index 0000000..fbbbdc4 --- /dev/null +++ b/src/ec/google/wilco/romstage.h @@ -0,0 +1,26 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2019 Google LLC + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef EC_GOOGLE_WILCO_ROMSTAGE_H +#define EC_GOOGLE_WILCO_ROMSTAGE_H + +/** + * wilco_ec_early_init + * + * This function performs initialization of the EC in romstage. + */ +void wilco_ec_romstage_init(void); + +#endif /* EC_GOOGLE_WILCO_ROMSTAGE_H */
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32091 )
Change subject: ec/google/wilco: Add a romstage init function to send progress code ......................................................................
Patch Set 1: Code-Review+2
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32091 )
Change subject: ec/google/wilco: Add a romstage init function to send progress code ......................................................................
Patch Set 1: Code-Review+1
Duncan Laurie has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/32091 )
Change subject: ec/google/wilco: Add a romstage init function to send progress code ......................................................................
ec/google/wilco: Add a romstage init function to send progress code
When using FSP with debug enabled it takes too long to get to ramstage and send the first progress code to the EC. The same thing has been reported to happen when 2x16GB memory is installed.
BUG=b:127875364 TEST=boot with FSP debug and ensure EC does not try to turn off the system while it is still booting.
Change-Id: I5676354f5e53540273a9029411507f91864735a1 Signed-off-by: Duncan Laurie dlaurie@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/32091 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Furquan Shaikh furquan@google.com Reviewed-by: Paul Menzel paulepanter@users.sourceforge.net --- M src/ec/google/wilco/Makefile.inc M src/ec/google/wilco/commands.h A src/ec/google/wilco/romstage.c A src/ec/google/wilco/romstage.h 4 files changed, 51 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Paul Menzel: Looks good to me, but someone else must approve Furquan Shaikh: Looks good to me, approved
diff --git a/src/ec/google/wilco/Makefile.inc b/src/ec/google/wilco/Makefile.inc index 2e1c0d4..fe8910c 100644 --- a/src/ec/google/wilco/Makefile.inc +++ b/src/ec/google/wilco/Makefile.inc @@ -1,6 +1,7 @@ ifeq ($(CONFIG_EC_GOOGLE_WILCO),y)
bootblock-y += bootblock.c +romstage-y += commands.c mailbox.c romstage.c ramstage-y += chip.c commands.c mailbox.c smm-y += commands.c mailbox.c smihandler.c
diff --git a/src/ec/google/wilco/commands.h b/src/ec/google/wilco/commands.h index 42bb4f2..85f5feb 100644 --- a/src/ec/google/wilco/commands.h +++ b/src/ec/google/wilco/commands.h @@ -63,6 +63,7 @@ };
enum bios_progress_code { + BIOS_PROGRESS_BEFORE_MEMORY = 0x00, BIOS_PROGRESS_MEMORY_INIT = 0x01, BIOS_PROGRESS_VIDEO_INIT = 0x02, BIOS_PROGRESS_LOGO_DISPLAYED = 0x03, diff --git a/src/ec/google/wilco/romstage.c b/src/ec/google/wilco/romstage.c new file mode 100644 index 0000000..4f5eef2 --- /dev/null +++ b/src/ec/google/wilco/romstage.c @@ -0,0 +1,23 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2019 Google LLC + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include "commands.h" +#include "ec.h" +#include "romstage.h" + +void wilco_ec_romstage_init(void) +{ + wilco_ec_send(KB_BIOS_PROGRESS, BIOS_PROGRESS_BEFORE_MEMORY); +} diff --git a/src/ec/google/wilco/romstage.h b/src/ec/google/wilco/romstage.h new file mode 100644 index 0000000..fbbbdc4 --- /dev/null +++ b/src/ec/google/wilco/romstage.h @@ -0,0 +1,26 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2019 Google LLC + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef EC_GOOGLE_WILCO_ROMSTAGE_H +#define EC_GOOGLE_WILCO_ROMSTAGE_H + +/** + * wilco_ec_early_init + * + * This function performs initialization of the EC in romstage. + */ +void wilco_ec_romstage_init(void); + +#endif /* EC_GOOGLE_WILCO_ROMSTAGE_H */