Age | Commit message (Collapse) | Author |
|
the new driver supports 50MHz highspeed bus mode
and uses ADMA instead of SDMA.
|
|
|
|
|
|
aliasing, implement vmap() proper
on the 2GB and 4GB raspberry pi 4 variants, there are two
memory regions for ram:
[0x00000000..0x3e600000)
[0x40000000..0xfc000000)
the framebuffer is somewhere at the end of the first
GB of memory.
to handle these, we append the region base and limit
of the second region to *maxmem= like:
*maxmem=0x3e600000 0x40000000 0xfc000000
the mmu code has been changed to have non-existing
ram unmapped and mmukmap() now uses small 64K pages
instead of 512GB pages to avoid aliasing (framebuffer).
the VIRTPCI mapping has been removed as we now have
a proper vmap() implementation which assigns vritual
addresses automatically.
|
|
|
|
make early boot messages available by writing out
kmesg.buf after uart and screen initialization.
|
|
bcm/bcm64
|
|
|
|
richard miller)
the register does not seem to be accessible on the Rpi 3b.
so instead hardcode oscfreq in the Soc structure.
|
|
|
|
|
|
|
|
this adds a 4GB KMAP window into the kernel address space
so we can access all physical ram on raspberry pi 4 for
user pages.
note that kernel memory above KZERO is still limited
to 1GB because of DMA restrictions.
|
|
|
|
|
|
|
|
the hangs where caused by missing NX bits on the mmio mappings,
so the debug code is not needed anymore.
|
|
|
|
|
|
|
|
|
|
according to the following linux change, BCM2711 uses a different
method for changing pullup/down mode:
https://github.com/raspberrypi/linux/commit/abcfd092860760087b87acbdda0963fe7906839c#diff-cf078559c38543ac72c5db99323e236d
gpiomeminit() was broken, using virtual address for the gpio physseg
instead of the physical one.
cleanup the code, avoid repetition by declaring static u32int *regs
variable. make local variable names consistent.
|
|
the raspberry pi 4 uses 54 instead of 19.2 MHz crystal.
detect which frequency is used by reading OTP bootmode
register:
https://www.raspberrypi.org/documentation/hardware/raspberrypi/otpbits.md
Bit 1: sets the oscillator frequency to 19.2MHz
|
|
|
|
cache-line-size aligned buffer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
the raspberry pi 4 has a new interrupt controller and
pci support, so get rid of intrenable() macro and
properly make intrenable function with tbdf argument.
|
|
the raspberry pi4 firmware refuses to enable the GIC interrup controller
for arm64 when the .img file is not a multiple of 4 bytes. yes, this
is insane and nowhere documented.
|
|
configurable in Soc.virtio and Soc.iosize
|
|
the new raspberry pi 4 firmware for arm64 seems to have
broken atag support. so we now parse the device tree
structure to get the bootargs and memory configuration.
|
|
|
|
for device drivers
|
|
|
|
|
|
|
|
|
|
|
|
1.2 (2019))
Ori Bernstein had Sunrise Point-H USB 3.0 xHCI Controller that would mysteriously
crash on the 5th ENABLESLOT command. This was reproducable by even just allocating
slots in a loop right after init.
It turns out, the 1.2 spec extended the Max Scratchpad Buffers in HCSPARAMS2 so our
driver would not allocate enougth scratchpad buffers and controller firmware would
crash once it went beyond our allocated scratchpad buffer array.
This change also fixes:
- ignore bits 16:31 in PAGESIZE register
- preserve bits 10:31 in the CONFIG register
- handle ADDESSDEV command failure (so it can be retried)
|
|
preallocate 2% of user pages for page tables and MMU structures
and keep them mapped in the VMAP range. this leaves more space
in the KZERO window and avoids running out of kernel memory on
machines with large amounts of memory.
|
|
cases
handle empty filename, dot and dotdot. handle mismatching from/to directory/file
type. cleanup destination file on error. error when attempting to copy non-empty
directories.
little test program:
#include <unistd.h>
#include <stdio.h>
int
main(int argc, char *argv[])
{
if(argc != 3){
fprintf(stderr, "usage: %s old new\n", argv[0]);
return 1;
}
if(rename(argv[1], argv[2])){
perror("rename");
return 1;
}
return 0;
}
|
|
|
|
when a operation receives a chain of OINDEX nodes as its operands,
each indexing step used to allocate a new index register. this
is wastefull an can result in running out of fixed registers on 386
for code such as: x = a[a[a[a[i]]]].
instead we attempt to reuse the destination register of the operation
as the index register if it is not otherwise referenced. this results
in the index chain to use a single register for index and result and
leaves registers free to be used for something usefull instead.
for 6c, try to avoid R13 as well as BP index base register.
|
|
OINDEX can only return TLONG result on 386 so give it
a register instead of a regpair and let gmove() handle
the conversion.
|
|
new implementation gets stuck in a infinite loop. backing
this out for now.
|