Peer review fixes

pull/655/head
David Garske 2025-12-23 11:57:51 -08:00 committed by Daniele Lacamera
parent 6547a74fcf
commit 963cdadeaf
23 changed files with 28 additions and 29 deletions

View File

@ -6,7 +6,7 @@
*
* wolfBoot 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; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfBoot is distributed in the hope that it will be useful,

View File

@ -926,11 +926,12 @@ sudo dd if=test-app/image_v1_signed.bin of=/dev/sdc2 bs=512 && sudo cmp test-app
4) Insert SDCARD into PolarFire and let HSS start wolfBoot. You may need to use `boot sdcard` or configure/build HSS to disable MMC / enable SDCARD.
### PolarFire building Yocto-SDK Linux
### PolarFire Building Yocto-SDK Linux
See:
* https://github.com/linux4microchip/meta-mchp/blob/scarthgap/meta-mchp-common/README.md
* https://github.com/linux4microchip/meta-mchp/blob/scarthgap/meta-mchp-polarfire-soc/README.md
* https://github.com/polarfire-soc/polarfire-soc-documentation/blob/master/reference-designs-fpga-and-development-kits/mpfs-video-kit-embedded-software-user-guide.md
Building mchp-base-image Yocto Linux:
@ -947,7 +948,7 @@ MACHINE=mpfs-video-kit bitbake mchp-base-image-sdk
Build images are output to: `./tmp-glibc/deploy/images/mpfs-video-kit/`
#### Building custom FIT image, signing and coping to SDCard
#### Custom FIT image, signing and coping to SDCard
```sh
# Extract GZIP compressed linux kernel to wolfboot root

View File

@ -6,7 +6,7 @@
*
* wolfBoot 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; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfBoot is distributed in the hope that it will be useful,

View File

@ -269,7 +269,7 @@ void fespi_init(uint32_t cpu_clock, uint32_t flash_freq)
static RAMFUNCTION void fespi_swmode(void)
{
asm volatile("fence");
asm volatile("fence.i");
if (FESPI_REG_FCTRL & FESPI_FCTRL_MODE_SEL)
FESPI_REG_FCTRL &= ~FESPI_FCTRL_MODE_SEL;
}
@ -280,7 +280,7 @@ static RAMFUNCTION void fespi_hwmode(void)
if ((FESPI_REG_FCTRL & FESPI_FCTRL_MODE_SEL) == 0)
FESPI_REG_FCTRL |= FESPI_FCTRL_MODE_SEL;
asm volatile("fence");
asm volatile("fence.i");
/* Wait two milliseconds for the eSPI device
* to reboot into hw-mapped mode and link to the
* instruction cache
@ -575,13 +575,11 @@ int RAMFUNCTION hal_flash_erase(uint32_t address, int len)
address -= FLASH_BASE;
end = address + len - 1;
FESPI_REG_TXMARK = 1;
fespi_wait_txwm();
fespi_swmode();
fespi_wait_flash_busy();
for (p = address; p <= end; p += FESPI_FLASH_SECTOR_SIZE) {
fespi_write_enable();
fespi_csmode_hold();

View File

@ -861,7 +861,7 @@ int mmc_init(void)
reg |= EMMC_SD_SRS15_DSS_TYPE_B; /* default */
EMMC_SD_SRS15 = reg;
/* eanble high speed */
/* enable high speed */
EMMC_SD_SRS10 |= EMMC_SD_SRS10_HSE;
/* set UHS mode */

View File

@ -6,7 +6,7 @@
*
* wolfBoot 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; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfBoot is distributed in the hope that it will be useful,

View File

@ -57,4 +57,4 @@ SECTIONS
}
PROVIDE(_start_heap = _end);
PROVIDE(_end_stack = ORIGIN(RAM_L2_SCRATCH) + (LENGTH(RAM_L2_SCRATCH)) );
PROVIDE(_end_stack = ORIGIN(L2_SCRATCH) + (LENGTH(L2_SCRATCH)) );

View File

@ -6,7 +6,7 @@
*
* wolfBoot 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; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfBoot is distributed in the hope that it will be useful,

View File

@ -6,7 +6,7 @@
*
* wolfBoot 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; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfBoot is distributed in the hope that it will be useful,

View File

@ -1564,7 +1564,7 @@ static void hal_irq_init(void)
set32(PIC_GCR, PIC_GCR_RST);
while (get32(PIC_GCR) & PIC_GCR_RST);
set32(PIC_GCR, PIC_GCR_M); /* eanble mixed-mode */
set32(PIC_GCR, PIC_GCR_M); /* enable mixed-mode */
reg = get32(PIC_GCR); /* read back */
(void)reg;
}

View File

@ -6,7 +6,7 @@
*
* wolfBoot 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; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfBoot is distributed in the hope that it will be useful,

View File

@ -6,7 +6,7 @@
*
* wolfBoot 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; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfBoot is distributed in the hope that it will be useful,

View File

@ -6,7 +6,7 @@
*
* wolfBoot 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; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfBoot is distributed in the hope that it will be useful,

View File

@ -6,7 +6,7 @@
*
* wolfBoot 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; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfBoot is distributed in the hope that it will be useful,

View File

@ -6,7 +6,7 @@
*
* wolfBoot 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; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfBoot is distributed in the hope that it will be useful,

View File

@ -6,7 +6,7 @@
*
* wolfBoot 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; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfBoot is distributed in the hope that it will be useful,

View File

@ -6,7 +6,7 @@
*
* wolfBoot 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; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfBoot is distributed in the hope that it will be useful,
@ -80,7 +80,7 @@ struct idt_descriptor {
void stage2_set_parameters(struct stage2_parameter *p, struct stage2_ptr_holder *holder)
{
struct idt_descriptor idt;
idt.limit = sizeof(holder->dummy_idt) - 1;
idt.base = (uint32_t)&holder->dummy_idt;
memset(holder->dummy_idt, 0, sizeof(holder->dummy_idt));

View File

@ -6,7 +6,7 @@
*
* wolfBoot 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; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfBoot is distributed in the hope that it will be useful,

View File

@ -6,7 +6,7 @@
*
* wolfBoot 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; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfBoot is distributed in the hope that it will be useful,

View File

@ -6,7 +6,7 @@
*
* wolfBoot 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; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfBoot is distributed in the hope that it will be useful,
@ -89,7 +89,7 @@ int gdt_update_segments(void)
"retfq\r\n"
"seg_cs:\r\n"
:
: "i"(GDT_DS), "i" (GDT_CS_64BIT)
: "i"(GDT_DS), "i" (GDT_CS_64BIT)
: "rax"
);
return 0;

View File

@ -6,7 +6,7 @@
*
* wolfBoot 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; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfBoot is distributed in the hope that it will be useful,

View File

@ -8,7 +8,7 @@
*
* wolfBoot 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; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfBoot is distributed in the hope that it will be useful,

View File

@ -8,7 +8,7 @@
*
* wolfBoot 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; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfBoot is distributed in the hope that it will be useful,