Add support for SerialPortLib that maps into POSIX StdIn and StdOut. Add a device path text to lib as a holding point waiting on getting it reviewed for other packages. Some minor fixes. Also map the FV as writable, so the Variable store becomes writable.

I plan to try and make only the Variable store and logs writable, and make the executable/compressed FV read only in a future checkin. 



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11760 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
andrewfish
2011-06-08 02:34:12 +00:00
parent 6f18b50d02
commit 7e284acb40
17 changed files with 507 additions and 17 deletions

View File

@@ -354,18 +354,19 @@ MapFile (
VOID *res;
UINTN FileSize;
fd = open (FileName, O_RDONLY);
fd = open (FileName, O_RDWR);
if (fd < 0) {
return EFI_NOT_FOUND;
}
FileSize = lseek (fd, 0, SEEK_END);
res = MapMemory (fd, FileSize, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE);
res = MapMemory (fd, FileSize, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_SHARED);
close (fd);
if (res == MAP_FAILED) {
if (res == NULL) {
perror ("MapFile() Failed");
return EFI_DEVICE_ERROR;
}