This fixes names of program entry and linker script files so that to
support building kernel mode apps using CMake and export package.
flat and protected mode should be the same as before.
Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
rsdp memory may be not mapped when provided from multiboot2 header.
For some reason the previous code worked on some machines.
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
issue:
in rwb_wrflush():
memmove(rwb->wrbuffer + padblocks * rwb->blocksize,
rwb->wrbuffer, rwb->wrnblocks * rwb->blocksize);
when the offest from rwb->wrblockstart to startblock plus rwb->wrnblocks is greater
than rwb->wralignblocks, it will be causing memory overflow since rwb->wrbuffer is
allocated rwb.wrmaxblock(rwb.wralignblocks) blocks.
fix:
Let us ensure that the wrblockstart in rwbuffer must be aligned according to
wralignblocks after writing, so there is no need to perform memmove when flushing
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
add simple ACPI parser for intel64.
For now RSDP signature can be found in BIOS legacy region or can be provided by multiboot2
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
This patch allows user to simply select which GPIOs he wants to use
and access them via /dev/gpio_a0 or similar device with standard
gpio driver.
By default gpio names match pin names printed on the board. So when
enabling A3 pin, it will show as /dev/gpio_a3 in runtime. This name
can be changed in kconfig.
User can also select pin function (input, output, interrupt) as well
as standard pin settings like, pull up/down, output type
pushpull/open drain etc.
All pins that are exposed via boards goldpins are listed in Kconfig.
Extra pins that are supported by chiip but are not exposed for easy
usage are not listed.
To have this nice Kconfig configuration and for things to be easily
debugable/understandable it requires code to have big Kconfig and
header file with all possible definitions
Because of file sizes I decided to split gpio related kconfig and
header into separate files. Otherwise it would really make original
files hard to read and find anything.
Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
In file included from common/addrenv.h:33,
from common/riscv_initialstate.c:36:
common/riscv_initialstate.c: In function 'up_initial_state':
common/riscv_internal.h:136:16: warning: declaration of 'regval' shadows a previous local [-Wshadow]
136 | uintptr_t regval; \
| ^~~~~~
common/riscv_initialstate.c:74:12: note: in expansion of macro 'READ_CSR'
74 | regval = READ_CSR(CSR_VLENB);
| ^~~~~~~~
common/riscv_initialstate.c:63:13: note: shadowed declaration is here
63 | uintptr_t regval;
| ^~~~~~
Signed-off-by: chao an <anchao@lixiang.com>
When usb is re-enumerated due to the reset signal, we need to push
the rx_pending message into the serial port buffer.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This is copy of raspberrypi-pico with all occurences of raspberrypi replaced by
w5500-evb. Only the usbnsh defconfig is available, which is based on the
raspberrypi-pico:usbnsh defconfig, but enables the WIZnet W5500 Ethernet chip.
TCP/IP for IPv4 and IPv6 is enabled.
Signed-off-by: Michael Jung <michael.jung@secore.ly>
This patch refactors granule allocator to remove the 32 granules
limitation with the help of a gran_range_s structure and related
functions, see "mm_grantable.h" for details.
Below are the major functions explaining how this works:
- The gran_match() checks if a gran range all in the given state.
it gives last mismatch position when fails free range matching.
- The gran_search() tries to find the position of a free range.
It leverages last mismatch position from gran_match() to speed
up the search.
range size handling is mainly in gran_match() and gran_set_().
Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>